diff src/ghostwriter.asm @ 166:30ebaf72170d

BUGFIX: Flip compass with flipped screen, too BUGFIX: Surface interval was paused during simulator
author heinrichsweikamp
date Sun, 28 Sep 2014 18:44:07 +0200
parents fdd4e30846ae
children 8bcb064b4fb8
line wrap: on
line diff
--- a/src/ghostwriter.asm	Thu Sep 11 15:41:48 2014 +0200
+++ b/src/ghostwriter.asm	Sun Sep 28 18:44:07 2014 +0200
@@ -332,7 +332,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	ghostwriter_end_dive_common				; Yes, discard everything
+    	goto	ghostwriter_end_dive_common_sim		; Yes, discard everything
     endif
 
     btfsc	FLAG_apnoe_mode                         ; In Apnoe mode?
@@ -806,6 +806,13 @@
 	call	update_battery_registers	; update battery registers into EEPROM
 	goto	surfloop					; and return to surfaceloop
 
+ghostwriter_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     ghostwriter_end_dive_common
+
 	global	ghostwriter_short_header
 ghostwriter_short_header:	; Write short header with divenumber into profile memory