altos/ao_pad: Move LED test to the monitor task
authorKeith Packard <keithp@keithp.com>
Sun, 17 Jun 2018 19:35:23 +0000 (12:35 -0700)
committerKeith Packard <keithp@keithp.com>
Sun, 17 Jun 2018 19:35:23 +0000 (12:35 -0700)
It sets the LEDs, so it's best to not start doing that until we've
tested them.

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

index d2b22b95721a6e05b00525742ec114ef52469739..c6efc311fd9e8ea2cd29828206f28218dbc0305a 100644 (file)
@@ -195,6 +195,9 @@ ao_pad_monitor(void)
        __pdata uint16_t        arm_beep_time = 0;
 
        sample = ao_data_head;
+       ao_led_set(LEDS_AVAILABLE);
+       ao_delay(AO_MS_TO_TICKS(1000));
+       ao_led_set(0);
        for (;;) {
                __pdata int16_t                 pyro;
 
@@ -370,9 +373,6 @@ ao_pad(void)
        int8_t  ret;
 
        ao_pad_box = 0;
-       ao_led_set(LEDS_AVAILABLE);
-       ao_delay(AO_MS_TO_TICKS(500));
-       ao_led_set(0);
        for (;;) {
                FLUSHD();
                while (ao_pad_disabled)