altos: Add distinct LED pattern before writing log data
authorKeith Packard <keithp@keithp.com>
Tue, 18 Dec 2012 08:39:37 +0000 (00:39 -0800)
committerKeith Packard <keithp@keithp.com>
Tue, 18 Dec 2012 08:39:37 +0000 (00:39 -0800)
Otherwise, the whole log looks like a an extra altitude digit.

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

index f579a09a27b62fdfe4376a2022b98dbdf741f2dc..8201280000e9d8c2cfd0491976501529a92b318f 100644 (file)
@@ -49,6 +49,17 @@ ao_compute_height(void)
        ao_max_height = max_alt - ground_alt;
 }
 
+static void
+ao_pips(void)
+{
+       uint8_t i;
+       for (i = 0; i < 10; i++) {
+               ao_led_toggle(AO_LED_REPORT);
+               ao_delay(AO_MS_TO_TICKS(80));
+       }
+       ao_delay(AO_MS_TO_TICKS(200));
+}
+
 int
 main(void)
 {
@@ -71,6 +82,7 @@ main(void)
        ao_log_micro_restore();
        ao_compute_height();
        ao_report_altitude();
+       ao_pips();
        ao_log_micro_dump();
        
        ao_delay(BOOST_DELAY);