comparison src/testmode.asm @ 94:f2201aa374db

BUGFIX: compass calibration does now timeout automatically after 60s BUGFIX: decoplan re-calculation in bailout case
author heinrichsweikamp
date Tue, 22 Apr 2014 12:59:14 +0200
parents 917393caf559
children e3ac5b2021bc
comparison
equal deleted inserted replaced
93:5e1ef9bf32ec 94:f2201aa374db
176 STRCPY_TEXT_PRINT tCompassMenu 176 STRCPY_TEXT_PRINT tCompassMenu
177 btfss switch_right2 ; wait until button is released 177 btfss switch_right2 ; wait until button is released
178 bra $-4 178 bra $-4
179 179
180 call TFT_standard_color 180 call TFT_standard_color
181 WIN_SMALL .0,.215 181 ; WIN_SMALL .0,.215
182 STRCPY_TEXT_PRINT tExit 182 ; STRCPY_TEXT_PRINT tExit
183 WAITMS d'255' 183 WAITMS d'255'
184 WAITMS d'255' 184 WAITMS d'255'
185 movlw .8 ; Gain init 185 movlw .7 ; Gain init
186 movff WREG,opt_compass_gain 186 movff WREG,opt_compass_gain
187 compass_calibration_gainset: ; Reduce the gain, set bank here! 187 compass_calibration_gainset: ; Reduce the gain, set bank here!
188 banksel opt_compass_gain 188 banksel opt_compass_gain
189 decf opt_compass_gain,F ; Reduce by one 189 decf opt_compass_gain,F ; Reduce by one
190 btfsc STATUS,N ; <0? 190 btfsc STATUS,N ; <0?
290 call TFT_compass_fast ; show values 290 call TFT_compass_fast ; show values
291 291
292 btfsc sleepmode ; Sleepmode active? 292 btfsc sleepmode ; Sleepmode active?
293 bra compass_calibration_exit ; Yes, exit 293 bra compass_calibration_exit ; Yes, exit
294 294
295 btfsc switch_left ; Button pressed? 295 ; btfsc switch_left ; Button pressed?
296 bra compass_calibration_exit ; Yes, exit 296 ; bra compass_calibration_exit ; Yes, exit
297 297
298 btfss onesecupdate ; do every second tasks? 298 btfss onesecupdate ; do every second tasks?
299 bra compass_calibration_loop2 ; no, loop here 299 bra compass_calibration_loop2 ; no, loop here
300 300
301 movlw .240 301 movlw .60
302 call timeout_testmode ; check timeout 302 call timeout_testmode ; check timeout
303 movlw .60
304 call TFT_show_timeout_testmode ; Show the timeout
305
303 bcf onesecupdate ; clear flag 306 bcf onesecupdate ; clear flag
304 307
305 bra compass_calibration_loop2 ; loop here 308 bra compass_calibration_loop2 ; loop here
306 309
307 compass_calibration_exit: 310 compass_calibration_exit: