/* Landing is detected by getting constant readings from both pressure and accelerometer
* for a fairly long time (AO_INTERVAL_TICKS)
*/
-#define AO_INTERVAL_TICKS AO_SEC_TO_TICKS(5)
+#define AO_INTERVAL_TICKS AO_SEC_TO_TICKS(10)
#define abs(a) ((a) < 0 ? -(a) : (a))
*/
ao_flight_state = ao_flight_invalid;
+ /* Turn on packet system in invalid mode on TeleMetrum */
+ ao_packet_slave_start();
} else
#endif
if (!ao_flight_force_idle
ao_usb_disable();
#endif
- /* Disable packet mode in pad state */
+#if !HAS_ACCEL
+ /* Disable packet mode in pad state on TeleMini */
ao_packet_slave_stop();
+#endif
/* Turn on telemetry system */
ao_rdf_set(1);
/* Set idle mode */
ao_flight_state = ao_flight_idle;
+#if HAS_ACCEL
+ /* Turn on packet system in idle mode on TeleMetrum */
+ ao_packet_slave_start();
+#endif
+
/* signal successful initialization by turning off the LED */
ao_led_off(AO_LED_RED);
}
ao_interval_max_height = ao_avg_height;
if ((int16_t) (ao_sample_tick - ao_interval_end) >= 0) {
- if (ao_interval_max_height - ao_interval_min_height <= AO_M_TO_HEIGHT(2))
+ if (ao_interval_max_height - ao_interval_min_height <= AO_M_TO_HEIGHT(4))
{
ao_flight_state = ao_flight_landed;