summaryrefslogtreecommitdiff
path: root/altoslib/AltosState.java
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2016-05-15 13:56:21 -0700
committerKeith Packard <keithp@keithp.com>2016-05-15 13:56:21 -0700
commit3c4278a29082a2af5911e22e59f8f52549f549e3 (patch)
treecd8c5c4cf16fbcac06133065d90c68f0ab7262ce /altoslib/AltosState.java
parentf484216e72f81decb2aaa7289d6f69678990b7af (diff)
altoslib: Add log_space to AltosState
TeleGPS doesn't have flight_log_max value, but does have log_space which we can use for the same thing in monitor idle mode. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'altoslib/AltosState.java')
-rw-r--r--altoslib/AltosState.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/altoslib/AltosState.java b/altoslib/AltosState.java
index 0970a88e..d359d67a 100644
--- a/altoslib/AltosState.java
+++ b/altoslib/AltosState.java
@@ -832,6 +832,7 @@ public class AltosState implements Cloneable, AltosHashable {
public double ground_accel_avg;
public int log_format;
+ public int log_space;
public String product;
public AltosMs5607 baro;
@@ -949,6 +950,7 @@ public class AltosState implements Cloneable, AltosHashable {
ground_accel_avg = AltosLib.MISSING;
log_format = AltosLib.MISSING;
+ log_space = AltosLib.MISSING;
product = null;
serial = AltosLib.MISSING;
receiver_serial = AltosLib.MISSING;
@@ -1108,6 +1110,7 @@ public class AltosState implements Cloneable, AltosHashable {
ground_accel_avg = old.ground_accel_avg;
log_format = old.log_format;
+ log_space = old.log_space;
product = old.product;
serial = old.serial;
receiver_serial = old.receiver_serial;
@@ -1226,6 +1229,10 @@ public class AltosState implements Cloneable, AltosHashable {
}
}
+ public void set_log_space(int log_space) {
+ this.log_space = log_space;
+ }
+
public void set_flight_params(int apogee_delay, int main_deploy) {
this.apogee_delay = apogee_delay;
this.main_deploy = main_deploy;
@@ -1730,6 +1737,7 @@ public class AltosState implements Cloneable, AltosHashable {
h.putDouble("ground_accel", ground_accel);
h.putDouble("ground_accel_avg", ground_accel_avg);
h.putInt("log_format", log_format);
+ h.putInt("log_space", log_space);
h.putString("product", product);
h.putHashable("baro", baro);
h.putHashable("companion", companion);
@@ -1834,6 +1842,7 @@ public class AltosState implements Cloneable, AltosHashable {
ground_accel = h.getDouble("ground_accel", ground_accel);
ground_accel_avg = h.getDouble("ground_accel_avg", ground_accel_avg);
log_format = h.getInt("log_format", log_format);
+ log_space = h.getInt("log_space", log_space);
product = h.getString("product", product);
baro = AltosMs5607.fromHashSet(h.getHash("baro"), baro);
companion = AltosCompanion.fromHashSet(h.getHash("companion"), companion);