- ao_ground_accel_along = ao_sample_accel_along_sum >> 9;
- ao_ground_accel_across = ao_sample_accel_across_sum >> 9;
- ao_ground_accel_through = ao_sample_accel_through_sum >> 9;
-
+ ao_ground_accel_along = (accel_t) (ao_sample_accel_along_sum >> 9);
+ ao_ground_accel_across = (accel_t) (ao_sample_accel_across_sum >> 9);
+ ao_ground_accel_through = (accel_t) (ao_sample_accel_through_sum >> 9);
+ ao_sample_accel_along_sum = 0;
+ ao_sample_accel_across_sum = 0;
+ ao_sample_accel_through_sum = 0;
+#endif
+#if HAS_MOTOR_PRESSURE
+ ao_ground_motor_pressure = (motor_pressure_t) (ao_sample_motor_pressure_sum >> 9);
+ ao_sample_motor_pressure_sum = 0;