[X12S] No additional duration for the splash (#4448)
This commit is contained in:
committed by
Andre Bernet
parent
9e268eba89
commit
4170acba79
@@ -504,6 +504,11 @@ void audioTask(void * pdata)
|
||||
|
||||
setSampleRate(AUDIO_SAMPLE_RATE);
|
||||
|
||||
#if defined(PCBX12S)
|
||||
// The audio amp needs ~2s to start
|
||||
CoTickDelay(500); // 1s
|
||||
#endif
|
||||
|
||||
if (!unexpectedShutdown) {
|
||||
AUDIO_HELLO();
|
||||
}
|
||||
|
||||
@@ -32,12 +32,6 @@ int8_t editSlider(coord_t x, coord_t y, event_t event, int8_t value, int8_t min,
|
||||
|
||||
#define SLIDER_5POS(val) val = editSlider(RADIO_SETUP_2ND_COLUMN, y, event, val, -2, +2, attr)
|
||||
|
||||
#if defined(SPLASH) && !defined(FSPLASH)
|
||||
#define CASE_SPLASH_PARAM(x) x,
|
||||
#else
|
||||
#define CASE_SPLASH_PARAM(x)
|
||||
#endif
|
||||
|
||||
enum menuRadioSetupItems {
|
||||
ITEM_SETUP_DATE,
|
||||
ITEM_SETUP_TIME,
|
||||
@@ -71,7 +65,6 @@ enum menuRadioSetupItems {
|
||||
ITEM_SETUP_BRIGHTNESS,
|
||||
ITEM_SETUP_DIM_LEVEL,
|
||||
ITEM_SETUP_FLASH_BEEP,
|
||||
// CASE_SPLASH_PARAM(ITEM_SETUP_DISABLE_SPLASH)
|
||||
CASE_GPS(ITEM_SETUP_LABEL_GPS)
|
||||
CASE_GPS(ITEM_SETUP_TIMEZONE)
|
||||
CASE_GPS(ITEM_SETUP_ADJUST_RTC)
|
||||
@@ -393,21 +386,6 @@ bool menuRadioSetup(event_t event)
|
||||
if (attr) CHECK_INCDEC_GENVAR(event, g_eeGeneral.blOffBright, 5, 100);
|
||||
break;
|
||||
|
||||
#if 0
|
||||
case ITEM_SETUP_DISABLE_SPLASH:
|
||||
{
|
||||
lcdDrawText(MENUS_MARGIN_LEFT, y, STR_SPLASHSCREEN);
|
||||
if (SPLASH_NEEDED()) {
|
||||
lcdDrawNumber(RADIO_SETUP_2ND_COLUMN, y, SPLASH_TIMEOUT/100, attr|LEFT, 0, NULL, "s");
|
||||
}
|
||||
else {
|
||||
lcdDrawMMM(RADIO_SETUP_2ND_COLUMN, y, attr);
|
||||
}
|
||||
if (attr) g_eeGeneral.splashMode = -checkIncDecGen(event, -g_eeGeneral.splashMode, -3, 4);
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
|
||||
case ITEM_SETUP_LABEL_GPS:
|
||||
lcdDrawText(MENUS_MARGIN_LEFT, y, STR_GPS);
|
||||
break;
|
||||
|
||||
+9
-9
@@ -502,26 +502,26 @@ extern const pm_uint8_t modn12x3[];
|
||||
|
||||
extern uint8_t channel_order(uint8_t x);
|
||||
|
||||
#define THRCHK_DEADBAND 16
|
||||
#define THRCHK_DEADBAND 16
|
||||
|
||||
#if defined(COLORLCD)
|
||||
#define SPLASH_NEEDED() (true)
|
||||
#define SPLASH_NEEDED() (false)
|
||||
#elif defined(PCBTARANIS)
|
||||
#define SPLASH_NEEDED() (g_eeGeneral.splashMode != 3)
|
||||
#define SPLASH_NEEDED() (g_eeGeneral.splashMode != 3)
|
||||
#elif defined(CPUARM)
|
||||
#define SPLASH_NEEDED() (g_model.moduleData[EXTERNAL_MODULE].type != MODULE_TYPE_DSM2 && !g_eeGeneral.splashMode)
|
||||
#define SPLASH_NEEDED() (g_model.moduleData[EXTERNAL_MODULE].type != MODULE_TYPE_DSM2 && !g_eeGeneral.splashMode)
|
||||
#else
|
||||
#define SPLASH_NEEDED() (!IS_DSM2_PROTOCOL(g_model.protocol) && !g_eeGeneral.splashMode)
|
||||
#define SPLASH_NEEDED() (!IS_DSM2_PROTOCOL(g_model.protocol) && !g_eeGeneral.splashMode)
|
||||
#endif
|
||||
|
||||
#if defined(PCBHORUS)
|
||||
#define SPLASH_TIMEOUT 300 /* 3s */
|
||||
#define SPLASH_TIMEOUT 0 /* we use the splash duration to load stuff from the SD */
|
||||
#elif defined(FSPLASH)
|
||||
#define SPLASH_TIMEOUT (g_eeGeneral.splashMode == 0 ? 60000/*infinite=10mn*/ : ((4*100) * (g_eeGeneral.splashMode & 0x03)))
|
||||
#define SPLASH_TIMEOUT (g_eeGeneral.splashMode == 0 ? 60000/*infinite=10mn*/ : ((4*100) * (g_eeGeneral.splashMode & 0x03)))
|
||||
#elif defined(PCBTARANIS) || defined(PCBFLAMENCO)
|
||||
#define SPLASH_TIMEOUT (g_eeGeneral.splashMode==-4 ? 1500 : (g_eeGeneral.splashMode<=0 ? (400-g_eeGeneral.splashMode*200) : (400-g_eeGeneral.splashMode*100)))
|
||||
#define SPLASH_TIMEOUT (g_eeGeneral.splashMode==-4 ? 1500 : (g_eeGeneral.splashMode<=0 ? (400-g_eeGeneral.splashMode*200) : (400-g_eeGeneral.splashMode*100)))
|
||||
#else
|
||||
#define SPLASH_TIMEOUT (4*100) // 4 seconds
|
||||
#define SPLASH_TIMEOUT (4*100) // 4 seconds
|
||||
#endif
|
||||
|
||||
#if defined(ROTARY_ENCODERS)
|
||||
|
||||
@@ -162,6 +162,8 @@ void boardInit()
|
||||
TRACE("\nHorus board started :)");
|
||||
TRACE("RCC->CSR = %08x", RCC->CSR);
|
||||
|
||||
audioInit();
|
||||
|
||||
// we need to initialize g_FATFS_Obj here, because it is in .ram section (because of DMA access)
|
||||
// and this section is un-initialized
|
||||
memset(&g_FATFS_Obj, 0, sizeof(g_FATFS_Obj));
|
||||
@@ -171,7 +173,6 @@ void boardInit()
|
||||
lcdInit();
|
||||
backlightInit();
|
||||
|
||||
audioInit();
|
||||
init2MhzTimer();
|
||||
init1msTimer();
|
||||
usbInit();
|
||||
|
||||
Reference in New Issue
Block a user