Mercurial > public > hwos_code
diff src/menu_tree.asm @ 63:5c4d4a42e7a0
allow logbook erase from reset menu
author | heinrichsweikamp |
---|---|
date | Thu, 19 Dec 2013 22:12:29 +0100 |
parents | ec4d8503ec45 |
children | 40a5cc0664ed |
line wrap: on
line diff
--- a/src/menu_tree.asm Wed Dec 04 17:17:55 2013 +0100 +++ b/src/menu_tree.asm Thu Dec 19 22:12:29 2013 +0100 @@ -276,11 +276,12 @@ ; Reset and confirmation menu. do_reset_menu: - MENU_BEGIN tResetMenu, .5 + MENU_BEGIN tResetMenu, .6 MENU_CALL tExit, do_return_settings MENU_CALL tReboot, do_reset_menu2 ; Confirm MENU_CALL tResetDeco, do_reset_menu3 ; Confirm MENU_CALL tResetSettings, do_reset_menu4 ; Confirm + MENU_CALL tResetLogbook, do_reset_menu5 ; Confirm MENU_CALL tResetBattery, new_battery_menu ; New Battery submenu MENU_END @@ -302,6 +303,21 @@ MENU_CALL tResetSettings, do_reset_settings ; Reset all settings MENU_END +do_reset_menu5: + MENU_BEGIN tResetMenu2, .2 + MENU_CALL tAbort, do_continue_menu_3stack + MENU_CALL tResetLogbook, do_reset_logbook ; Reset logbook + MENU_END + +do_reset_logbook: + clrf EEADRH ; Make sure to select eeprom bank 0 + clrf EEDATA + write_int_eeprom .4 + write_int_eeprom .5 + write_int_eeprom .6 ; Reset logbook pointers + call ext_flash_erase_logbook ; And complete logbook (!) + goto do_continue_main_menu ; back to menu + do_reset_deco: movlw d'79' ; 79% N2