changeset 793:55bd11e07d9f

BUGFIX: Surface interval was paused during simulator
author heinrichsweikamp
date Sun, 28 Sep 2014 20:56:16 +0200
parents 19aec5caa759
children e8af55eb83cb
files code_part1/OSTC_code_asm_part1/changelog.txt code_part1/OSTC_code_asm_part1/divemode.asm
diffstat 2 files changed, 9 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/code_part1/OSTC_code_asm_part1/changelog.txt	Fri Aug 29 10:35:26 2014 +0200
+++ b/code_part1/OSTC_code_asm_part1/changelog.txt	Sun Sep 28 20:56:16 2014 +0200
@@ -1,5 +1,6 @@
 New in 2.95:
 BETA Version
+BUGFIX: Surface interval was paused during simulator
 
 New in 2.94:
 BETA Version
--- a/code_part1/OSTC_code_asm_part1/divemode.asm	Fri Aug 29 10:35:26 2014 +0200
+++ b/code_part1/OSTC_code_asm_part1/divemode.asm	Sun Sep 28 20:56:16 2014 +0200
@@ -1302,7 +1302,7 @@
 ; In DEBUG compile, keep all simulated dives in logbook, Desat time, nofly, etc...
     ifndef __DEBUG
     	btfsc	simulatormode_active		; Are we in simulator mode?
-    	goto	end_dive_common				; Yes, discard everything
+    	goto	end_dive_common_sim         ; Yes, discard everything
     endif
 
 	; Dive finished (and longer then one minute or Apnoe timeout occured)
@@ -1682,6 +1682,13 @@
 
 	goto	surfloop_no_display_init	; and return to surfaceloop
 
+end_dive_common_sim:
+    movf    divemins+0,W
+    addwf   surface_interval+0,F
+    movf    divemins+1,W
+	addwfc  surface_interval+1				; Add simulated divetime to surface interval
+    bra     end_dive_common
+
 timeout_divemode:
 	btfss	realdive					; Dive longer then one minute
 	return