altos: Check for packet mode before trying to disable it in flight code
[fw/altos] / src / core / ao_flight.c
index 9d9d4c6e0b3ddea72a724b1b3eacee94dbb9f76c..782e22744c434dc28e9356d60708ef728f7e9380 100644 (file)
@@ -124,7 +124,7 @@ ao_flight(void)
                                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