summaryrefslogtreecommitdiff
path: root/altoslib/AltosIdleReader.java
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2017-05-25 17:24:14 -0700
committerKeith Packard <keithp@keithp.com>2017-05-25 17:24:14 -0700
commitf26cfe417c6977cf1e7e75a4f050e25f64d41859 (patch)
tree2f19ca9c93c3246b3eeadafee250f9dd3ee222d6 /altoslib/AltosIdleReader.java
parent7600116a191b3ac252a0f716d200d0e0b3500987 (diff)
altoslib: Do data analysis on raw values rather than AltosState
Use AltosFlightSeries instead of a sequence of AltosState records when processing saved data. This provides a better way of doing filtering and plotting. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'altoslib/AltosIdleReader.java')
-rw-r--r--altoslib/AltosIdleReader.java9
1 files changed, 3 insertions, 6 deletions
diff --git a/altoslib/AltosIdleReader.java b/altoslib/AltosIdleReader.java
index 5903c968..49d0cf61 100644
--- a/altoslib/AltosIdleReader.java
+++ b/altoslib/AltosIdleReader.java
@@ -48,11 +48,6 @@ public class AltosIdleReader extends AltosFlightReader {
boolean worked = false;
boolean aborted = false;
- if (state == null)
- state = new AltosState();
- else
- state = state.clone();
-
long delay = next_millis - System.currentTimeMillis();
if (delay > 0)
@@ -61,7 +56,9 @@ public class AltosIdleReader extends AltosFlightReader {
try {
try {
start_link();
- fetch.update_state(state);
+ if (state == null)
+ state = new AltosState(new AltosCalData(link.config_data()));
+ fetch.provide_data(state, state.cal_data);
if (!link.has_error && !link.reply_abort)
worked = true;
} catch (TimeoutException te) {