altoslib/altosuilib: Add EasyMega support
authorKeith Packard <keithp@keithp.com>
Tue, 9 Sep 2014 16:37:13 +0000 (09:37 -0700)
committerKeith Packard <keithp@keithp.com>
Tue, 9 Sep 2014 16:37:13 +0000 (09:37 -0700)
This makes flashing find the right files, and Monitor Idle show all of
the state data.

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

index 4ada1d3bbb309442a893171712a75340cb89e692..fc1f2442ebfa04fd66074a096449eda21022fdc3 100644 (file)
@@ -429,6 +429,8 @@ public class AltosConfigData implements Iterable<String> {
                        return false;
                if (product.startsWith("TeleMetrum-v2"))
                        return false;
+               if (product.startsWith("EasyMega"))
+                       return false;
                return true;
        }
 
index 1cb43d6dd55b9df2437474f8b71f2788de3a30a0..50745d9755d9be1436932d62c848615bdb51f255 100644 (file)
@@ -118,6 +118,10 @@ public class AltosIdleFetch implements AltosStateUpdate {
                               AltosIdler.idle_ms5607, AltosIdler.idle_mma655x,
                               AltosIdler.idle_imu, AltosIdler.idle_mag,
                               AltosIdler.idle_sensor_mega),
+               new AltosIdler("EasyMega",
+                              AltosIdler.idle_ms5607, AltosIdler.idle_mma655x,
+                              AltosIdler.idle_imu, AltosIdler.idle_mag,
+                              AltosIdler.idle_sensor_mega),
        };
 
        AltosLink               link;
index c3c1226ed4ec7a4ec8a8412e71ac763232140c01..2e9dc6486a1907f2dc7027de20f3157adba84556 100644 (file)
@@ -112,6 +112,7 @@ public class AltosLib {
        public final static int product_telegps = 0x0025;
        public final static int product_easymini = 0x0026;
        public final static int product_telemini = 0x0027;
+       public final static int product_easymega = 0x0028;
        public final static int product_altusmetrum_min = 0x000a;
        public final static int product_altusmetrum_max = 0x002c;
 
@@ -143,7 +144,8 @@ public class AltosLib {
                new Product("megadongle", product_megadongle),
                new Product("telegps", product_telegps),
                new Product("easymini", product_easymini),
-               new Product("telemini", product_telemini)
+               new Product("telemini", product_telemini),
+               new Product("easymega", product_easymega)
        };
 
        public static int name_to_product(String name) {
index 0ed4e75df4616c90fff87de9cbe12ecb6b2adf61..44be2a9064f6183396b073d208979340fdfc9128 100644 (file)
@@ -213,6 +213,7 @@ public class AltosFlashUI
                new AltosHexfileFilter(AltosLib.product_teledongle, "teledongle", "TeleDongle Image"),
                new AltosHexfileFilter(AltosLib.product_telemega, "telemega", "TeleMega Image"),
                new AltosHexfileFilter(AltosLib.product_easymini, "easymini", "EasyMini Image"),
+               new AltosHexfileFilter(AltosLib.product_easymega, "easymega", "EasyMega Image"),
        };
 
        boolean select_source_file() {
index a8323704943e04e76929f177a1ecef959844ab7c..f4906a73662c4f8f0140c0152ad5e4935f726f78 100644 (file)
@@ -79,6 +79,7 @@ public class AltosUSBDevice  extends altos_device implements AltosDevice {
                if (want_product == AltosUILib.product_altimeter)
                        return have_product == AltosUILib.product_telemetrum ||
                                have_product == AltosUILib.product_telemega ||
+                               have_product == AltosUILib.product_easymega ||
                                have_product == AltosUILib.product_telegps ||
                                have_product == AltosUILib.product_easymini ||
                                have_product == AltosUILib.product_telemini;