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