Mercurial > public > hwos_code
comparison 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 |
comparison
equal
deleted
inserted
replaced
22:e01c39be267c | 23:e402813343b6 |
---|---|
214 global restart | 214 global restart |
215 restart: | 215 restart: |
216 clrf STKPTR ; Never return from here | 216 clrf STKPTR ; Never return from here |
217 extern option_save_all, option_check_all | 217 extern option_save_all, option_check_all |
218 | 218 |
219 call option_check_all ; Check all options (and reset if not within their min/max boundaries) | |
220 btfsc menubit ; Return from Menu/COMM mode or timeout? | 219 btfsc menubit ; Return from Menu/COMM mode or timeout? |
221 call option_save_all ; Yes, save all settings into EEPROM | 220 call option_save_all ; Yes, save all settings into EEPROM |
221 | |
222 call option_check_all ; Check all options (and reset if not within their min/max boundaries) | |
222 | 223 |
223 clrf flag1 ; clear all flags | 224 clrf flag1 ; clear all flags |
224 clrf flag2 | 225 clrf flag2 |
225 clrf flag3 | 226 clrf flag3 |
226 clrf flag4 | 227 clrf flag4 |
228 clrf flag6 | 229 clrf flag6 |
229 clrf flag7 | 230 clrf flag7 |
230 clrf flag8 | 231 clrf flag8 |
231 clrf flag9 | 232 clrf flag9 |
232 bsf tft_is_dimming ; TFT is dimming up (soon), ignore ambient sensor! | 233 bsf tft_is_dimming ; TFT is dimming up (soon), ignore ambient sensor! |
234 | |
235 ; Setup sampling rate | |
236 movlw .10 | |
237 tstfsz opt_sampling_rate ; =1: 2s, =0: 10s | |
238 movlw .2 | |
239 movwf samplingrate | |
240 | |
233 ; Select high altitude (Fly) mode? | 241 ; Select high altitude (Fly) mode? |
234 movff last_surfpressure_30min+0,sub_b+0 | 242 movff last_surfpressure_30min+0,sub_b+0 |
235 movff last_surfpressure_30min+1,sub_b+1 | 243 movff last_surfpressure_30min+1,sub_b+1 |
236 movlw HIGH high_altitude_threshold | 244 movlw HIGH high_altitude_threshold |
237 movwf sub_a+1 | 245 movwf sub_a+1 |