if (reader != null)
new AltosFlightUI(voice, reader, device.getSerial());
} catch (FileNotFoundException ee) {
JOptionPane.showMessageDialog(AltosUI.this,
if (reader != null)
new AltosFlightUI(voice, reader, device.getSerial());
} catch (FileNotFoundException ee) {
JOptionPane.showMessageDialog(AltosUI.this,
"Cannot open target device",
JOptionPane.ERROR_MESSAGE);
} catch (AltosSerialInUseException si) {
"Cannot open target device",
JOptionPane.ERROR_MESSAGE);
} catch (AltosSerialInUseException si) {
- java.net.URL imgURL = AltosUI.class.getResource("/altus-metrum-16x16.jpg");
- if (imgURL != null)
- setIconImage(new ImageIcon(imgURL).getImage());
-
- AltosPreferences.set_component(this);
+ AltosUIPreferences.set_component(this);
- 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 = 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) {
- 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");
in = new FileInputStream(file);
if (filename.endsWith("eeprom"))
return new AltosEepromIterable(in);
in = new FileInputStream(file);
if (filename.endsWith("eeprom"))
return new AltosEepromIterable(in);
String output = Altos.replace_extension(input,".csv");
System.out.printf("Processing \"%s\" to \"%s\"\n", input, output);
if (input.equals(output)) {
System.out.printf("Not processing '%s'\n", input);
String output = Altos.replace_extension(input,".csv");
System.out.printf("Processing \"%s\" to \"%s\"\n", input, output);
if (input.equals(output)) {
System.out.printf("Not processing '%s'\n", input);
String output = Altos.replace_extension(input,".kml");
System.out.printf("Processing \"%s\" to \"%s\"\n", input, output);
if (input.equals(output)) {
System.out.printf("Not processing '%s'\n", input);
String output = Altos.replace_extension(input,".kml");
System.out.printf("Processing \"%s\" to \"%s\"\n", input, output);
if (input.equals(output)) {
System.out.printf("Not processing '%s'\n", input);
static AltosReplayReader replay_file(String filename) {
AltosRecordIterable recs = record_iterable_file(filename);
if (recs == null)
static AltosReplayReader replay_file(String filename) {
AltosRecordIterable recs = record_iterable_file(filename);
if (recs == null)
AltosFlightUI flight_ui = new AltosFlightUI(new AltosVoice(), reader);
flight_ui.set_exit_on_close();
AltosFlightUI flight_ui = new AltosFlightUI(new AltosVoice(), reader);
flight_ui.set_exit_on_close();
- static void process_summary(String filename) {
- AltosReplayReader reader = replay_file(filename);
+ static boolean process_summary(String filename) {
+ AltosRecordIterable iterable = record_iterable_file(filename);
+ if (iterable == null)
+ return false;
System.out.printf("Flight time: %6.0f s\n",
stats.state_end[Altos.ao_flight_main] -
stats.state_start[Altos.ao_flight_boost]);
System.out.printf("Flight time: %6.0f s\n",
stats.state_end[Altos.ao_flight_main] -
stats.state_start[Altos.ao_flight_boost]);