altos: Don't require an LED for ao_flight
authorKeith Packard <keithp@keithp.com>
Tue, 8 Oct 2013 04:51:30 +0000 (21:51 -0700)
committerKeith Packard <keithp@keithp.com>
Tue, 8 Oct 2013 04:51:30 +0000 (21:51 -0700)
EasyMini has no LEDs. Deal with it.

Signed-off-by: Keith Packard <keithp@keithp.com>
src/core/ao_flight.c

index 1322195beb2ca4d0e1cb5ddab0c99580e7f2abe5..88dc816d25578858aa2c3e8c672cb414b0eb418e 100644 (file)
@@ -134,8 +134,10 @@ ao_flight(void)
                                ao_rdf_set(1);
                                ao_telemetry_set_interval(AO_TELEMETRY_INTERVAL_PAD);
 #endif
+#if HAS_LED
                                /* signal successful initialization by turning off the LED */
                                ao_led_off(AO_LED_RED);
+#endif
                        } else {
                                /* Set idle mode */
                                ao_flight_state = ao_flight_idle;
@@ -145,8 +147,10 @@ ao_flight(void)
                                ao_packet_slave_start();
 #endif
 
+#if HAS_LED
                                /* signal successful initialization by turning off the LED */
                                ao_led_off(AO_LED_RED);
+#endif
                        }
                        /* wakeup threads due to state change */
                        ao_wakeup(DATA_TO_XDATA(&ao_flight_state));