* Track flight state from telemetry or eeprom data stream
*/
-package org.altusmetrum.altoslib_3;
+package org.altusmetrum.altoslib_4;
public class AltosState implements Cloneable {
public double ground_accel_avg;
public int log_format;
+ public String product;
public AltosMs5607 baro;
public AltosCompanion companion;
+ public int pyro_fired;
+
public void set_npad(int npad) {
this.npad = npad;
gps_waiting = MIN_PAD_SAMPLES - npad;
ground_accel_avg = AltosLib.MISSING;
log_format = AltosLib.MISSING;
+ product = null;
serial = AltosLib.MISSING;
receiver_serial = AltosLib.MISSING;
baro = null;
companion = null;
+
+ pyro_fired = 0;
}
void finish_update() {
ground_accel_avg = old.ground_accel_avg;
log_format = old.log_format;
+ product = old.product;
serial = old.serial;
receiver_serial = old.receiver_serial;
baro = old.baro;
companion = old.companion;
+
+ pyro_fired = old.pyro_fired;
}
void update_time() {
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;