summaryrefslogtreecommitdiff
path: root/altoslib/AltosTelemetryReader.java
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2012-07-18 00:01:51 -0700
committerKeith Packard <keithp@keithp.com>2012-07-18 00:01:51 -0700
commitf164e48cbeff521d45737794e2046a08322951d6 (patch)
tree4ca4c9786519633212255e111f4f3efb7c9f7cd6 /altoslib/AltosTelemetryReader.java
parenta698cd68968fc0be5f96b1729cdea2f65d2ccbf6 (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/AltosTelemetryReader.java')
-rw-r--r--altoslib/AltosTelemetryReader.java5
1 files changed, 5 insertions, 0 deletions
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();