SPLASH is now a compile option

This commit is contained in:
bsongis
2012-01-15 20:59:56 +00:00
parent 45d56d4efc
commit 50816ba01b
5 changed files with 28 additions and 1 deletions
+7
View File
@@ -74,6 +74,9 @@ USART1 = STD
# Values = STD, MOD1 # Values = STD, MOD1
PPMIN = STD PPMIN = STD
# SPLASH on START
SPLASH = YES
# BATT voltage algorithm. Values = BANDGAP, UNSTABLE_BANDGAP # BATT voltage algorithm. Values = BANDGAP, UNSTABLE_BANDGAP
BATT = BANDGAP BATT = BANDGAP
@@ -216,6 +219,10 @@ ifeq ($(NAVIGATION), POTS)
CPPDEFS += -DNAVIGATION_POT1 -DNAVIGATION_POT2 -DNAVIGATION_POT3 CPPDEFS += -DNAVIGATION_POT1 -DNAVIGATION_POT2 -DNAVIGATION_POT3
endif endif
ifneq ($(SPLASH), NO)
CPPDEFS += -DSPLASH
endif
MODS = MODS =
ifeq ($(PCB), STD) ifeq ($(PCB), STD)
+8 -1
View File
@@ -58,8 +58,13 @@ MenuFuncP_PROGMEM APM menuTabDiag[] = {
void menuProcSetup(uint8_t event) void menuProcSetup(uint8_t event)
{ {
#ifdef SPLASH
#define COUNT_ITEMS 19 #define COUNT_ITEMS 19
#undef PARAM_OFS #else
#define COUNT_ITEMS 18
#endif
#undef PARAM_OFS
#define PARAM_OFS 17*FW #define PARAM_OFS 17*FW
SIMPLE_MENU("RADIO SETUP", menuTabDiag, e_Setup, COUNT_ITEMS+1); SIMPLE_MENU("RADIO SETUP", menuTabDiag, e_Setup, COUNT_ITEMS+1);
@@ -158,6 +163,7 @@ void menuProcSetup(uint8_t event)
if((y+=FH)>7*FH) return; if((y+=FH)>7*FH) return;
}subN++; }subN++;
#ifdef SPLASH
if(s_pgOfs<subN) { if(s_pgOfs<subN) {
uint8_t b = 1-g_eeGeneral.disableSplashScreen; uint8_t b = 1-g_eeGeneral.disableSplashScreen;
lcd_puts_P(0, y,PSTR("Splash screen")); lcd_puts_P(0, y,PSTR("Splash screen"));
@@ -169,6 +175,7 @@ void menuProcSetup(uint8_t event)
} }
if((y+=FH)>7*FH) return; if((y+=FH)>7*FH) return;
}subN++; }subN++;
#endif
if(s_pgOfs<subN) { if(s_pgOfs<subN) {
uint8_t b = 1-g_eeGeneral.disableThrottleWarning; uint8_t b = 1-g_eeGeneral.disableThrottleWarning;
+8
View File
@@ -21,9 +21,11 @@
#include "gruvin9x.h" #include "gruvin9x.h"
#ifdef SPLASH
prog_uchar APM spsMarker[] = { "SPS" }; prog_uchar APM spsMarker[] = { "SPS" };
#include "s9xsplash.lbm" #include "s9xsplash.lbm"
prog_uchar APM speMarker[] = { "SPE" }; prog_uchar APM speMarker[] = { "SPE" };
#endif
#include "menus.h" #include "menus.h"
@@ -503,6 +505,7 @@ void clearKeyEvents()
putEvent(0); putEvent(0);
} }
#ifdef SPLASH
void doSplash() void doSplash()
{ {
if(!g_eeGeneral.disableSplashScreen) if(!g_eeGeneral.disableSplashScreen)
@@ -550,6 +553,7 @@ void doSplash()
} }
} }
} }
#endif
void checkLowEEPROM() void checkLowEEPROM()
{ {
@@ -2284,7 +2288,11 @@ int main(void)
#else #else
if (~MCUCSR & (1 << WDRF)) { if (~MCUCSR & (1 << WDRF)) {
#endif #endif
#ifdef SPLASH
doSplash(); doSplash();
#endif
checkLowEEPROM(); checkLowEEPROM();
getADC_single(); getADC_single();
+3
View File
@@ -514,7 +514,10 @@ extern int8_t s_traceCnt;
uint16_t getTmr16KHz(); uint16_t getTmr16KHz();
uint16_t stack_free(); uint16_t stack_free();
#ifdef SPLASH
void doSplash(); void doSplash();
#endif
void checkLowEEPROM(); void checkLowEEPROM();
void checkTHR(); void checkTHR();
void checkSwitches(); void checkSwitches();
+2
View File
@@ -106,7 +106,9 @@ void *main_thread(void *)
eeReadAll(); //load general setup and selected model eeReadAll(); //load general setup and selected model
if (main_thread_running == 1) { if (main_thread_running == 1) {
#ifdef SPLASH
doSplash(); doSplash();
#endif
checkLowEEPROM(); checkLowEEPROM();
checkTHR(); checkTHR();
checkSwitches(); checkSwitches();