diff code_part1/OSTC_code_asm_part1/surfmode.asm @ 233:2cbaa01dac26

Hunting for NoFly (bug BB13)... not found yet... + In DEBUG compile, keep simulated dives in logbook, desat and nofly time, etc.
author JeanDo
date Tue, 15 Mar 2011 19:16:34 +0100
parents 85ea09d3b9d8
children 3dbeacf42e9e
line wrap: on
line diff
--- a/code_part1/OSTC_code_asm_part1/surfmode.asm	Wed Mar 16 19:03:01 2011 +0100
+++ b/code_part1/OSTC_code_asm_part1/surfmode.asm	Tue Mar 15 19:16:34 2011 +0100
@@ -97,12 +97,13 @@
 	call	PLED_custom_text			; Displays custom text
 	clrf	cf_checker_counter			; next cf to check
 	ostc_debug	'G'						; Sends debug-information to screen if debugmode active
+
+    ; Desaturation time needs:
+    ;   int_I_pres_surface
+    ;   char_I_desaturation_multiplier
 	GETCUSTOM8	d'12'					; Desaturation multiplier %
-	movwf	wait_temp
-	movff	wait_temp,char_I_desaturation_multiplier
-	GETCUSTOM8	d'11'					; Saturation multiplier %
-	movwf	wait_temp
-	movff	wait_temp,char_I_saturation_multiplier
+	movff	WREG,char_I_desaturation_multiplier
+
 	call	deco_calc_desaturation_time ; calculate desaturation time
 	movlb	b'00000001'					; select ram bank 1
 	ostc_debug	'H'						; Sends debug-information to screen if debugmode active
@@ -119,7 +120,6 @@
 
 	bra		surfloop_loop1				; Do not search for sensor in CC mode
 
-
 surfloop_loop1:
 ; One Second tasks for all modes
 	call	PLED_clock					; update clock