projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' of ssh://mjb@git.ethernal.org/~/git/altos
[fw/altos]
/
altosui
/
AltosUI.java
diff --git
a/altosui/AltosUI.java
b/altosui/AltosUI.java
index 89f66c0604521bf89e3de6c10d25586345bd2658..926d66f083a076c8634cbe4dc6e5a8db05542b46 100644
(file)
--- a/
altosui/AltosUI.java
+++ b/
altosui/AltosUI.java
@@
-27,6
+27,7
@@
import java.util.*;
import java.text.*;
import java.util.prefs.*;
import java.util.concurrent.*;
import java.text.*;
import java.util.prefs.*;
import java.util.concurrent.*;
+import org.altusmetrum.AltosLib.*;
import libaltosJNI.*;
import libaltosJNI.*;
@@
-47,7
+48,7
@@
public class AltosUI extends AltosFrame {
void telemetry_window(AltosDevice device) {
try {
void telemetry_window(AltosDevice device) {
try {
- AltosFlightReader reader = new AltosTelemetryReader(
device
);
+ AltosFlightReader reader = new AltosTelemetryReader(
new AltosSerial(device)
);
if (reader != null)
new AltosFlightUI(voice, reader, device.getSerial());
} catch (FileNotFoundException ee) {
if (reader != null)
new AltosFlightUI(voice, reader, device.getSerial());
} catch (FileNotFoundException ee) {
@@
-108,7
+109,7
@@
public class AltosUI extends AltosFrame {
if (imgURL != null)
setIconImage(new ImageIcon(imgURL).getImage());
if (imgURL != null)
setIconImage(new ImageIcon(imgURL).getImage());
- AltosPreferences.set_component(this);
+ Altos
UI
Preferences.set_component(this);
pane = getContentPane();
gridbag = new GridBagLayout();
pane = getContentPane();
gridbag = new GridBagLayout();
@@
-165,28
+166,29
@@
public class AltosUI extends AltosFrame {
}
});
b.setToolTipText("Global AltosUI settings");
}
});
b.setToolTipText("Global AltosUI settings");
- b = addButton(2, 1, "Flash Image");
+
+ b = addButton(2, 1, "Configure Ground Station");
b.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
b.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
-
FlashImag
e();
+
ConfigureTeleDongl
e();
}
});
}
});
- b.setToolTipText("Replace the firmware in any AltusMetrum product");
- b = addButton(3, 1, "F
ire Igniter
");
+ b = addButton(3, 1, "F
lash Image
");
b.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
b.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
- F
ireIgniter
();
+ F
lashImage
();
}
});
}
});
- b.setToolTipText("Remote control of igniters for deployment testing");
- b = addButton(4, 1, "Quit");
+ b.setToolTipText("Replace the firmware in any AltusMetrum product");
+
+ b = addButton(4, 1, "Fire Igniter");
b.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
b.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
-
System.exit(0
);
+
FireIgniter(
);
}
});
}
});
- b.setToolTipText("
Close all active windows and terminate AltosUI
");
+ b.setToolTipText("
Remote control of igniters for deployment testing
");
b = addButton(0, 2, "Scan Channels");
b.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
b = addButton(0, 2, "Scan Channels");
b.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
@@
-209,12
+211,20
@@
public class AltosUI extends AltosFrame {
});
b.setToolTipText("Check flight readiness of altimeter in idle mode");
});
b.setToolTipText("Check flight readiness of altimeter in idle mode");
- b = addButton(3, 2, "Launch Controller");
+// b = addButton(3, 2, "Launch Controller");
+// b.addActionListener(new ActionListener() {
+// public void actionPerformed(ActionEvent e) {
+// LaunchController();
+// }
+// });
+
+ b = addButton(4, 2, "Quit");
b.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
b.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
-
LaunchController(
);
+
System.exit(0
);
}
});
}
});
+ b.setToolTipText("Close all active windows and terminate AltosUI");
setTitle("AltOS");
setTitle("AltOS");
@@
-253,15
+263,19
@@
public class AltosUI extends AltosFrame {
String result;
result = JOptionPane.showInputDialog(AltosUI.this,
"Configure Callsign",
String result;
result = JOptionPane.showInputDialog(AltosUI.this,
"Configure Callsign",
- AltosPreferences.callsign());
+ Altos
UI
Preferences.callsign());
if (result != null)
if (result != null)
- AltosPreferences.set_callsign(result);
+ Altos
UI
Preferences.set_callsign(result);
}
void ConfigureTeleMetrum() {
new AltosConfig(AltosUI.this);
}
}
void ConfigureTeleMetrum() {
new AltosConfig(AltosUI.this);
}
+ void ConfigureTeleDongle() {
+ new AltosConfigTD(AltosUI.this);
+ }
+
void FlashImage() {
AltosFlashUI.show(AltosUI.this);
}
void FlashImage() {
AltosFlashUI.show(AltosUI.this);
}
@@
-352,6
+366,8
@@
public class AltosUI extends AltosFrame {
in = new FileInputStream(file);
if (filename.endsWith("eeprom"))
return new AltosEepromIterable(in);
in = new FileInputStream(file);
if (filename.endsWith("eeprom"))
return new AltosEepromIterable(in);
+ else if (filename.endsWith("mega"))
+ return new AltosEepromMegaIterable(in);
else
return new AltosTelemetryIterable(in);
} catch (FileNotFoundException fe) {
else
return new AltosTelemetryIterable(in);
} catch (FileNotFoundException fe) {
@@
-522,8
+538,9
@@
public class AltosUI extends AltosFrame {
}
public static void main(final String[] args) {
}
public static void main(final String[] args) {
+ load_library(null);
try {
try {
- UIManager.setLookAndFeel(AltosPreferences.look_and_feel());
+ UIManager.setLookAndFeel(Altos
UI
Preferences.look_and_feel());
} catch (Exception e) {
}
/* Handle batch-mode */
} catch (Exception e) {
}
/* Handle batch-mode */