summaryrefslogtreecommitdiff
path: root/altoslib/AltosEepromRecordFireTwo.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/AltosEepromRecordFireTwo.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/AltosEepromRecordFireTwo.java')
-rw-r--r--altoslib/AltosEepromRecordFireTwo.java14
1 files changed, 6 insertions, 8 deletions
diff --git a/altoslib/AltosEepromRecordFireTwo.java b/altoslib/AltosEepromRecordFireTwo.java
index bfdd6cf8..713d0bb7 100644
--- a/altoslib/AltosEepromRecordFireTwo.java
+++ b/altoslib/AltosEepromRecordFireTwo.java
@@ -68,21 +68,19 @@ public class AltosEepromRecordFireTwo extends AltosEepromRecord {
return AltosConvert.lb_to_n(v * 298 * 9.807);
}
- public void update_state(AltosFlightListener state) {
- super.update_state(state);
+ public void provide_data(AltosDataListener listener, AltosCalData cal_data) {
+ super.provide_data(listener, cal_data);
switch (cmd()) {
case AltosLib.AO_LOG_FLIGHT:
- state.set_flight(flight());
- state.set_ground_pressure(0.0);
- state.set_accel_g(0, -1);
+ cal_data.set_flight(flight());
break;
case AltosLib.AO_LOG_STATE:
- state.set_state(state());
+ listener.set_state(state());
break;
case AltosLib.AO_LOG_SENSOR:
- state.set_pressure(adc_to_pa(pres()));
- state.set_thrust(adc_to_n(thrust()));
+ listener.set_pressure(adc_to_pa(pres()));
+ listener.set_thrust(adc_to_n(thrust()));
break;
}
}