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
|
#ifdef SIMU
|
||||||
printf("testFunc\n"); fflush(stdout);
|
printf("testFunc\n"); fflush(stdout);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// for testing the WD reset uncomment the following line
|
||||||
|
// while (1);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -190,17 +190,19 @@ enum MenuRadioVersionItems
|
||||||
ITEM_RADIO_VERSION_COUNT
|
ITEM_RADIO_VERSION_COUNT
|
||||||
};
|
};
|
||||||
|
|
||||||
void menuRadioVersion(event_t event)
|
|
||||||
{
|
|
||||||
#if defined(EEPROM_RLC)
|
#if defined(EEPROM_RLC)
|
||||||
if (warningResult) {
|
void onFactoryResetConfirm(const char * result)
|
||||||
warningResult = 0;
|
{
|
||||||
|
if (result == STR_OK) {
|
||||||
showMessageBox(STR_STORAGE_FORMAT);
|
showMessageBox(STR_STORAGE_FORMAT);
|
||||||
storageEraseAll(false);
|
storageEraseAll(false);
|
||||||
NVIC_SystemReset();
|
NVIC_SystemReset();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
void menuRadioVersion(event_t event)
|
||||||
|
{
|
||||||
SIMPLE_MENU(STR_MENUVERSION, menuTabGeneral, MENU_RADIO_VERSION, ITEM_RADIO_VERSION_COUNT);
|
SIMPLE_MENU(STR_MENUVERSION, menuTabGeneral, MENU_RADIO_VERSION, ITEM_RADIO_VERSION_COUNT);
|
||||||
|
|
||||||
coord_t y = MENU_HEADER_HEIGHT + 1;
|
coord_t y = MENU_HEADER_HEIGHT + 1;
|
||||||
|
@ -240,7 +242,7 @@ void menuRadioVersion(event_t event)
|
||||||
// y += FH;
|
// y += FH;
|
||||||
if (menuVerticalPosition == ITEM_RADIO_FACTORY_RESET && event == EVT_KEY_BREAK(KEY_ENTER)) {
|
if (menuVerticalPosition == ITEM_RADIO_FACTORY_RESET && event == EVT_KEY_BREAK(KEY_ENTER)) {
|
||||||
s_editMode = EDIT_SELECT_FIELD;
|
s_editMode = EDIT_SELECT_FIELD;
|
||||||
POPUP_CONFIRMATION(STR_CONFIRMRESET, nullptr);
|
POPUP_CONFIRMATION(STR_CONFIRMRESET, onFactoryResetConfirm);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
#include "bin_files.h"
|
#include "bin_files.h"
|
||||||
|
|
||||||
#if defined(PCBXLITE)
|
#if defined(PCBXLITE)
|
||||||
#define BOOTLOADER_KEYS 0x0f
|
#define BOOTLOADER_KEYS 0x0F
|
||||||
#else
|
#else
|
||||||
#define BOOTLOADER_KEYS 0x42
|
#define BOOTLOADER_KEYS 0x42
|
||||||
#endif
|
#endif
|
||||||
|
@ -206,6 +206,7 @@ int main()
|
||||||
uint32_t nameCount = 0;
|
uint32_t nameCount = 0;
|
||||||
|
|
||||||
wdt_reset();
|
wdt_reset();
|
||||||
|
|
||||||
RCC_AHB1PeriphClockCmd(PWR_RCC_AHB1Periph | KEYS_RCC_AHB1Periph |
|
RCC_AHB1PeriphClockCmd(PWR_RCC_AHB1Periph | KEYS_RCC_AHB1Periph |
|
||||||
LCD_RCC_AHB1Periph | BACKLIGHT_RCC_AHB1Periph |
|
LCD_RCC_AHB1Periph | BACKLIGHT_RCC_AHB1Periph |
|
||||||
SERIAL_RCC_AHB1Periph | I2C_RCC_AHB1Periph |
|
SERIAL_RCC_AHB1Periph | I2C_RCC_AHB1Periph |
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue