From 935f769fee351545622e223a283fca64608ca410 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Sun, 17 Aug 2014 20:49:27 -0700 Subject: [PATCH] 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 --- altoslib/AltosConfigData.java | 6 ++++++ 1 file changed, 6 insertions(+) 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 { /* 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 { pad_orientation = -1; flight_log_max = -1; + log_fixed = -1; ignite_mode = -1; aes_key = ""; @@ -316,6 +318,7 @@ public class AltosConfigData implements Iterable { /* 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 { 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; -- 2.30.2