diff src/ostc3.inc @ 16:7b06f20881be

calm compass reading for minor heading changes
author heinrichsweikamp
date Sun, 16 Jun 2013 19:14:16 +0200
parents 8185edeeedb2
children 1f096c3d4b27
line wrap: on
line diff
--- a/src/ostc3.inc	Wed Jun 12 18:15:38 2013 +0200
+++ b/src/ostc3.inc	Sun Jun 16 19:14:16 2013 +0200
@@ -19,7 +19,7 @@
 #include <ports.inc>                        ; Portmap
 
 #DEFINE	softwareversion_x		d'0'		; Software version  XX.YY
-#DEFINE	softwareversion_y		d'95'		; Software version  XX.YY
+#DEFINE	softwareversion_y		d'96'		; Software version  XX.YY
 #DEFINE softwareversion_beta 	0 			; (and 0 for release)
 
 #DEFINE comm_service_key        0xABCDEF
@@ -176,6 +176,9 @@
 #DEFINE gaslist_sp_max              .160        ; Max. Setpoint [cbar]
 #DEFINE gaslist_sp_min              .50         ; Min. Setpoint [cbar]
 
+; Compass display
+#DEFINE compass_fast_treshold       .12         ; Faster update if new and old > compass_fast_treshold
+
 ;---------------------------- Macros ------------------------------------
 
 TSTOSS  macro opt_reg           ; TeST Option Skip if not Zero
@@ -274,6 +277,7 @@
 
 ; Compass more data
 compass_heading     res 2       ; Corrected heading (in 1°) : -180 .. 180
+compass_heading_old res 2       ; Old heading (For smoother display)
 compass_roll        res 2       ; Rotation around the X axis
 compass_pitch       res 2       ; Rotation arounf the Y axis
 
@@ -306,6 +310,7 @@
 flag6           		res 1
 flag7           		res 1
 flag8           		res 1
+flag9           		res 1
 
 temp1			res 1
 temp2			res 1
@@ -576,6 +581,8 @@
 #DEFINE comm_service_enabled    flag8,6 ; =1: COMM Service mode unlocked
 #DEFINE compass_enabled         flag8,7 ; =1: The compass and accelerometer chip is active
 
+#DEFINE compass_fast_mode       flag9,0 ; =1: The compass is in fast mode
+
 ;=============================================================================
 ; C-code Routines
 ; PART 2