altos: Tim Van Milligan suggestion for µP -- delay before showing last flight
[fw/altos] / src / micropeak / ao_micropeak.c
index bf65697994e71705a9cb3d6d5608ab7e8ea659d7..8ae26ec110b71458c65dfae59fedc09302cd0d8c 100644 (file)
@@ -110,6 +110,8 @@ main(void)
 #endif
        ao_restore_flight();
        ao_compute_height();
+       /* Give the person a second to get their finger out of the way */
+       ao_delay(AO_MS_TO_TICKS(1000));
        ao_report_altitude();
        
        ao_spi_init();
@@ -133,11 +135,11 @@ main(void)
        for (;;) {
                time += SAMPLE_SLEEP;
                if (sample_count == 0)
-                       ao_led_on(AO_LED_BLUE);
+                       ao_led_on(AO_LED_REPORT);
                ao_delay_until(time);
                ao_pa_get();
                if (sample_count == 0)
-                       ao_led_off(AO_LED_BLUE);
+                       ao_led_off(AO_LED_REPORT);
                pa_avg = pa_avg - (pa_avg >> FILTER_SHIFT) + pa;
                pa_diff = pa_ground - pa_avg;
 
@@ -172,10 +174,10 @@ main(void)
                time += SAMPLE_SLEEP;
                ao_delay_until(time);
                if ((sample_count & 3) == 0)
-                       ao_led_on(AO_LED_BLUE);
+                       ao_led_on(AO_LED_REPORT);
                ao_pa_get();
                if ((sample_count & 3) == 0)
-                       ao_led_off(AO_LED_BLUE);
+                       ao_led_off(AO_LED_REPORT);
 #if HAS_EEPROM
                ao_log_micro_data(AO_LOG_MICRO_DATA | pa);
 #endif