changeset 254:8f20e8948b97

working word-around for nofly issue
author heinrichsweikamp
date Fri, 08 Apr 2011 11:58:55 +0200
parents 3a4096f32526
children 1efd59d689f8
files code_part1/OSTC_code_asm_part1/definitions.asm code_part1/OSTC_code_asm_part1/divemode.asm code_part1/OSTC_code_asm_part1/pled_outputs.asm code_part1/OSTC_code_asm_part1/surfmode.asm
diffstat 4 files changed, 12 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/code_part1/OSTC_code_asm_part1/definitions.asm	Sun Apr 03 11:46:06 2011 +0200
+++ b/code_part1/OSTC_code_asm_part1/definitions.asm	Fri Apr 08 11:58:55 2011 +0200
@@ -331,6 +331,7 @@
 convert_value_temp      res 3   ; used in menu_battery_state_convert_date
 time_correction_value   res 1   ; Adds to Seconds on midnight
 sorted_gaslist_active	res 1	; Holds flags for active gases for the sorted list
+desaturation_time_buffer res 2	; buffer for desat time
 
 ;=============================================================================
 ; C-code Routines
--- a/code_part1/OSTC_code_asm_part1/divemode.asm	Sun Apr 03 11:46:06 2011 +0200
+++ b/code_part1/OSTC_code_asm_part1/divemode.asm	Fri Apr 08 11:58:55 2011 +0200
@@ -1049,6 +1049,7 @@
 	ostc_debug	'G'		; Sends debug-information to screen if debugmode active
 	call	deco_calc_desaturation_time ; calculate desaturation time
 	movlb	b'00000001'                 ; select ram bank 1
+call	calc_deko_surfmode			; work-around for nofly bug
 	rcall	calculate_noflytime         ; Calc NoFly time
 	ostc_debug	'H'                     ; Sends debug-information to screen if debugmode active
 										; store header and ...
--- a/code_part1/OSTC_code_asm_part1/pled_outputs.asm	Sun Apr 03 11:46:06 2011 +0200
+++ b/code_part1/OSTC_code_asm_part1/pled_outputs.asm	Fri Apr 08 11:58:55 2011 +0200
@@ -1695,8 +1695,11 @@
 	lfsr	FSR2,letter
 	OUTPUTTEXT	d'14'				; Desat
 	PUTC    ' '
-	movff		int_O_desaturation_time+0,lo			; divide by 60...
-	movff		int_O_desaturation_time+1,hi
+;	movff		int_O_desaturation_time+0,lo			; divide by 60...
+;	movff		int_O_desaturation_time+1,hi
+movff		desaturation_time_buffer+0,lo			; divide by 60...
+movff		desaturation_time_buffer+1,hi
+
 	call		convert_time				; converts hi:lo in minutes to hours (hi) and minutes (lo)
 	bsf			leftbind
 	movf		lo,W
--- a/code_part1/OSTC_code_asm_part1/surfmode.asm	Sun Apr 03 11:46:06 2011 +0200
+++ b/code_part1/OSTC_code_asm_part1/surfmode.asm	Fri Apr 08 11:58:55 2011 +0200
@@ -1,4 +1,4 @@
-
+f
 ; OSTC - diving computer code
 ; Copyright (C) 2008 HeinrichsWeikamp GbR
 
@@ -267,7 +267,6 @@
 	return	
 
 calc_deko_surfmode:
-	bsf		LED_red
 	ostc_debug	'I'		; Sends debug-information to screen if debugmode active
 
 	movff	last_surfpressure+0,int_I_pres_surface+0	; copy surface air pressure to deco routine
@@ -288,7 +287,10 @@
 	call	deco_calc_wo_deco_step_1_min    ; calculate deco in surface mode 
 	movlb	b'00000001'									; select ram bank 1
 	ostc_debug	'J'		; Sends debug-information to screen if debugmode active
-	bcf		LED_red
+
+movff	int_O_desaturation_time+0,desaturation_time_buffer+0
+movff	int_O_desaturation_time+1,desaturation_time_buffer+1
+
 	return