EasyTimer doesn't have main/apogee charges.
Signed-off-by: Keith Packard <keithp@keithp.com>
MORSE4(1,0,0,1), /* invalid 'X' */
};
MORSE4(1,0,0,1), /* invalid 'X' */
};
+static enum ao_flight_state ao_report_state;
+
#if HAS_BEEP
#define low(time) ao_beep_for(AO_BEEP_LOW, time)
#define mid(time) ao_beep_for(AO_BEEP_MID, time)
#if HAS_BEEP
#define low(time) ao_beep_for(AO_BEEP_LOW, time)
#define mid(time) ao_beep_for(AO_BEEP_MID, time)
#endif
#define pause(time) ao_delay(time)
#endif
#define pause(time) ao_delay(time)
-static enum ao_flight_state ao_report_state;
-
/*
* Farnsworth spacing
*
/*
* Farnsworth spacing
*
+ao_report_flight_state(void)
{
uint8_t r = flight_reports[ao_flight_state];
uint8_t l = r & 7;
{
uint8_t r = flight_reports[ao_flight_state];
uint8_t l = r & 7;
#endif
#if HAS_IGNITE_REPORT
#endif
#if HAS_IGNITE_REPORT
static uint8_t
ao_report_igniter_ready(enum ao_igniter igniter)
{
static uint8_t
ao_report_igniter_ready(enum ao_igniter igniter)
{
return (ao_report_igniter_ready(ao_igniter_drogue) |
(ao_report_igniter_ready(ao_igniter_main) << 1));
}
return (ao_report_igniter_ready(ao_igniter_drogue) |
(ao_report_igniter_ready(ao_igniter_main) << 1));
}
static void
ao_report_continuity(void)
{
static void
ao_report_continuity(void)
{
- uint8_t c;
-
-#if !HAS_IGNITE
- if (!ao_igniter_present)
- return;
-#endif
+ uint8_t c;
+#if HAS_IGNITE
c = ao_report_igniter();
if (c) {
while (c--) {
c = ao_report_igniter();
if (c) {
while (c--) {
low(AO_MS_TO_TICKS(20));
}
}
low(AO_MS_TO_TICKS(20));
}
}
pause(AO_MS_TO_TICKS(250));
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)
for(c = 0; c < AO_PYRO_NUM; c++) {
enum ao_igniter_status status = ao_pyro_status(c);
if (status == ao_igniter_ready)
ao_report_battery();
else
#endif
ao_report_battery();
else
#endif
+ ao_report_flight_state();
#if HAS_SENSOR_ERRORS
if (ao_report_state == ao_flight_invalid && ao_sensor_errors)
ao_report_number(ao_sensor_errors);
#if HAS_SENSOR_ERRORS
if (ao_report_state == ao_flight_invalid && ao_sensor_errors)
ao_report_number(ao_sensor_errors);