altos: Report additional pyro channels via beeper
authorKeith Packard <keithp@keithp.com>
Fri, 15 Aug 2014 02:03:29 +0000 (19:03 -0700)
committerKeith Packard <keithp@keithp.com>
Fri, 15 Aug 2014 02:08:19 +0000 (19:08 -0700)
Send a beep for each additional pyro channel, low for no igniter, mid
for igniter. Does not change the reporting for the apogee/main channels.

Signed-off-by: Keith Packard <keithp@keithp.com>
src/kernel/ao_pyro.h
src/kernel/ao_report.c

index b37aaeb1707554559265ccee59ad0a5c3fee9e91..0fde725a617ce42b2df60797b246535aec8a4e62 100644 (file)
@@ -83,6 +83,9 @@ ao_pyro_init(void);
 void
 ao_pyro_manual(uint8_t p);
 
 void
 ao_pyro_manual(uint8_t p);
 
+enum ao_igniter_status
+ao_pyro_status(uint8_t p);
+
 void
 ao_pyro_print_status(void);
 
 void
 ao_pyro_print_status(void);
 
index f22631547473d7de341bff5c91d85107ec8d133f..5314fc8fb82fa7a698dd3743939ef23fe54dbeda 100644 (file)
@@ -211,12 +211,23 @@ ao_report_continuity(void) __reentrant
                        pause(AO_MS_TO_TICKS(100));
                }
        } else {
                        pause(AO_MS_TO_TICKS(100));
                }
        } else {
-               c = 10;
+               c = 5;
                while (c--) {
                        high(AO_MS_TO_TICKS(20));
                        low(AO_MS_TO_TICKS(20));
                }
        }
                while (c--) {
                        high(AO_MS_TO_TICKS(20));
                        low(AO_MS_TO_TICKS(20));
                }
        }
+#if AO_PYRO_NUM
+       pause(AO_MS_TO_TICKS(250));
+       for(c = 0; c < AO_PYRO_NUM; c++) {
+               enum ao_igniter_status  status = ao_pyro_status(c);
+               if (status == ao_igniter_ready)
+                       mid(AO_MS_TO_TICKS(25));
+               else
+                       low(AO_MS_TO_TICKS(25));
+               pause(AO_MS_TO_TICKS(200));
+       }
+#endif
 #if HAS_LOG
        if (ao_log_full()) {
                pause(AO_MS_TO_TICKS(100));
 #if HAS_LOG
        if (ao_log_full()) {
                pause(AO_MS_TO_TICKS(100));