summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2014-09-09 09:37:13 -0700
committerKeith Packard <keithp@keithp.com>2014-09-09 09:37:13 -0700
commitcef3be371cb3a9e481c2bd6abdf22c51953773f1 (patch)
tree0bd4fb69a1f8bb7ca7efda6aa2adb0a4f7ce6d0b
parent08a82617c53718055d97df4fa60f3e5051d65383 (diff)
altoslib/altosuilib: Add EasyMega support
This makes flashing find the right files, and Monitor Idle show all of the state data. Signed-off-by: Keith Packard <keithp@keithp.com>
-rw-r--r--altoslib/AltosConfigData.java2
-rw-r--r--altoslib/AltosIdleFetch.java4
-rw-r--r--altoslib/AltosLib.java4
-rw-r--r--altosuilib/AltosFlashUI.java1
-rw-r--r--altosuilib/AltosUSBDevice.java1
5 files changed, 11 insertions, 1 deletions
diff --git a/altoslib/AltosConfigData.java b/altoslib/AltosConfigData.java
index 4ada1d3b..fc1f2442 100644
--- a/altoslib/AltosConfigData.java
+++ b/altoslib/AltosConfigData.java
@@ -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;
}
diff --git a/altoslib/AltosIdleFetch.java b/altoslib/AltosIdleFetch.java
index 1cb43d6d..50745d97 100644
--- a/altoslib/AltosIdleFetch.java
+++ b/altoslib/AltosIdleFetch.java
@@ -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;
diff --git a/altoslib/AltosLib.java b/altoslib/AltosLib.java
index c3c1226e..2e9dc648 100644
--- a/altoslib/AltosLib.java
+++ b/altoslib/AltosLib.java
@@ -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) {
diff --git a/altosuilib/AltosFlashUI.java b/altosuilib/AltosFlashUI.java
index 0ed4e75d..44be2a90 100644
--- a/altosuilib/AltosFlashUI.java
+++ b/altosuilib/AltosFlashUI.java
@@ -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() {
diff --git a/altosuilib/AltosUSBDevice.java b/altosuilib/AltosUSBDevice.java
index a8323704..f4906a73 100644
--- a/altosuilib/AltosUSBDevice.java
+++ b/altosuilib/AltosUSBDevice.java
@@ -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;