summaryrefslogtreecommitdiff
path: root/telegps
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2014-05-28 22:53:06 -0700
committerKeith Packard <keithp@keithp.com>2014-05-28 22:53:06 -0700
commit13f84be8d1568a3fc2ed5eef5dcc2093c149285e (patch)
treeb7bdaad1167f457ab2ddc45b74619deadf114c03 /telegps
parent8ba523cd793f2263bb1acd7a5a10f8964075bdc5 (diff)
telegps: Add flash device functionality
Move bits from altosui to altosuilib and use those. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'telegps')
-rw-r--r--telegps/TeleGPS.java16
1 files changed, 11 insertions, 5 deletions
diff --git a/telegps/TeleGPS.java b/telegps/TeleGPS.java
index de2b4aa3..7f34c763 100644
--- a/telegps/TeleGPS.java
+++ b/telegps/TeleGPS.java
@@ -89,21 +89,19 @@ public class TeleGPS extends AltosUIFrame implements AltosFlightDisplay, AltosFo
/* Device menu */
final static String download_command = "download";
- final static String configure_command = "configure";
final static String export_command = "export";
final static String graph_command = "graph";
+ final static String configure_command = "configure";
+ final static String flash_command = "flash";
static final String[][] device_menu_entries = new String[][] {
{ "Download Data", download_command },
{ "Configure Device", configure_command },
{ "Export Data", export_command },
{ "Graph Data", graph_command },
+ { "Flash Device", flash_command },
};
-// private AltosInfoTable flightInfo;
-
- boolean exit_on_close = false;
-
void stop_display() {
if (thread != null && thread.isAlive()) {
thread.interrupt();
@@ -240,6 +238,10 @@ public class TeleGPS extends AltosUIFrame implements AltosFlightDisplay, AltosFo
void graph() {
}
+ void flash() {
+ AltosFlashUI.show(this);
+ }
+
public void actionPerformed(ActionEvent ev) {
/* File menu */
@@ -293,6 +295,10 @@ public class TeleGPS extends AltosUIFrame implements AltosFlightDisplay, AltosFo
graph();
return;
}
+ if (flash_command.equals(ev.getActionCommand())) {
+ flash();
+ return;
+ }
}
void add_frequency_menu(int serial, final AltosFlightReader reader) {