summaryrefslogtreecommitdiff
path: root/src/core/ao_report.c
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2011-08-28 17:03:26 -0700
committerKeith Packard <keithp@keithp.com>2011-08-28 17:03:26 -0700
commite66fd72664aae7c000dce9c528803e28e7918fdf (patch)
treef0347d65e7cd5f9bb3b60579cc52f81342315abe /src/core/ao_report.c
parent122c4101164d598e655fa9ad8473053d30ff4212 (diff)
altos: don't beep igniter continuity for telenano
Without any igniters, it's not nice to annoy people. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/core/ao_report.c')
-rw-r--r--src/core/ao_report.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/src/core/ao_report.c b/src/core/ao_report.c
index e0355d96..70f0b49d 100644
--- a/src/core/ao_report.c
+++ b/src/core/ao_report.c
@@ -119,7 +119,13 @@ ao_report_igniter_ready(enum ao_igniter igniter)
static void
ao_report_continuity(void) __reentrant
{
- uint8_t c = (ao_report_igniter_ready(ao_igniter_drogue) |
+ uint8_t c;
+
+#if !HAS_IGNITE
+ if (!ao_igniter_present)
+ return;
+#endif
+ c = (ao_report_igniter_ready(ao_igniter_drogue) |
(ao_report_igniter_ready(ao_igniter_main) << 1));
if (c) {
while (c--) {
@@ -145,9 +151,6 @@ ao_report_continuity(void) __reentrant
}
}
#endif
- c = 50;
- while (c-- && ao_flight_state == ao_flight_pad)
- pause(AO_MS_TO_TICKS(100));
}
#endif
@@ -162,8 +165,13 @@ ao_report(void)
#if HAS_IGNITE_REPORT
if (ao_flight_state == ao_flight_idle)
ao_report_continuity();
- while (ao_flight_state == ao_flight_pad)
+ while (ao_flight_state == ao_flight_pad) {
+ uint8_t c;
ao_report_continuity();
+ c = 50;
+ while (c-- && ao_flight_state == ao_flight_pad)
+ pause(AO_MS_TO_TICKS(100));
+ }
#endif
__critical {
while (ao_report_state == ao_flight_state)