ao-tools: Handle TeleMega v4.0 telemetry in ao-telem
[fw/altos] / ao-tools / ao-telem / ao-telem.c
index ee60712c40f6c969fde407bf2f27e97bd43d3217..984184d65b88e5189e6a1f7e353d628bb1780376 100644 (file)
@@ -115,7 +115,7 @@ main (int argc, char **argv)
                                                (telem.location.flags & (1 << 6)) ? ",date" : "",
                                                (telem.location.flags & (1 << 7)) ? ",course" : "");
                                        printf (" alt %5d lat %12.7f lon %12.7f",
-                                               telem.location.altitude,
+                                               AO_TELEMETRY_LOCATION_ALTITUDE(&telem.location),
                                                telem.location.latitude / 1e7,
                                                telem.location.longitude / 1e7);
                                        if ((telem.location.flags & (1 << 6)) != 0) {
@@ -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,