Mercurial > public > hwos_code
diff src/divemenu_tree.asm @ 564:54346c651b6a
bring digital S8 HUD back to life...
author | heinrichsweikamp |
---|---|
date | Mon, 05 Feb 2018 17:59:55 +0100 |
parents | b7eb98dbd800 |
children | 2b8ef780cfa8 |
line wrap: on
line diff
--- a/src/divemenu_tree.asm Sat Feb 03 17:02:23 2018 +0100 +++ b/src/divemenu_tree.asm Mon Feb 05 17:59:55 2018 +0100 @@ -135,6 +135,10 @@ do_switch_sensor: ; entry point when coming from switch to sensor movlw .1 ; Switch to Sensor movff WREG,opt_ccr_mode ; =0: Fixed SP (CCR) / calculated (pSCR), =1: Sensor, =2: Auto SP + ; enable all sensors + bsf use_O2_sensor1 + bsf use_O2_sensor2 + bsf use_O2_sensor3 bra do_switch_sp_com ; continue with common part do_switch_sp: ; entry point when coming from manual setpoint selection (CCR) @@ -362,7 +366,7 @@ MENU_BEGIN tGaslist, .6 MENU_CALL tDivemenu_UseSensor, do_switch_sensor MENU_CALL tBack, do_divemode_splist - MENU_CALL tExit, do_continue_main_divemenu + MENU_CALL tExit, do_exit_divemode_menu MENU_CALL tDiveHudMask1, do_toggle_sensor MENU_CALL tDiveHudMask2, do_toggle_sensor MENU_CALL tDiveHudMask3, do_toggle_sensor @@ -381,17 +385,17 @@ MENU_END do_toggle_sensor: + movff menupos,lo ; backup position decf menupos,f ; 4, 5, 6 -> 3, 4, 5 decf menupos,f ; 3, 4, 5 -> 2, 3, 4 decf menupos,f ; 2, 3, 4 -> 1, 2, 3 - dcfsnz menupos ; 1, 2, 3 -> 0, 1, 2 + dcfsnz menupos ; 1, 2, 3 -> 0, 1, 2 btg use_O2_sensor1 ; = dcfsnz menupos ; 0, 1, 2 -> -1, 0, 1 btg use_O2_sensor2 ; = dcfsnz menupos ; -1,0, 1 -> -2,-1, 0 btg use_O2_sensor3 ; = - movlw .1 - movwf menupos + movff lo,menupos ; reload position bra do_divemode_sensor_loop