diff code_part1/OSTC_code_asm_part1/menu_reset.asm @ 411:e6e1b89b7c3e

BUGFIX: CNS was not cleared with a "Reset Deco"
author heinrichsweikamp
date Tue, 12 Jul 2011 20:21:57 +0200
parents ab962c4b19d6
children b2c9cc018671
line wrap: on
line diff
--- a/code_part1/OSTC_code_asm_part1/menu_reset.asm	Mon Jul 11 16:04:35 2011 +0200
+++ b/code_part1/OSTC_code_asm_part1/menu_reset.asm	Tue Jul 12 20:21:57 2011 +0200
@@ -290,9 +290,14 @@
 ; reset deco data
 	call	PLED_ClearScreen
 	DISPLAYTEXT	.25					; "Reset..."
+
     SAFE_2BYTE_COPY amb_pressure,int_I_pres_respiration	; copy surface air pressure to deco routine
-	call	deco_clear_tissue
-	movlb	b'00000001'				; RAM Bank1 selected
+	call		deco_clear_tissue			; Reset Decodata
+	movlb		b'00000001'						; select ram bank 1
+	call		deco_calc_desaturation_time	; calculate desaturation time
+	movlb		b'00000001'						; select ram bank 1
+	call		deco_clear_CNS_fraction			; clear CNS
+	movlb		b'00000001'						; select ram bank 1
 	goto	restart					; done. quit to surfmode
 
 do_menu_reset_all:
@@ -309,8 +314,12 @@
 reset_start:
 ; reset deco data
     SAFE_2BYTE_COPY amb_pressure,int_I_pres_respiration	; copy surface air pressure to deco routine
-	call	deco_clear_tissue
-	movlb	b'00000001'				; RAM Bank1 selected
+	call		deco_clear_tissue			; Reset Decodata
+	movlb		b'00000001'						; select ram bank 1
+	call		deco_calc_desaturation_time	; calculate desaturation time
+	movlb		b'00000001'						; select ram bank 1
+	call		deco_clear_CNS_fraction			; clear CNS
+	movlb		b'00000001'						; select ram bank 1
 
 ; reset gases
 	clrf	EEADRH					; EEPROM BANK 0 !