1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-13 19:40:20 +03:00

Cosmetics

This commit is contained in:
Bertrand Songis 2019-04-17 16:28:02 +02:00
parent ad555855c2
commit 765b17f36b
3 changed files with 14 additions and 8 deletions

View file

@ -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

View file

@ -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
}

View file

@ -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 |