From 042e702cdad5a3c78ab458f45f76877fa049ad94 Mon Sep 17 00:00:00 2001 From: Bertrand Songis Date: Mon, 26 Aug 2019 15:27:24 +0200 Subject: [PATCH] Cosmetics --- radio/src/opentx.h | 13 +++++++------ radio/src/storage/eeprom_common.cpp | 2 +- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/radio/src/opentx.h b/radio/src/opentx.h index 675382177..3dad381f1 100644 --- a/radio/src/opentx.h +++ b/radio/src/opentx.h @@ -366,20 +366,21 @@ extern uint8_t channelOrder(uint8_t x); #define THRCHK_DEADBAND 16 +inline bool SPLASH_NEEDED() +{ #if defined(COLORLCD) - #define SPLASH_NEEDED() (false) -#elif defined(PCBTARANIS) - #define SPLASH_NEEDED() (g_eeGeneral.splashMode != 3) + return false; #else - #define SPLASH_NEEDED() (g_model.moduleData[EXTERNAL_MODULE].type != MODULE_TYPE_DSM2 && !g_eeGeneral.splashMode) + return g_eeGeneral.splashMode != 3; #endif +} #if defined(PCBHORUS) #define SPLASH_TIMEOUT 0 /* we use the splash duration to load stuff from the SD */ #elif defined(PCBTARANIS) - #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_ENCODER_NAVIGATION) diff --git a/radio/src/storage/eeprom_common.cpp b/radio/src/storage/eeprom_common.cpp index 2f4aad44c..5cf9db5fb 100644 --- a/radio/src/storage/eeprom_common.cpp +++ b/radio/src/storage/eeprom_common.cpp @@ -125,7 +125,7 @@ void storageEraseAll(bool warn) ALERT(STR_STORAGE_WARNING, STR_BAD_RADIO_DATA, AU_BAD_RADIODATA); } - RAISE_ALERT(STR_STORAGE_WARNING, STR_STORAGE_FORMAT, NULL, AU_NONE); + RAISE_ALERT(STR_STORAGE_WARNING, STR_STORAGE_FORMAT, nullptr, AU_NONE); storageFormat(); storageDirty(EE_GENERAL|EE_MODEL);