altos: Disable USB on all flight computers when in flight mode
[fw/altos] / src / core / ao_flight.c
index 9d9d4c6e0b3ddea72a724b1b3eacee94dbb9f76c..1322195beb2ca4d0e1cb5ddab0c99580e7f2abe5 100644 (file)
@@ -117,14 +117,14 @@ ao_flight(void)
                        {
                                /* Set pad mode - we can fly! */
                                ao_flight_state = ao_flight_pad;
-#if HAS_USB && HAS_RADIO && !HAS_FLIGHT_DEBUG && !HAS_SAMPLE_PROFILE
+#if HAS_USB && !HAS_FLIGHT_DEBUG && !HAS_SAMPLE_PROFILE
                                /* Disable the USB controller in flight mode
                                 * to save power
                                 */
                                ao_usb_disable();
 #endif
 
-#if !HAS_ACCEL
+#if !HAS_ACCEL && PACKET_HAS_SLAVE
                                /* Disable packet mode in pad state on TeleMini */
                                ao_packet_slave_stop();
 #endif