From 312f303be7f2a641020903ed2daccb8a4d67ec42 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Sat, 28 Apr 2018 12:03:10 -0700 Subject: altoslib: Fix Idle Monitor on TeleMega v3 The new IMU includes a mag sensor, and there's no separate mag sensor. Add support for reading the mag sensor values from the IMU, separate out v3 from previous TeleMega versions so that the code can stop trying to read the mag sensor. Signed-off-by: Keith Packard --- altoslib/AltosIdleFetch.java | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'altoslib/AltosIdleFetch.java') diff --git a/altoslib/AltosIdleFetch.java b/altoslib/AltosIdleFetch.java index 058df0a1..88a5dab4 100644 --- a/altoslib/AltosIdleFetch.java +++ b/altoslib/AltosIdleFetch.java @@ -133,12 +133,30 @@ public class AltosIdleFetch implements AltosDataProvider { AltosIdler.idle_ms5607, AltosIdler.idle_sensor_metrum), - new AltosIdler("TeleMega", + new AltosIdler("TeleMega-v0", AltosIdler.idle_gps, AltosIdler.idle_mma655x, AltosIdler.idle_ms5607, AltosIdler.idle_imu, AltosIdler.idle_mag, AltosIdler.idle_sensor_mega), + new AltosIdler("TeleMega-v1", + AltosIdler.idle_gps, + AltosIdler.idle_mma655x, + AltosIdler.idle_ms5607, + AltosIdler.idle_imu, AltosIdler.idle_mag, + AltosIdler.idle_sensor_mega), + new AltosIdler("TeleMega-v2", + AltosIdler.idle_gps, + AltosIdler.idle_mma655x, + AltosIdler.idle_ms5607, + AltosIdler.idle_imu, AltosIdler.idle_mag, + AltosIdler.idle_sensor_mega), + new AltosIdler("TeleMega-v3", + AltosIdler.idle_gps, + AltosIdler.idle_mma655x, + AltosIdler.idle_ms5607, + AltosIdler.idle_imu, + AltosIdler.idle_sensor_mega), new AltosIdler("EasyMega", AltosIdler.idle_mma655x, AltosIdler.idle_ms5607, -- cgit v1.2.3