altoslib: Handle TeleMetrum v4.0 in idle mode
authorKeith Packard <keithp@keithp.com>
Sun, 20 Nov 2022 23:56:06 +0000 (15:56 -0800)
committerKeith Packard <keithp@keithp.com>
Sun, 20 Nov 2022 23:56:06 +0000 (15:56 -0800)
Handle config data and idle fetch stuff. Note that TM v4.0 differs
from older versions a bit as it stores config data in the SPI flash
chip, not in the SoC.

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

index cd649113b1a6b8293b3766f05a74f97ae6f79d0b..18815cf4b26a86b3c8ccec7f23b5ba2944dbb73e 100644 (file)
@@ -632,6 +632,8 @@ public class AltosConfigData {
                        return false;
                if (product.startsWith("TeleMetrum-v3"))
                        return false;
+               if (product.startsWith("TeleMetrum-v4"))
+                       return true;
                if (product.startsWith("EasyMega"))
                        return false;
                return true;
@@ -658,6 +660,8 @@ public class AltosConfigData {
                                return true;
                        if (product.startsWith("TeleMetrum-v3"))
                                return true;
+                       if (product.startsWith("TeleMetrum-v4"))
+                               return true;
                        if (product.startsWith("TeleMega-v4"))
                                return true;
                        if (product.startsWith("EasyMotor-v2"))
@@ -672,6 +676,8 @@ public class AltosConfigData {
                                return AltosAdxl375.X_AXIS;
                        if (product.startsWith("TeleMetrum-v3"))
                                return AltosAdxl375.X_AXIS;
+                       if (product.startsWith("TeleMetrum-v4"))
+                               return AltosAdxl375.X_AXIS;
                        if (product.startsWith("TeleMega-v4"))
                                return AltosAdxl375.X_AXIS;
                        if (product.startsWith("EasyMotor-v2"))
index b2fd3c6f56833b938cc91392f12fa7c48f87f951..b2552b24bdf73d561378585808c8c8660c61621f 100644 (file)
@@ -182,6 +182,12 @@ public class AltosIdleFetch implements AltosDataProvider {
                               AltosIdler.idle_ms5607,
                               AltosIdler.idle_sensor_metrum),
 
+               new AltosIdler("TeleMetrum-v4",
+                              AltosIdler.idle_gps,
+                              AltosIdler.idle_adxl375,
+                              AltosIdler.idle_ms5607,
+                              AltosIdler.idle_sensor_metrum),
+
                new AltosIdler("TeleMega-v0",
                               AltosIdler.idle_gps,
                               AltosIdler.idle_mma655x,