easymotor-v3.0: Use motor pressure to trigger data logging
[fw/altos] / src / kernel / ao_report.c
index 977cea854ff1f014e0927a25530b34988e2682a8..3795eeb34df54ed02bb96e52fb313b8fe0fcc01a 100644 (file)
@@ -168,6 +168,7 @@ ao_report_number(int32_t n)
        while (i != 0);
 }
 
+#ifdef HAS_BARO
 static void
 ao_report_altitude(void)
 {
@@ -180,6 +181,7 @@ ao_report_altitude(void)
        }
        ao_report_number(max_h);
 }
+#endif
 
 #if HAS_BATTERY_REPORT
 static void
@@ -276,7 +278,9 @@ ao_report(void)
 #endif
 
                if (ao_report_state == ao_flight_landed) {
+#if HAS_BARO
                        ao_report_altitude();
+#endif
 #if HAS_FLIGHT
                        ao_delay(AO_SEC_TO_TICKS(5));
                        continue;