diff options
author | Keith Packard <keithp@keithp.com> | 2014-08-14 19:03:29 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2014-08-14 19:08:19 -0700 |
commit | e935ebe55705cb0506aac0859583d54fd8e5ca46 (patch) | |
tree | 3efa9e02a3e60976492842463c57d01d9414281c /src | |
parent | c4dd29fcbbb93e991993a0aa444748dba4ee7dde (diff) |
altos: Report additional pyro channels via beeper
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>
Diffstat (limited to 'src')
-rw-r--r-- | src/kernel/ao_pyro.h | 3 | ||||
-rw-r--r-- | src/kernel/ao_report.c | 13 |
2 files changed, 15 insertions, 1 deletions
diff --git a/src/kernel/ao_pyro.h b/src/kernel/ao_pyro.h index b37aaeb1..0fde725a 100644 --- a/src/kernel/ao_pyro.h +++ b/src/kernel/ao_pyro.h @@ -83,6 +83,9 @@ ao_pyro_init(void); void ao_pyro_manual(uint8_t p); +enum ao_igniter_status +ao_pyro_status(uint8_t p); + void ao_pyro_print_status(void); diff --git a/src/kernel/ao_report.c b/src/kernel/ao_report.c index f2263154..5314fc8f 100644 --- a/src/kernel/ao_report.c +++ b/src/kernel/ao_report.c @@ -211,12 +211,23 @@ ao_report_continuity(void) __reentrant 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)); } } +#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)); |