changeset 603:530a5c994ca2

remove safety stop when <3m
author heinrichsweikamp
date Mon, 02 Jul 2012 10:40:06 +0200
parents d176f47b24f1
children f8239a6279b8
files code_part1/OSTC_code_asm_part1/definitions.asm code_part1/OSTC_code_asm_part1/divemode.asm
diffstat 2 files changed, 7 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/code_part1/OSTC_code_asm_part1/definitions.asm	Fri Jun 29 08:16:35 2012 +0200
+++ b/code_part1/OSTC_code_asm_part1/definitions.asm	Mon Jul 02 10:40:06 2012 +0200
@@ -65,9 +65,9 @@
 
 ; Safety stop parameters
 #DEFINE	safety_stop_length		.180		; [s]
-#DEFINE	safety_stop_start		.500		; [mbar]
-#DEFINE	safety_stop_end			.300		; [mbar]
-#DEFINE	safety_stop_reset		.1000		; [mbar]
+#DEFINE	safety_stop_start		.510		; [mbar]
+#DEFINE	safety_stop_end			.290		; [mbar]
+#DEFINE	safety_stop_reset		.1010		; [mbar]
 
 ; "Better Gas" behavior
 ; better_gas_window <= minimum_change_depth !
--- a/code_part1/OSTC_code_asm_part1/divemode.asm	Fri Jun 29 08:16:35 2012 +0200
+++ b/code_part1/OSTC_code_asm_part1/divemode.asm	Mon Jul 02 10:40:06 2012 +0200
@@ -395,7 +395,7 @@
 	movwf	sub_b+0
 	movlw	HIGH	safety_stop_reset
 	movwf	sub_b+1	
-	call	sub16							;  sub_c = sub_a - sub_b
+	call	subU16							;  sub_c = sub_a - sub_b
 	btfss	neg_flag
 	bra		reset_safety_stop				; Below 10m, reset safety stop
 
@@ -408,7 +408,7 @@
 	movwf	sub_b+0
 	movlw	HIGH	safety_stop_end
 	movwf	sub_b+1	
-	call	sub16							;  sub_c = sub_a - sub_b
+	call	subU16							;  sub_c = sub_a - sub_b
 	btfsc	neg_flag
 	bra		delete_safety_stop				; Above 3m, remove safety stop
 
@@ -421,7 +421,7 @@
 	movwf	sub_b+0
 	movlw	HIGH	safety_stop_start
 	movwf	sub_b+1	
-	call	sub16							;  sub_c = sub_a - sub_b
+	call	subU16							;  sub_c = sub_a - sub_b
 	btfsc	neg_flag
 	bra		acivate_safety_stop				; Above 5m, activate safety stop
 
@@ -433,9 +433,8 @@
 	return
 
 delete_safety_stop:
-	bcf		show_safety_stop				; Clear flag
 	clrf	safety_stop_countdown			; reset timer
-	return									; Done.
+	bra		reset_safety_stop2				; Remove saftestop from display
 
 reset_safety_stop:
 	movlw	safety_stop_length				;[s]