changeset 411:e6e1b89b7c3e

BUGFIX: CNS was not cleared with a "Reset Deco"
author heinrichsweikamp
date Tue, 12 Jul 2011 20:21:57 +0200
parents c6f9eb123b85
children b2c9cc018671
files code_part1/OSTC_code_asm_part1/menu_reset.asm code_part1/OSTC_code_asm_part1/oled_samsung.asm code_part1/OSTC_code_asm_part1/start.asm
diffstat 3 files changed, 17 insertions(+), 5 deletions(-) [+]
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 !
--- a/code_part1/OSTC_code_asm_part1/oled_samsung.asm	Mon Jul 11 16:04:35 2011 +0200
+++ b/code_part1/OSTC_code_asm_part1/oled_samsung.asm	Tue Jul 12 20:21:57 2011 +0200
@@ -617,6 +617,9 @@
 
 	bsf		oled_hv
 	WAITMS	d'32'
+	bsf		oled_hv
+	WAITMS	d'32'
+	bsf		oled_hv
 
 	movlw	0x05
 	rcall	PLED_CmdWrite
--- a/code_part1/OSTC_code_asm_part1/start.asm	Mon Jul 11 16:04:35 2011 +0200
+++ b/code_part1/OSTC_code_asm_part1/start.asm	Tue Jul 12 20:21:57 2011 +0200
@@ -221,7 +221,7 @@
 	bra		restart_1				; No new CF, continue with boot
 restart_01:
 ; Save new number of current CF count
-	call	PLED_boot                   ; PLED boot (Incl. Clear Screen!)
+	call	PLED_boot               ; PLED boot (Incl. Clear Screen!)
 	rcall	display_new_cf_installed; Show warning
 	movlw	max_custom_number		; Defined in definitions.asm
 	movwf	EEDATA