Mercurial > public > hwos_code
comparison src/divemode.asm @ 98:24b3fd59e61f
add event "bailout" in profile
author | heinrichsweikamp |
---|---|
date | Thu, 01 May 2014 21:16:31 +0200 |
parents | 53a99a2dc6a1 |
children | 87cc1adfe4da |
comparison
equal
deleted
inserted
replaced
97:53a99a2dc6a1 | 98:24b3fd59e61f |
---|---|
766 decf menupos,W ; 1-5 -> 0-4 | 766 decf menupos,W ; 1-5 -> 0-4 |
767 btfsc is_bailout ; Choose OC Bailouts (OC Gases) | 767 btfsc is_bailout ; Choose OC Bailouts (OC Gases) |
768 rcall setup_gas_registers ; With WREG=Gas 0-4 | 768 rcall setup_gas_registers ; With WREG=Gas 0-4 |
769 | 769 |
770 call TFT_active_gas_divemode ; Display gas/Setpoint | 770 call TFT_active_gas_divemode ; Display gas/Setpoint |
771 bsf event_occured ; Set global event byte | |
772 bsf stored_gas_changed ; Set Flag for profile | |
773 bcf divemode_gaschange ; Clear flag | 771 bcf divemode_gaschange ; Clear flag |
774 clrf WREG | 772 clrf WREG |
775 movff WREG,char_O_deco_status ; Restart decoplan computation | 773 movff WREG,char_O_deco_status ; Restart decoplan computation |
774 | |
775 ; Set flags for profile recording | |
776 bsf event_occured ; Set global event byte | |
777 btfsc is_bailout ; Choose OC Bailouts (OC Gases) | |
778 bsf bailoutgas_event ; Bailout gas change | |
779 btfss is_bailout ; Choose OC Bailouts (OC Gases) | |
780 bsf stored_gas_changed ; OC gas change | |
776 return | 781 return |
777 | 782 |
778 global setup_gas_registers | 783 global setup_gas_registers |
779 setup_gas_registers: ; With WREG=Gas 0-4 | 784 setup_gas_registers: ; With WREG=Gas 0-4 |
780 lfsr FSR1,opt_gas_O2_ratio+0 | 785 lfsr FSR1,opt_gas_O2_ratio+0 |
1145 clrf apnoe_timeout_counter ; timeout in minutes | 1150 clrf apnoe_timeout_counter ; timeout in minutes |
1146 clrf timeout_counter ; takes care of the timeout (Low byte) | 1151 clrf timeout_counter ; takes care of the timeout (Low byte) |
1147 clrf timeout_counter2 ; takes care of the timeout (High byte) | 1152 clrf timeout_counter2 ; takes care of the timeout (High byte) |
1148 clrf AlarmType ; Clear all alarms | 1153 clrf AlarmType ; Clear all alarms |
1149 bcf event_occured ; clear flag | 1154 bcf event_occured ; clear flag |
1155 bcf event2_occured ; clear flag | |
1150 clrf total_divetime_seconds+1 | 1156 clrf total_divetime_seconds+1 |
1151 clrf average_depth_hold_total+0 | 1157 clrf average_depth_hold_total+0 |
1152 clrf average_depth_hold_total+1 | 1158 clrf average_depth_hold_total+1 |
1153 clrf average_depth_hold_total+2 | 1159 clrf average_depth_hold_total+2 |
1154 clrf average_depth_hold_total+3 ; Clear Non-Resettable Average | 1160 clrf average_depth_hold_total+3 ; Clear Non-Resettable Average |