Factory reset function (manual EEPROM format)

This commit is contained in:
Andre Bernet
2015-03-18 20:23:20 +04:00
parent ce2a278862
commit 827e1e2b43
15 changed files with 54 additions and 15 deletions
+12 -1
View File
@@ -88,12 +88,23 @@ void backupEeprom()
void menuGeneralVersion(uint8_t event)
{
if (s_warning_result) {
s_warning_result = 0;
displayPopup(STR_EEPROMFORMATTING);
eeErase(false);
NVIC_SystemReset();
}
SIMPLE_MENU(STR_MENUVERSION, menuTabGeneral, e_Vers, 1);
lcd_putsLeft(MENU_HEADER_HEIGHT+FH, vers_stamp);
lcd_putsLeft(MENU_HEADER_HEIGHT+6*FH, STR_EEBACKUP);
lcd_putsLeft(MENU_HEADER_HEIGHT+5*FH, STR_EEBACKUP);
lcd_putsLeft(MENU_HEADER_HEIGHT+6*FH, STR_FACTORYRESET);
if (event == EVT_KEY_LONG(KEY_ENTER)) {
backupEeprom();
}
else if (event == EVT_KEY_LONG(KEY_MENU)) {
POPUP_CONFIRMATION(STR_CONFIRMRESET);
}
}