summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2013-05-26 19:03:12 -0600
committerKeith Packard <keithp@keithp.com>2013-05-26 19:03:12 -0600
commit62547a042d042fadec652c5081f96816a8e66970 (patch)
tree6ca8ab7bd5361de478a5e6a642d1134bec819063 /src
parent277577fecc71e3c52b823938f396cf42be403ebe (diff)
altos,altosui: Add pyro state logging for TeleMega
Only in the log file (no obvious space in the telem packets), but at least we should be able to check for pyro failures. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src')
-rw-r--r--src/core/ao_log.h3
-rw-r--r--src/core/ao_log_mega.c1
-rw-r--r--src/core/ao_pyro.c2
-rw-r--r--src/core/ao_pyro.h2
4 files changed, 7 insertions, 1 deletions
diff --git a/src/core/ao_log.h b/src/core/ao_log.h
index e1461a14..dce12f02 100644
--- a/src/core/ao_log.h
+++ b/src/core/ao_log.h
@@ -236,7 +236,8 @@ struct ao_log_mega {
int16_t v_pbatt; /* 6 */
int16_t n_sense; /* 8 */
int16_t sense[10]; /* 10 */
- } volt; /* 30 */
+ uint16_t pyro; /* 30 */
+ } volt; /* 32 */
/* AO_LOG_GPS_TIME */
struct {
int32_t latitude; /* 4 */
diff --git a/src/core/ao_log_mega.c b/src/core/ao_log_mega.c
index abf953a6..0db1119c 100644
--- a/src/core/ao_log_mega.c
+++ b/src/core/ao_log_mega.c
@@ -151,6 +151,7 @@ ao_log(void)
log.u.volt.n_sense = AO_ADC_NUM_SENSE;
for (i = 0; i < AO_ADC_NUM_SENSE; i++)
log.u.volt.sense[i] = ao_data_ring[ao_log_data_pos].adc.sense[i];
+ log.u.pyro = ao_pyro_fired;
ao_log_mega(&log);
next_other = log.tick + AO_OTHER_INTERVAL;
}
diff --git a/src/core/ao_pyro.c b/src/core/ao_pyro.c
index b655eaca..b3cda656 100644
--- a/src/core/ao_pyro.c
+++ b/src/core/ao_pyro.c
@@ -33,6 +33,8 @@
#define ao_lowbit(x) ((x) & (-x))
+uint16_t ao_pyro_fired;
+
/*
* Given a pyro structure, figure out
* if the current flight state satisfies all
diff --git a/src/core/ao_pyro.h b/src/core/ao_pyro.h
index cde850ad..1f838542 100644
--- a/src/core/ao_pyro.h
+++ b/src/core/ao_pyro.h
@@ -63,6 +63,8 @@ struct ao_pyro {
extern uint8_t ao_pyro_wakeup;
+extern uint16_t ao_pyro_fired;
+
void
ao_pyro_set(void);