X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=altoslib%2FAltosIMU.java;h=8adf710e028a03f8e401ec4c48de5c1e9138a805;hp=b4ba5a563e08c3b3f768dd9cad3b837eae4249db;hb=HEAD;hpb=d5d835d65e909de24538ee0edb37d0ad0877f0c6 diff --git a/altoslib/AltosIMU.java b/altoslib/AltosIMU.java index b4ba5a56..01ecc161 100644 --- a/altoslib/AltosIMU.java +++ b/altoslib/AltosIMU.java @@ -73,11 +73,13 @@ public class AltosIMU implements Cloneable { case imu_type_easymega_v1: case imu_type_easymega_v2: return counts_per_g_mpu; - case imu_type_telemega_v4: + case imu_type_telemega_v4: case imu_type_easytimer_v1: return counts_per_g_bmx; case imu_type_easymotor_v2: return counts_per_g_adxl; + case imu_type_easytimer_v2: + return counts_per_g_bmi088; } return AltosLib.MISSING; @@ -251,6 +253,8 @@ public class AltosIMU implements Cloneable { public static final int imu_type_easymotor_v2 = 6; /* ADXL375 (accel only) */ + public static final int imu_type_easytimer_v2 = 7; /* BMI088 */ + private int accel_across(int imu_type) { if (accel_across != AltosLib.MISSING) @@ -274,8 +278,10 @@ public class AltosIMU implements Cloneable { } private int accel_along(int imu_type) { - if (accel_along != AltosLib.MISSING) + if (accel_along != AltosLib.MISSING) { + System.out.printf("accel along %d\n", accel_along); return accel_along; + } switch (imu_type) { case imu_type_telemega_v1_v2: @@ -391,6 +397,7 @@ public class AltosIMU implements Cloneable { private static boolean is_primary_accel(int imu_type) { switch (imu_type) { case imu_type_easytimer_v1: + case imu_type_easytimer_v2: return true; default: return false; @@ -402,6 +409,7 @@ public class AltosIMU implements Cloneable { AltosIMU imu = new AltosIMU(link); AltosCalData cal_data = listener.cal_data(); + System.out.printf("imu_model %d mag_model %d\n", imu.imu_model, imu.mag_model); if (imu_type != AltosLib.MISSING) cal_data.set_imu_type(imu_type); if (imu != null) {