diff 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
line wrap: on
line diff
--- a/src/start.asm	Tue Mar 03 12:09:24 2015 +0100
+++ b/src/start.asm	Wed Mar 04 16:25:44 2015 +0100
@@ -269,8 +269,17 @@
     bsf     analog_o2_input         ; Set flag
     bcf     ambient_sensor          ; Clear flag
     bcf     optical_input           ; Clear flag
+restart2:
+    btfsc   vusb_in
+    bra     restart3                ; USB (and powered on)
+    bcf     PORTE,0                 ; Start comms
+    WAITMS  d'1'
+    btfss   vusb_in
+    bra     restart3                ; USB (and powered off)
+    bsf     ble_available           ; ble available
+restart3:    
+    bsf     PORTE,0                 ; Stop comms
 
-restart2:
 	; Select high altitude (Fly) mode?
 	movff	last_surfpressure_30min+0,sub_b+0
 	movff	last_surfpressure_30min+1,sub_b+1