Without baro, speed will integrate accel 'forever' and cause speed to
be wildly inaccurate at boost time. Would be awesome to reset speed to
zero at some point.
Signed-off-by: Keith Packard <keithp@keithp.com>
break;
+#if 0
case ao_flight_idle:
case ao_flight_invalid:
printf("+g %d ga %d sa %d accel %ld speed %ld\n", ao_config.accel_plus_g, ao_ground_accel, ao_sample_accel, ao_accel, ao_speed);
break;
+#endif
case ao_flight_pad:
/* pad to boost:
*/
if (ao_height > AO_M_TO_HEIGHT(20)
#if HAS_ACCEL
- || (ao_accel > AO_MSS_TO_ACCEL(20) &&
- ao_speed > AO_MS_TO_SPEED(5))
+ || (ao_accel > AO_MSS_TO_ACCEL(20)
+#if HAS_BARO
+ && ao_speed > AO_MS_TO_SPEED(5))
+#endif
#endif
)
{