comparison 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
comparison
equal deleted inserted replaced
61:d3b494119c98 63:5c4d4a42e7a0
274 274
275 ;============================================================================= 275 ;=============================================================================
276 ; Reset and confirmation menu. 276 ; Reset and confirmation menu.
277 277
278 do_reset_menu: 278 do_reset_menu:
279 MENU_BEGIN tResetMenu, .5 279 MENU_BEGIN tResetMenu, .6
280 MENU_CALL tExit, do_return_settings 280 MENU_CALL tExit, do_return_settings
281 MENU_CALL tReboot, do_reset_menu2 ; Confirm 281 MENU_CALL tReboot, do_reset_menu2 ; Confirm
282 MENU_CALL tResetDeco, do_reset_menu3 ; Confirm 282 MENU_CALL tResetDeco, do_reset_menu3 ; Confirm
283 MENU_CALL tResetSettings, do_reset_menu4 ; Confirm 283 MENU_CALL tResetSettings, do_reset_menu4 ; Confirm
284 MENU_CALL tResetLogbook, do_reset_menu5 ; Confirm
284 MENU_CALL tResetBattery, new_battery_menu ; New Battery submenu 285 MENU_CALL tResetBattery, new_battery_menu ; New Battery submenu
285 MENU_END 286 MENU_END
286 287
287 do_reset_menu2: 288 do_reset_menu2:
288 MENU_BEGIN tResetMenu2, .2 289 MENU_BEGIN tResetMenu2, .2
299 do_reset_menu4: 300 do_reset_menu4:
300 MENU_BEGIN tResetMenu2, .2 301 MENU_BEGIN tResetMenu2, .2
301 MENU_CALL tAbort, do_continue_menu_3stack 302 MENU_CALL tAbort, do_continue_menu_3stack
302 MENU_CALL tResetSettings, do_reset_settings ; Reset all settings 303 MENU_CALL tResetSettings, do_reset_settings ; Reset all settings
303 MENU_END 304 MENU_END
305
306 do_reset_menu5:
307 MENU_BEGIN tResetMenu2, .2
308 MENU_CALL tAbort, do_continue_menu_3stack
309 MENU_CALL tResetLogbook, do_reset_logbook ; Reset logbook
310 MENU_END
311
312 do_reset_logbook:
313 clrf EEADRH ; Make sure to select eeprom bank 0
314 clrf EEDATA
315 write_int_eeprom .4
316 write_int_eeprom .5
317 write_int_eeprom .6 ; Reset logbook pointers
318 call ext_flash_erase_logbook ; And complete logbook (!)
319 goto do_continue_main_menu ; back to menu
304 320
305 321
306 do_reset_deco: 322 do_reset_deco:
307 movlw d'79' ; 79% N2 323 movlw d'79' ; 79% N2
308 movff WREG,char_I_N2_ratio 324 movff WREG,char_I_N2_ratio