projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
altosui: Support raw telemetry from TeleDongle
[fw/altos]
/
altosui
/
AltosLog.java
diff --git
a/altosui/AltosLog.java
b/altosui/AltosLog.java
index dd147d21adb960818ff3d26423f7c5e48816ba36..64275f32e4a9868e4a336d6808babb3c11d94fe2 100644
(file)
--- a/
altosui/AltosLog.java
+++ b/
altosui/AltosLog.java
@@
-54,9
+54,10
@@
class AltosLog implements Runnable {
}
}
}
}
- boolean open (Altos
Telemetry
telem) throws IOException {
+ boolean open (Altos
Record
telem) throws IOException {
AltosFile a = new AltosFile(telem);
AltosFile a = new AltosFile(telem);
+ System.out.printf("open %s\n", a.toString());
log_file = new FileWriter(a, true);
if (log_file != null) {
while (!pending_queue.isEmpty()) {
log_file = new FileWriter(a, true);
if (log_file != null) {
while (!pending_queue.isEmpty()) {
@@
-74,18
+75,21
@@
class AltosLog implements Runnable {
public void run () {
try {
public void run () {
try {
+ AltosRecord previous = null;
for (;;) {
AltosLine line = input_queue.take();
if (line.line == null)
continue;
try {
for (;;) {
AltosLine line = input_queue.take();
if (line.line == null)
continue;
try {
- Altos
Telemetry telem = new AltosTelemetry(line.line
);
+ Altos
Record telem = AltosTelemetry.parse(line.line, previous
);
if (telem.serial != serial || telem.flight != flight || log_file == null) {
close_log_file();
serial = telem.serial;
flight = telem.flight;
if (telem.serial != serial || telem.flight != flight || log_file == null) {
close_log_file();
serial = telem.serial;
flight = telem.flight;
+ System.out.printf("Opening telem %d %d\n", serial, flight);
open(telem);
}
open(telem);
}
+ previous = telem;
} catch (ParseException pe) {
} catch (AltosCRCException ce) {
}
} catch (ParseException pe) {
} catch (AltosCRCException ce) {
}