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
PPMIN = STD
# SPLASH on START
SPLASH = YES
# BATT voltage algorithm. Values = BANDGAP, UNSTABLE_BANDGAP
BATT = BANDGAP
@@ -216,6 +219,10 @@ ifeq ($(NAVIGATION), POTS)
CPPDEFS += -DNAVIGATION_POT1 -DNAVIGATION_POT2 -DNAVIGATION_POT3
endif
ifneq ($(SPLASH), NO)
CPPDEFS += -DSPLASH
endif
MODS =
ifeq ($(PCB), STD)
+8 -1
View File
@@ -58,8 +58,13 @@ MenuFuncP_PROGMEM APM menuTabDiag[] = {
void menuProcSetup(uint8_t event)
{
#ifdef SPLASH
#define COUNT_ITEMS 19
#undef PARAM_OFS
#else
#define COUNT_ITEMS 18
#endif
#undef PARAM_OFS
#define PARAM_OFS 17*FW
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;
}subN++;
#ifdef SPLASH
if(s_pgOfs<subN) {
uint8_t b = 1-g_eeGeneral.disableSplashScreen;
lcd_puts_P(0, y,PSTR("Splash screen"));
@@ -169,6 +175,7 @@ void menuProcSetup(uint8_t event)
}
if((y+=FH)>7*FH) return;
}subN++;
#endif
if(s_pgOfs<subN) {
uint8_t b = 1-g_eeGeneral.disableThrottleWarning;
+8
View File
@@ -21,9 +21,11 @@
#include "gruvin9x.h"
#ifdef SPLASH
prog_uchar APM spsMarker[] = { "SPS" };
#include "s9xsplash.lbm"
prog_uchar APM speMarker[] = { "SPE" };
#endif
#include "menus.h"
@@ -503,6 +505,7 @@ void clearKeyEvents()
putEvent(0);
}
#ifdef SPLASH
void doSplash()
{
if(!g_eeGeneral.disableSplashScreen)
@@ -550,6 +553,7 @@ void doSplash()
}
}
}
#endif
void checkLowEEPROM()
{
@@ -2284,7 +2288,11 @@ int main(void)
#else
if (~MCUCSR & (1 << WDRF)) {
#endif
#ifdef SPLASH
doSplash();
#endif
checkLowEEPROM();
getADC_single();
+3
View File
@@ -514,7 +514,10 @@ extern int8_t s_traceCnt;
uint16_t getTmr16KHz();
uint16_t stack_free();
#ifdef SPLASH
void doSplash();
#endif
void checkLowEEPROM();
void checkTHR();
void checkSwitches();
+2
View File
@@ -106,7 +106,9 @@ void *main_thread(void *)
eeReadAll(); //load general setup and selected model
if (main_thread_running == 1) {
#ifdef SPLASH
doSplash();
#endif
checkLowEEPROM();
checkTHR();
checkSwitches();