Mercurial > public > hwos_code
diff src/divemode.asm @ 376:e99bb91f6f92
CHANGE: Do not show ppO2 in warning area if already shown in custom view
BUGFIX: Logbook list view for more then 100 stored dives
author | heinrichsweikamp |
---|---|
date | Mon, 07 Sep 2015 13:58:23 +0200 |
parents | 5c6da9fa5cb0 |
children | 6f3530eb48f9 |
line wrap: on
line diff
--- a/src/divemode.asm Thu Aug 27 17:05:13 2015 +0200 +++ b/src/divemode.asm Mon Sep 07 13:58:23 2015 +0200 @@ -1635,8 +1635,7 @@ btfsc neg_flag bra check_ppO2_0 ; Not too low ; ppO2 low - incf warning_counter,F ; increase counter - call TFT_display_ppo2 ; Show ppO2 + rcall check_ppo2_display ; display if not already shown in custom view movlw d'4' ; Type of Alarm (ppO2 low) movwf AlarmType ; Copy to Alarm Register bsf event_occured ; Set Event Flag @@ -1655,8 +1654,7 @@ btfss neg_flag return ; No Display, no warning ; Display ppO2, but warn? - incf warning_counter,F ; increase counter - call TFT_display_ppo2 ; Show ppO2 + rcall check_ppo2_display ; display if not already shown in custom view ;check if we are within our warning thresholds! movff xC+0,sub_b+0 @@ -1676,14 +1674,24 @@ return ; Done. check_ppO2_1: ; ppO2 very high - incf warning_counter,F ; increase counter - call TFT_display_ppo2 ; Show ppO2 + rcall check_ppo2_display ; display if not already shown in custom view movlw d'5' ; Type of Alarm movwf AlarmType ; Copy to Alarm Register bsf event_occured ; Set Event Flag bsf warning_active ; Set Warning flag return ; Done. +check_ppo2_display: + movlw .9 + cpfseq menupos3 ; ppO2 shown in Custom View? + bra check_ppO2_a ; No + return ; Yes, do not show twice (in custom view and in warning area) +check_ppO2_a: + incf warning_counter,F ; increase counter + call TFT_display_ppo2 ; Show ppO2 + return + + global check_cns_violation check_cns_violation: ; Check if CNS should be displayed