diff code_part1/OSTC_code_asm_part1/divemode.asm @ 780:de7fa2316913

add simple gas change countdown
author heinrichsweikamp
date Mon, 26 May 2014 23:15:59 +0200
parents 5760f2b689c5
children 53425d598585
line wrap: on
line diff
--- a/code_part1/OSTC_code_asm_part1/divemode.asm	Mon May 26 20:17:25 2014 +0200
+++ b/code_part1/OSTC_code_asm_part1/divemode.asm	Mon May 26 23:15:59 2014 +0200
@@ -52,6 +52,9 @@
 
 ; Startup Tasks for deco modes
 	call	DISP_display_ndl_mask		; display "no stop" if not in gauge or apnoe mode
+    GETCUSTOM8  d'55'
+    movwf   apnoe_surface_mins
+    clrf    apnoe_surface_secs
 
 	btfss	FLAG_const_ppO2_mode		; only in const_ppO2_mode
 	bra		diveloop_loop				; OC modes, skip
@@ -84,6 +87,8 @@
 diveloop_loop1z:
 	bcf		update_divetime				; clear flag
 
+    call    DISP_show_gas_change_countdown  ; Show the gas change countdown (If required)
+
 	btfsc	FLAG_const_ppO2_mode			; only in const_ppO2_mode
 	bra		diveloop_loop1c					; One Second Tasks in const_ppO2 mode
 
@@ -2014,7 +2019,6 @@
 	movwf	apnoe_max_pressure+0
 	clrf	apnoe_max_pressure+1
 	clrf	apnoe_surface_mins			
-	clrf	apnoe_surface_secs		
 	clrf	apnoe_mins
 	clrf	apnoe_secs
 	clrf	divemins+0
@@ -2057,6 +2061,7 @@
     bcf     tts_extra_time              ;=1: Compute TTS if extra time spent at current depth
 	bcf		show_safety_stop			;=1: Show the safety stop
 	clrf	safety_stop_countdown		; Clear count-down
+    bcf     gaschange_cnt_active        ; Do not show the countdown on start
 
 	call	get_free_EEPROM_location	; get last position in external EEPROM, may be up to 2 secs!