diff options
author | Keith Packard <keithp@keithp.com> | 2012-07-18 00:01:51 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2012-07-18 00:01:51 -0700 |
commit | f164e48cbeff521d45737794e2046a08322951d6 (patch) | |
tree | 4ca4c9786519633212255e111f4f3efb7c9f7cd6 /altoslib | |
parent | a698cd68968fc0be5f96b1729cdea2f65d2ccbf6 (diff) |
altosui: Make scan UI handle incremental telem data
The new telem format doesn't send everything in each telem packet, so
we need to handle updating information incrementally in the scan
results. This involved clearing old scan data when switching
frequencies and then updating existing entries with new data as it arrives.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'altoslib')
-rw-r--r-- | altoslib/AltosIdleMonitor.java | 2 | ||||
-rw-r--r-- | altoslib/AltosTelemetryReader.java | 5 |
2 files changed, 5 insertions, 2 deletions
diff --git a/altoslib/AltosIdleMonitor.java b/altoslib/AltosIdleMonitor.java index cd518c28..57c4da71 100644 --- a/altoslib/AltosIdleMonitor.java +++ b/altoslib/AltosIdleMonitor.java @@ -162,8 +162,6 @@ class AltosSensorMM { } i++; } - for (int i = 0; i < sense.length; i++) - System.out.printf("sense[%d]: %d\n", i, sense[i]); break; } } diff --git a/altoslib/AltosTelemetryReader.java b/altoslib/AltosTelemetryReader.java index 911a099a..bdb44eef 100644 --- a/altoslib/AltosTelemetryReader.java +++ b/altoslib/AltosTelemetryReader.java @@ -44,6 +44,11 @@ public class AltosTelemetryReader extends AltosFlightReader { telem.clear(); } + public void reset() { + previous = null; + flush(); + } + public void close(boolean interrupted) { link.remove_monitor(telem); log.close(); |