Mercurial > public > hwos_code
comparison src/menu_tree.asm @ 524:d2e52e6e1604
menu work
author | heinrichsweikamp |
---|---|
date | Sat, 05 Aug 2017 10:58:40 +0200 |
parents | 8e75aecb3290 |
children | 08d7eb26665c |
comparison
equal
deleted
inserted
replaced
523:8e75aecb3290 | 524:d2e52e6e1604 |
---|---|
129 | 129 |
130 do_calibrate_mix: | 130 do_calibrate_mix: |
131 extern calibrate_mix | 131 extern calibrate_mix |
132 call calibrate_mix ; Calibrate with opt_calibration_O2_ratio, also calibrate S8 HUD if connected | 132 call calibrate_mix ; Calibrate with opt_calibration_O2_ratio, also calibrate S8 HUD if connected |
133 WAITMS d'250' ; Wait for HUD v3 | 133 WAITMS d'250' ; Wait for HUD v3 |
134 goto restart ; Restart into surface mode | 134 goto restart ; Restart into surface mode |
135 | 135 |
136 do_ccr_sensor: | 136 do_ccr_sensor: |
137 call enable_ir_s8 ; Enable IR/S8-Port | 137 call enable_ir_s8 ; Enable IR/S8-Port |
138 bsf menu_show_sensors ; Set flag | 138 bsf menu_show_sensors ; Set flag |
139 MENU_BEGIN tCCRSensor, .5 | 139 MENU_BEGIN tCCRSensor, .5 |
241 movff PLUSW1,lo ; Used as temp | 241 movff PLUSW1,lo ; Used as temp |
242 movlw .3 ; 3=Deco | 242 movlw .3 ; 3=Deco |
243 btfsc ccr_diluent_setup ; =1: Setting up Diluents ("Gas6-10") | 243 btfsc ccr_diluent_setup ; =1: Setting up Diluents ("Gas6-10") |
244 movlw .2 ; 2=Normal | 244 movlw .2 ; 2=Normal |
245 cpfseq lo | 245 cpfseq lo |
246 bra do_edit_gas_menu_1 ; Non-Deco gas or "Normal" Diluent, Return! | 246 bra return_gas_depth ; Non-Deco gas or "Normal" Diluent, Return! |
247 | 247 |
248 MENU_BEGIN tGasEdit, .7 | 248 MENU_BEGIN tGasEdit, .7 |
249 MENU_DYNAMIC gaslist_gastitle, 0 | 249 MENU_DYNAMIC gaslist_gastitle, 0 |
250 MENU_DYNAMIC gaslist_MOD_END, 0 | 250 MENU_DYNAMIC gaslist_MOD_END, 0 |
251 MENU_DYNAMIC gaslist_ppo2, 0 ; ppO2 at change depth | 251 MENU_DYNAMIC gaslist_ppo2, 0 ; ppO2 at change depth |
270 lfsr FSR0,obottomTime | 270 lfsr FSR0,obottomTime |
271 call option_reset | 271 call option_reset |
272 lfsr FSR0,obottomDepth | 272 lfsr FSR0,obottomDepth |
273 call option_reset | 273 call option_reset |
274 | 274 |
275 do_planner_menu_1: | |
276 rcall menu_tree_double_pop ; R.L. | |
277 do_planner_menu: | 275 do_planner_menu: |
278 extern do_demo_planner | 276 extern do_demo_planner |
279 MENU_BEGIN tPlan, .7 | 277 MENU_BEGIN tPlan, .7 |
280 MENU_CALL tInter, do_demo_divemode | 278 MENU_CALL tInter, do_demo_divemode |
281 MENU_OPTION tIntvl, odiveInterval, 0 | 279 MENU_OPTION tIntvl, odiveInterval, 0 |
288 | 286 |
289 do_planner_config: | 287 do_planner_config: |
290 MENU_BEGIN tPlan, .3 | 288 MENU_BEGIN tPlan, .3 |
291 MENU_OPTION tSetBotUse, obottom_usage, 0 | 289 MENU_OPTION tSetBotUse, obottom_usage, 0 |
292 MENU_OPTION tSetDecoUse, odeco_usage, 0 | 290 MENU_OPTION tSetDecoUse, odeco_usage, 0 |
293 MENU_CALL tExit, do_planner_menu_1 | 291 MENU_CALL tExit, do_planner_menu |
294 MENU_END | 292 MENU_END |
295 | 293 |
296 | 294 |
297 ;============================================================================= | 295 ;============================================================================= |
298 ; Divemode menu | 296 ; Divemode menu |
299 | 297 |
300 do_return_divemode_menu: | 298 do_return_divemode_menu: |
391 | 389 |
392 do_settings_menu_more_piezo_exit: | 390 do_settings_menu_more_piezo_exit: |
393 call TFT_ClearScreen | 391 call TFT_ClearScreen |
394 extern piezo_config | 392 extern piezo_config |
395 call piezo_config ; Configure buttons | 393 call piezo_config ; Configure buttons |
396 ; bra do_settings_menu_more_piezo | 394 |
397 do_settings_menu_more_piezo: | 395 do_settings_menu_more_piezo: |
398 MENU_BEGIN tSystSets, .7 | 396 MENU_BEGIN tSystSets, .7 |
399 MENU_CALL tCompassMenu, do_compass_menu | 397 MENU_CALL tCompassMenu, do_compass_menu |
400 MENU_CALL tLogOffset, do_log_offset_menu | 398 MENU_CALL tLogOffset, do_log_offset_menu |
401 MENU_OPTION tUnits, oUnits, 0 | 399 MENU_OPTION tUnits, oUnits, 0 |
483 write_int_eeprom .3 ; Clear total dives | 481 write_int_eeprom .3 ; Clear total dives |
484 write_int_eeprom .4 | 482 write_int_eeprom .4 |
485 write_int_eeprom .5 | 483 write_int_eeprom .5 |
486 write_int_eeprom .6 ; Reset logbook pointers | 484 write_int_eeprom .6 ; Reset logbook pointers |
487 call ext_flash_erase_logbook ; And complete logbook (!) | 485 call ext_flash_erase_logbook ; And complete logbook (!) |
488 goto do_continue_menu_4stack ; back to menu | 486 goto do_continue_main_menu ; back to menu |
489 | 487 |
490 | 488 |
491 do_reset_deco: | 489 do_reset_deco: |
492 movlw d'79' ; 79% N2 | 490 movlw d'79' ; 79% N2 |
493 movff WREG,char_I_N2_ratio | 491 movff WREG,char_I_N2_ratio |
505 banksel common | 503 banksel common |
506 clrf nofly_time+0 ; Reset NoFly | 504 clrf nofly_time+0 ; Reset NoFly |
507 clrf nofly_time+1 | 505 clrf nofly_time+1 |
508 clrf desaturation_time+0 ; Reset Desat | 506 clrf desaturation_time+0 ; Reset Desat |
509 clrf desaturation_time+1 | 507 clrf desaturation_time+1 |
510 goto do_continue_menu_4stack ; back to menu | 508 goto do_return_settings ; back to menu |
511 | 509 |
512 do_reset_settings: | 510 do_reset_settings: |
513 call TFT_ClearScreen ; Clear screen | 511 call TFT_ClearScreen ; Clear screen |
514 banksel common | 512 banksel common |
515 extern option_reset_all | 513 extern option_reset_all |
516 call option_reset_all ; Reset all options to factory default. | 514 call option_reset_all ; Reset all options to factory default. |
517 goto restart ; Restart into surfacemode, to show reset values like gases and deco model to the user | 515 goto restart ; Restart into surfacemode |
518 | 516 |
519 do_continue_menu_4stack: ; Return four levels deep | |
520 call menu_processor_pop | |
521 do_continue_menu_3stack: ; Return three levels deep | 517 do_continue_menu_3stack: ; Return three levels deep |
522 call menu_processor_pop | 518 call menu_processor_pop |
523 goto do_return_settings | 519 goto do_return_settings |
524 | 520 |
525 do_reboot: | 521 do_reboot: |
526 call ext_flash_enable_protection ; Enables write protection | 522 call ext_flash_enable_protection ; Enables write protection |
527 reset | 523 reset |
528 | 524 |