diff options
author | Keith Packard <keithp@keithp.com> | 2014-08-17 20:49:27 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2014-08-17 20:49:27 -0700 |
commit | 935f769fee351545622e223a283fca64608ca410 (patch) | |
tree | a31f7f778a9df7df2026b7daaa856b6eb720d964 | |
parent | 59dfe661fcb504f390d9726378c676f2b5b005f3 (diff) |
altoslib: Parse 'Log fixed:' configuration value
TeleGPS holds a single flight record and constantly appends data to it
instead of having separate flight records on the board. It reports
'Log fixed: 1' to let AltosLib know that the size of the per-flight
log is not configurable.
Signed-off-by: Keith Packard <keithp@keithp.com>
-rw-r--r-- | altoslib/AltosConfigData.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/altoslib/AltosConfigData.java b/altoslib/AltosConfigData.java index 134a0ed2..fd38635c 100644 --- a/altoslib/AltosConfigData.java +++ b/altoslib/AltosConfigData.java @@ -58,6 +58,7 @@ public class AltosConfigData implements Iterable<String> { /* HAS_LOG */ public int flight_log_max; + public int log_fixed; /* HAS_IGNITE */ public int ignite_mode; @@ -244,6 +245,7 @@ public class AltosConfigData implements Iterable<String> { pad_orientation = -1; flight_log_max = -1; + log_fixed = -1; ignite_mode = -1; aes_key = ""; @@ -316,6 +318,7 @@ public class AltosConfigData implements Iterable<String> { /* HAS_LOG */ try { flight_log_max = get_int(line, "Max flight log:"); } catch (Exception e) {} + try { log_fixed = get_int(line, "Log fixed:"); } catch (Exception e) {} /* HAS_IGNITE */ try { ignite_mode = get_int(line, "Ignite mode:"); } catch (Exception e) {} @@ -498,6 +501,9 @@ public class AltosConfigData implements Iterable<String> { if (log_space() == 0) max_enabled = false; + if (log_fixed > 0) + max_enabled = false; + switch (log_format) { case AltosLib.AO_LOG_FORMAT_TINY: max_enabled = false; |