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://git.gag.com/scm/git/fw/altos
[fw/altos]
/
altosui
/
AltosIgnite.java
diff --git
a/altosui/AltosIgnite.java
b/altosui/AltosIgnite.java
index 3e52ea369d471f82efb91d96281745670a816bb2..f84db0b943175c374f4be7ccdaebf20081772e2d 100644
(file)
--- a/
altosui/AltosIgnite.java
+++ b/
altosui/AltosIgnite.java
@@
-25,6
+25,7
@@
import javax.swing.*;
import javax.swing.filechooser.FileNameExtensionFilter;
import javax.swing.table.*;
import javax.swing.event.*;
import javax.swing.filechooser.FileNameExtensionFilter;
import javax.swing.table.*;
import javax.swing.event.*;
+import org.altusmetrum.AltosLib.*;
public class AltosIgnite {
AltosDevice device;
public class AltosIgnite {
AltosDevice device;
@@
-109,12
+110,23
@@
public class AltosIgnite {
String line = serial.get_reply(5000);
if (line == null)
throw new TimeoutException();
String line = serial.get_reply(5000);
if (line == null)
throw new TimeoutException();
- if (get_string(line, "Igniter: drogue Status: ", status_name))
+ String[] items = line.split("\\s+");
+
+ if (items.length < 4)
+ continue;
+
+ if (!items[0].equals("Igniter:"))
+ continue;
+
+ if (!items[2].equals("Status:"))
+ continue;
+
+ if (items[1].equals("drogue")) {
if (igniter == Apogee)
if (igniter == Apogee)
- status = status(
status_name.get()
);
-
if (get_string(line, "Igniter: main Status: ", status_name
)) {
+ status = status(
items[3]
);
+
} else if (items[1].equals("main"
)) {
if (igniter == Main)
if (igniter == Main)
- status = status(
status_name.get()
);
+ status = status(
items[3]
);
break;
}
}
break;
}
}
@@
-177,7
+189,7
@@
public class AltosIgnite {
serial = new AltosSerial(device);
remote = false;
serial = new AltosSerial(device);
remote = false;
- if (!device.matchProduct(Altos.product_
telemetrum
))
+ if (!device.matchProduct(Altos.product_
altimeter
))
remote = true;
}
}
\ No newline at end of file
remote = true;
}
}
\ No newline at end of file