summaryrefslogtreecommitdiff
path: root/src/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'src/kernel')
-rw-r--r--src/kernel/ao_data.h6
-rw-r--r--src/kernel/ao_report.c5
2 files changed, 11 insertions, 0 deletions
diff --git a/src/kernel/ao_data.h b/src/kernel/ao_data.h
index 5a340c3f..4fc9db8f 100644
--- a/src/kernel/ao_data.h
+++ b/src/kernel/ao_data.h
@@ -143,6 +143,12 @@ extern volatile uint8_t ao_data_count;
#define AO_DATA_PRESENT(bit) (ao_data_present |= (bit))
/*
+ * Mark sensor failed, and unblock the sample collection code by
+ * marking the data as present
+ */
+#define AO_SENSOR_ERROR(bit) (ao_data_present |= (ao_sensor_errors |= (bit)))
+
+/*
* Wait until it is time to write a sensor sample; this is
* signaled by the timer tick
*/
diff --git a/src/kernel/ao_report.c b/src/kernel/ao_report.c
index 872dcd48..12c3a1e9 100644
--- a/src/kernel/ao_report.c
+++ b/src/kernel/ao_report.c
@@ -262,6 +262,11 @@ ao_report(void)
else
#endif
ao_report_beep();
+#if HAS_SENSOR_ERRORS
+ if (ao_report_state == ao_flight_invalid && ao_sensor_errors)
+ ao_report_number(ao_sensor_errors);
+#endif
+
if (ao_report_state == ao_flight_landed) {
ao_report_altitude();
#if HAS_FLIGHT