diff src/start.asm @ 23:e402813343b6

new option to switch samplingrate between 10s and 2s
author heinrichsweikamp
date Mon, 08 Jul 2013 12:38:16 +0200
parents 79b2084fd75a
children f51caad821b4
line wrap: on
line diff
--- a/src/start.asm	Mon Jul 08 11:37:37 2013 +0200
+++ b/src/start.asm	Mon Jul 08 12:38:16 2013 +0200
@@ -216,10 +216,11 @@
     clrf    STKPTR                  ; Never return from here
 	extern	option_save_all, option_check_all
 
-    call    option_check_all        ; Check all options (and reset if not within their min/max boundaries)
 	btfsc	menubit					; Return from Menu/COMM mode or timeout?
 	call	option_save_all			; Yes, save all settings into EEPROM
 
+    call    option_check_all        ; Check all options (and reset if not within their min/max boundaries)
+
 	clrf	flag1					; clear all flags
 	clrf	flag2
 	clrf	flag3
@@ -230,6 +231,13 @@
     clrf	flag8
     clrf    flag9
 	bsf		tft_is_dimming	; TFT is dimming up (soon), ignore ambient sensor!
+
+    ; Setup sampling rate
+    movlw   .10
+    tstfsz  opt_sampling_rate   ; =1: 2s, =0: 10s
+    movlw   .2
+    movwf   samplingrate
+
 	; Select high altitude (Fly) mode?
 	movff	last_surfpressure_30min+0,sub_b+0
 	movff	last_surfpressure_30min+1,sub_b+1