ao-tools: Handle TeleMega v4.0 telemetry in ao-telem
authorKeith Packard <keithp@keithp.com>
Fri, 21 Feb 2020 07:42:24 +0000 (23:42 -0800)
committerKeith Packard <keithp@keithp.com>
Fri, 21 Feb 2020 07:42:24 +0000 (23:42 -0800)
Same packet format as older telemega, but axes differ

Signed-off-by: Keith Packard <keithp@keithp.com>
ao-tools/ao-telem/ao-telem.c
ao-tools/lib/cc-telemetry.h

index 02d53ff32cacf571bb0e25474cb27ed3227cc895..984184d65b88e5189e6a1f7e353d628bb1780376 100644 (file)
@@ -150,7 +150,8 @@ main (int argc, char **argv)
                                        }
                                        printf ("\n");
                                        break;
-                               case AO_TELEMETRY_MEGA_SENSOR:
+                               case AO_TELEMETRY_MEGA_SENSOR_MPU:
+                               case AO_TELEMETRY_MEGA_SENSOR_BMX160:
                                        printf ("orient %3d accel %5d pres %9d temp %5d accel_x %5d accel_y %5d accel_z %5d gyro_x %5d gyro_y %5d gyro_z %5d mag_x %5d mag_y %5d mag_z %5d\n",
                                                telem.mega_sensor.orient,
                                                telem.mega_sensor.accel,
index 256af3a116532b12af68e5537c44c78cf655d44e..25576fca59252488384a12ecc8c70caacd669829 100644 (file)
@@ -160,8 +160,9 @@ struct ao_telemetry_companion {
        uint16_t                                companion_data[AO_COMPANION_MAX_CHANNELS];      /*  8 */
        /* 32 */
 };
-       
-#define AO_TELEMETRY_MEGA_SENSOR       0x08
+
+#define AO_TELEMETRY_MEGA_SENSOR_MPU           0x08    /* Invensense IMU */
+#define AO_TELEMETRY_MEGA_SENSOR_BMX160                0x12    /* BMX160 IMU */
 
 struct ao_telemetry_mega_sensor {
        uint16_t        serial;         /*  0 */