summaryrefslogtreecommitdiff
path: root/altoslib/AltosState.java
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2014-04-30 21:30:46 -0700
committerKeith Packard <keithp@keithp.com>2014-04-30 21:30:46 -0700
commitecebb3902868d1d7485d2bc99ba4140c6b90567e (patch)
tree234c2383d682cbfc68c3623de61f05e4a61620d0 /altoslib/AltosState.java
parent5fb246fb50e262aa81ef7eb430be9782cfcf8848 (diff)
altoslib: Track pyro firing state when reading mega eeprom files
TeleMega records whether each pyro has been fired in the eeprom file; track that in the AltosState record. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'altoslib/AltosState.java')
-rw-r--r--altoslib/AltosState.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/altoslib/AltosState.java b/altoslib/AltosState.java
index d65e3bd8..4dbd751b 100644
--- a/altoslib/AltosState.java
+++ b/altoslib/AltosState.java
@@ -619,6 +619,8 @@ public class AltosState implements Cloneable {
public AltosCompanion companion;
+ public int pyro_fired;
+
public void set_npad(int npad) {
this.npad = npad;
gps_waiting = MIN_PAD_SAMPLES - npad;
@@ -711,6 +713,8 @@ public class AltosState implements Cloneable {
baro = null;
companion = null;
+
+ pyro_fired = 0;
}
void finish_update() {
@@ -840,6 +844,8 @@ public class AltosState implements Cloneable {
baro = old.baro;
companion = old.companion;
+
+ pyro_fired = old.pyro_fired;
}
void update_time() {
@@ -1114,6 +1120,10 @@ public class AltosState implements Cloneable {
this.ignitor_voltage = voltage;
}
+ public void set_pyro_fired(int fired) {
+ this.pyro_fired = fired;
+ }
+
public double time_since_boost() {
if (tick == AltosLib.MISSING)
return 0.0;