altoslib: Report un-adjusted ground accel in idle IMU monitor
authorKeith Packard <keithp@keithp.com>
Sat, 14 Oct 2017 19:05:07 +0000 (12:05 -0700)
committerKeith Packard <keithp@keithp.com>
Sat, 14 Oct 2017 19:05:07 +0000 (12:05 -0700)
The ground accel is the basis of the accel adjustment, so it needs to
be delivered in un-adjusted form.

Signed-off-by: Keith Packard <keithp@keithp.com>
altoslib/AltosIMU.java

index dee28a92319eb8532d5d2556180ae51fa827509d..ba6f1a82584089c46a643d4e67d03af691ce39aa 100644 (file)
@@ -83,9 +83,9 @@ public class AltosIMU implements Cloneable {
                                listener.set_gyro(cal_data.gyro_roll(imu.gyro_y),
                                                  cal_data.gyro_pitch(imu.gyro_x),
                                                  cal_data.gyro_yaw(imu.gyro_z));
                                listener.set_gyro(cal_data.gyro_roll(imu.gyro_y),
                                                  cal_data.gyro_pitch(imu.gyro_x),
                                                  cal_data.gyro_yaw(imu.gyro_z));
-                               listener.set_accel_ground(cal_data.accel_along(imu.accel_y),
-                                                         cal_data.accel_across(imu.accel_x),
-                                                         cal_data.accel_through(imu.accel_z));
+                               listener.set_accel_ground(imu.accel_y,
+                                                         imu.accel_x,
+                                                         imu.accel_z);
                        }
                } catch (TimeoutException te) {
                }
                        }
                } catch (TimeoutException te) {
                }