Cosmetics

This commit is contained in:
Bertrand Songis
2019-06-19 18:22:15 +02:00
parent aa1fa2aa09
commit 60ad247315
7 changed files with 7 additions and 27 deletions
+3 -21
View File
@@ -1819,9 +1819,9 @@ void opentxInit()
#endif
currentSpeakerVolume = requiredSpeakerVolume = g_eeGeneral.speakerVolume + VOLUME_LEVEL_DEF;
#if !defined(SOFTWARE_VOLUME)
setScaledVolume(currentSpeakerVolume);
#endif
#if !defined(SOFTWARE_VOLUME)
setScaledVolume(currentSpeakerVolume);
#endif
referenceSystemAudioFiles();
audioQueue.start();
@@ -1890,7 +1890,6 @@ int main()
#if defined(PCBTARANIS)
g_eeGeneral.contrast = LCD_CONTRAST_DEFAULT;
#endif
wdt_disable();
boardInit();
@@ -1898,31 +1897,14 @@ int main()
loadFonts();
#endif
#if defined(GUI) && !defined(PCBTARANIS) && !defined(PCBHORUS)
// TODO remove this
lcdInit();
#endif
#if !defined(SIMU)
stackPaint();
#endif
#if defined(GUI) && !defined(PCBTARANIS)
// lcdSetRefVolt(25);
#endif
#if defined(SPLASH) && (defined(PCBTARANIS) || defined(PCBHORUS))
drawSplash();
#endif
#if defined(DSM2_SERIAL) && !defined(TELEMETRY_FRSKY)
DSM2_Init();
#endif
#if defined(MENU_ROTARY_SW)
init_rotary_sw();
#endif
#if defined(PCBHORUS)
if (!IS_FIRMWARE_COMPATIBLE_WITH_BOARD()) {
runFatalErrorScreen(STR_WRONG_PCBREV);
+1 -1
View File
@@ -77,7 +77,7 @@ bool isFileAvailable(const char * path, bool exclDir)
FILINFO fno;
return (f_stat(path, &fno) == FR_OK && !(fno.fattrib & AM_DIR));
}
return f_stat(path, 0) == FR_OK;
return f_stat(path, nullptr) == FR_OK;
}
/**
-1
View File
@@ -343,7 +343,6 @@ extern uint32_t powerupReason;
#define DIRTY_SHUTDOWN 0xCAFEDEAD
#define NORMAL_POWER_OFF ~DIRTY_SHUTDOWN
#define wdt_disable()
void watchdogInit(unsigned int duration);
#if defined(SIMU)
#define WAS_RESET_BY_WATCHDOG() (false)
+2
View File
@@ -401,6 +401,8 @@ void boardInit()
rotaryEncoderInit();
#endif
lcdInit();
init_SDcard();
}
#else
-2
View File
@@ -254,11 +254,9 @@ extern "C" {
// WDT driver
#if defined(WATCHDOG_DISABLED) || defined(SIMU)
#define wdt_disable()
#define wdt_enable(x)
#define wdt_reset()
#else
#define wdt_disable()
#define wdt_enable(x) WDT->WDT_MR = 0x3FFF207F
#define wdt_reset() WDT->WDT_CR = 0xA5000001
#endif
+1 -1
View File
@@ -206,7 +206,7 @@ void boardInit()
#if LCD_DEPTH > 1
lcdDrawBitmap(76, 2, bmp_startup, index*60, 60);
#else
for(uint8_t i= 0; i < 4; i++) {
for(uint8_t i = 0; i < 4; i++) {
if (index >= i) {
lcdDrawFilledRect(LCD_W / 2 - 18 + 10 * i, LCD_H / 2 - 3, 6, 6, SOLID, 0);
}
-1
View File
@@ -502,7 +502,6 @@ uint32_t readTrims(void);
#define wdt_enable(x) watchdogInit(x)
#define wdt_reset() IWDG->KR = 0xAAAA
#endif
#define wdt_disable()
void watchdogInit(unsigned int duration);
#define WAS_RESET_BY_SOFTWARE() (RCC->CSR & RCC_CSR_SFTRSTF)
#define WAS_RESET_BY_WATCHDOG() (RCC->CSR & (RCC_CSR_WDGRSTF | RCC_CSR_WWDGRSTF))