summaryrefslogtreecommitdiff
path: root/altoslib/AltosTelemetryIterable.java
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2013-10-14 20:42:14 -0700
committerKeith Packard <keithp@keithp.com>2013-10-14 20:42:14 -0700
commitdb4cd8b3838d27bebdeb6a085a739a36f7634a91 (patch)
treec1e2b489b2f1c50714fa6ac3ffbd380384a0e7a4 /altoslib/AltosTelemetryIterable.java
parent1bd9786802751391cca3b83ac3045029e00e39ee (diff)
altoslib,altosui: Be more robust when graphing bogus .telem files
Deal with files containing multiple serial number/flight number values by preserving the boost_tick value across state resets. Check for invalid state when computing actual boost time for the stats window. Ignore invalid speed/accel values when computing averages. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'altoslib/AltosTelemetryIterable.java')
-rw-r--r--altoslib/AltosTelemetryIterable.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/altoslib/AltosTelemetryIterable.java b/altoslib/AltosTelemetryIterable.java
index 9da3b0e6..bf30b4c8 100644
--- a/altoslib/AltosTelemetryIterable.java
+++ b/altoslib/AltosTelemetryIterable.java
@@ -68,7 +68,7 @@ public class AltosTelemetryIterable implements Iterable<AltosTelemetry> {
public void add (AltosTelemetry telem) {
int t = telem.tick;
if (!telems.isEmpty()) {
- while (t < tick - 32767)
+ while (t < tick - 1000)
t += 65536;
}
tick = t;