X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=altoslib%2FAltosState.java;h=9e8e22ac8d945168512db1266df11656c63cc9e4;hp=d65e3bd88fb2bc466ce97457d3d8c478ebefdfb7;hb=4a5ef9eaa8b809c56813625133120e7e91fc8e65;hpb=adddad0dd45f67d01487c8dd75b040ca3ab50fe2 diff --git a/altoslib/AltosState.java b/altoslib/AltosState.java index d65e3bd8..9e8e22ac 100644 --- a/altoslib/AltosState.java +++ b/altoslib/AltosState.java @@ -19,7 +19,7 @@ * Track flight state from telemetry or eeprom data stream */ -package org.altusmetrum.altoslib_3; +package org.altusmetrum.altoslib_4; public class AltosState implements Cloneable { @@ -614,11 +614,14 @@ 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; @@ -706,11 +709,14 @@ public class AltosState implements Cloneable { 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() { @@ -835,11 +841,14 @@ public class AltosState implements Cloneable { 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() { @@ -1114,6 +1123,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;