mirror of
https://github.com/opentx/opentx.git
synced 2025-07-13 19:40:20 +03:00
Cosmetics
This commit is contained in:
parent
ad555855c2
commit
765b17f36b
3 changed files with 14 additions and 8 deletions
|
@ -33,6 +33,9 @@ void testFunc()
|
|||
#ifdef SIMU
|
||||
printf("testFunc\n"); fflush(stdout);
|
||||
#endif
|
||||
|
||||
// for testing the WD reset uncomment the following line
|
||||
// while (1);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -190,17 +190,19 @@ enum MenuRadioVersionItems
|
|||
ITEM_RADIO_VERSION_COUNT
|
||||
};
|
||||
|
||||
void menuRadioVersion(event_t event)
|
||||
{
|
||||
#if defined(EEPROM_RLC)
|
||||
if (warningResult) {
|
||||
warningResult = 0;
|
||||
void onFactoryResetConfirm(const char * result)
|
||||
{
|
||||
if (result == STR_OK) {
|
||||
showMessageBox(STR_STORAGE_FORMAT);
|
||||
storageEraseAll(false);
|
||||
NVIC_SystemReset();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void menuRadioVersion(event_t event)
|
||||
{
|
||||
SIMPLE_MENU(STR_MENUVERSION, menuTabGeneral, MENU_RADIO_VERSION, ITEM_RADIO_VERSION_COUNT);
|
||||
|
||||
coord_t y = MENU_HEADER_HEIGHT + 1;
|
||||
|
@ -240,7 +242,7 @@ void menuRadioVersion(event_t event)
|
|||
// y += FH;
|
||||
if (menuVerticalPosition == ITEM_RADIO_FACTORY_RESET && event == EVT_KEY_BREAK(KEY_ENTER)) {
|
||||
s_editMode = EDIT_SELECT_FIELD;
|
||||
POPUP_CONFIRMATION(STR_CONFIRMRESET, nullptr);
|
||||
POPUP_CONFIRMATION(STR_CONFIRMRESET, onFactoryResetConfirm);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#include "bin_files.h"
|
||||
|
||||
#if defined(PCBXLITE)
|
||||
#define BOOTLOADER_KEYS 0x0f
|
||||
#define BOOTLOADER_KEYS 0x0F
|
||||
#else
|
||||
#define BOOTLOADER_KEYS 0x42
|
||||
#endif
|
||||
|
@ -206,6 +206,7 @@ int main()
|
|||
uint32_t nameCount = 0;
|
||||
|
||||
wdt_reset();
|
||||
|
||||
RCC_AHB1PeriphClockCmd(PWR_RCC_AHB1Periph | KEYS_RCC_AHB1Periph |
|
||||
LCD_RCC_AHB1Periph | BACKLIGHT_RCC_AHB1Periph |
|
||||
SERIAL_RCC_AHB1Periph | I2C_RCC_AHB1Periph |
|
||||
|
@ -227,8 +228,8 @@ int main()
|
|||
|
||||
// LHR & RHL trims not pressed simultanously
|
||||
if (readTrims() != BOOTLOADER_KEYS) {
|
||||
// Start main application
|
||||
jumpTo(APP_START_ADDRESS);
|
||||
// Start main application
|
||||
jumpTo(APP_START_ADDRESS);
|
||||
}
|
||||
|
||||
pwrInit();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue