Mercurial > public > hwos_code
comparison src/start.asm @ 243:ee81f46714cb
auto-select correct settings menu
author | heinrichsweikamp |
---|---|
date | Wed, 04 Mar 2015 16:25:44 +0100 |
parents | e2ea74646127 |
children | afe73e1a0181 |
comparison
equal
deleted
inserted
replaced
242:df8beb913ade | 243:ee81f46714cb |
---|---|
267 | 267 |
268 call lt2942_init ; Yes, init battery gauge IC | 268 call lt2942_init ; Yes, init battery gauge IC |
269 bsf analog_o2_input ; Set flag | 269 bsf analog_o2_input ; Set flag |
270 bcf ambient_sensor ; Clear flag | 270 bcf ambient_sensor ; Clear flag |
271 bcf optical_input ; Clear flag | 271 bcf optical_input ; Clear flag |
272 | |
273 restart2: | 272 restart2: |
273 btfsc vusb_in | |
274 bra restart3 ; USB (and powered on) | |
275 bcf PORTE,0 ; Start comms | |
276 WAITMS d'1' | |
277 btfss vusb_in | |
278 bra restart3 ; USB (and powered off) | |
279 bsf ble_available ; ble available | |
280 restart3: | |
281 bsf PORTE,0 ; Stop comms | |
282 | |
274 ; Select high altitude (Fly) mode? | 283 ; Select high altitude (Fly) mode? |
275 movff last_surfpressure_30min+0,sub_b+0 | 284 movff last_surfpressure_30min+0,sub_b+0 |
276 movff last_surfpressure_30min+1,sub_b+1 | 285 movff last_surfpressure_30min+1,sub_b+1 |
277 movlw HIGH high_altitude_threshold | 286 movlw HIGH high_altitude_threshold |
278 movwf sub_a+1 | 287 movwf sub_a+1 |