* Igniter
*/
-#define HAS_IGNITE 1
-#define HAS_IGNITE_REPORT 1
+#define HAS_IGNITE 0
+#define HAS_IGNITE_REPORT 0
#define AO_SENSE_PYRO(p,n) ((p)->adc.sense[n])
#define AO_IGNITER_CLOSED 400
--- /dev/null
+/*
+ * Copyright © 2020 Keith Packard <keithp@keithp.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+ */
+
+#include "ao.h"
+#include <ao_flight.h>
+#include <ao_sample.h>
+
+enum ao_flight_state ao_flight_state; /* current flight state */
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)
#endif
#define pause(time) ao_delay(time)
-static enum ao_flight_state ao_report_state;
-
/*
* Farnsworth spacing
*
*/
static void
-ao_report_beep(void)
+ao_report_flight_state(void)
{
uint8_t r = flight_reports[ao_flight_state];
uint8_t l = r & 7;
static void
ao_report_continuity(void)
{
- uint8_t c;
-
-#if !HAS_IGNITE
- if (!ao_igniter_present)
- return;
-#endif
- c = ao_report_igniter();
+#if HAS_IGNITE
+ uint8_t c = ao_report_igniter();
if (c) {
while (c--) {
high(AO_MS_TO_TICKS(25));
low(AO_MS_TO_TICKS(20));
}
}
+#endif
#if AO_PYRO_NUM
+#if HAS_IGNITE
pause(AO_MS_TO_TICKS(250));
+#endif
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_beep();
+ ao_report_flight_state();
#if HAS_SENSOR_ERRORS
if (ao_report_state == ao_flight_invalid && ao_sensor_errors)
ao_report_number(ao_sensor_errors);