Fully adjustable splash timer on x7, matching x9 implementation (#5008)

* Fully adjustable splash timer on x7, matching x9 implementation

* Make splash adjustable for all ARM, and just check box for AVR
This commit is contained in:
3djc
2017-06-28 22:10:40 +02:00
committed by Bertrand Songis
parent c00775b2d1
commit 1c62b19f9f
2 changed files with 14 additions and 1 deletions
+1 -1
View File
@@ -880,7 +880,7 @@ PACK(struct TrainerData {
#define SPLASH_MODE uint8_t splashSpares:3
#elif defined(FSPLASH)
#define SPLASH_MODE uint8_t splashMode:3
#elif defined(PCBTARANIS)
#elif defined(CPUARM)
#define SPLASH_MODE int8_t splashMode:3
#else
#define SPLASH_MODE uint8_t splashMode:1; uint8_t splashSpare:2
+13
View File
@@ -467,9 +467,22 @@ void menuRadioSetup(event_t event)
#if defined(SPLASH) && !defined(FSPLASH)
case ITEM_SETUP_DISABLE_SPLASH:
{
#if defined(CPUARM)
lcdDrawTextAlignedLeft(y, STR_SPLASHSCREEN);
if (SPLASH_NEEDED()) {
lcdDrawNumber(RADIO_SETUP_2ND_COLUMN, y, SPLASH_TIMEOUT/100, attr|LEFT);
lcdDrawChar(lcdLastRightPos, y, 's');
}
else {
lcdDrawMMM(RADIO_SETUP_2ND_COLUMN, y, attr);
}
if (attr) g_eeGeneral.splashMode = -checkIncDecGen(event, -g_eeGeneral.splashMode, -3, 4);
break;
#else
uint8_t b = 1-g_eeGeneral.splashMode;
g_eeGeneral.splashMode = 1 - editCheckBox(b, RADIO_SETUP_2ND_COLUMN, y, STR_SPLASHSCREEN, attr, event);
break;
#endif
}
#endif