diff src/tft_outputs.asm @ 90:3274e87fd027

NEW: automatic compass gain makes calibration quicker
author heinrichsweikamp
date Tue, 15 Apr 2014 14:40:49 +0200
parents 2a992aba61ef
children f2201aa374db
line wrap: on
line diff
--- a/src/tft_outputs.asm	Tue Apr 15 12:16:28 2014 +0200
+++ b/src/tft_outputs.asm	Tue Apr 15 14:40:49 2014 +0200
@@ -1140,6 +1140,20 @@
 	STRCAT_PRINT "  "
     return
 
+    global  TFT_compass_show_gain
+TFT_compass_show_gain:       ; Show the current compass gain
+    movff   opt_compass_gain,lo    ; 0-7 (230LSB/Gauss to 1370LSB/Gaus)
+    tstfsz  lo
+    return                         ; Do not show unless gain=0
+	WIN_TINY	.20,.68
+    STRCPY_TEXT  tCompassGain
+    movff   opt_compass_gain,lo    ; 0-7 (230LSB/Gauss to 1370LSB/Gaus)
+    bsf     leftbind
+    output_8
+    bcf     leftbind
+    STRCAT_PRINT "!"
+    return
+
 	global	TFT_update_raw_data
 TFT_update_raw_data:
     call	TFT_standard_color