diff src/divemode.asm @ 255:ad62dff7739a

add bearing option to compass
author heinrichsweikamp
date Mon, 23 Mar 2015 17:07:57 +0100
parents 5fe7aff622f3
children 5b4ef0b9090d
line wrap: on
line diff
--- a/src/divemode.asm	Fri Mar 20 10:16:49 2015 +0100
+++ b/src/divemode.asm	Mon Mar 23 17:07:57 2015 +0100
@@ -1048,10 +1048,12 @@
 
 divemode_option7:
     ; Store heading for compass view
+    movff   compass_heading_shown+0,compass_bearing+0
+    movff   compass_heading_shown+1,compass_bearing+1
+    bsf     compass_bearing_set         ; set flag
     call    menuview_toggle_reset       ; Done.
     return
 
-
 divemode_simulator_check_limits:
 	; Check limits (150m and 0m)
 	movlw	LOW		d'16000'            ; Compare to 16bar=16000mbar (150m).
@@ -1301,6 +1303,10 @@
 	clrf	WREG
 	movff	WREG,max_pressure+0				; clear some variables
 	movff	WREG,max_pressure+1
+    movff   WREG,compass_bearing+0
+    movff   WREG,compass_bearing+1
+
+    bcf     compass_bearing_set
 
     bcf     use_agf                         ; Start with normal GF set
     bcf     divemode_menu                   ; clear divemode menu flag