altoslib: Parse 'Log fixed:' configuration value
[fw/altos] / altoslib / AltosConfigData.java
index 134a0ed2ce0e1d7b3196794b1a45a57187475df7..fd38635cc0cd25c1e7e1560c5741e53ac8bafe09 100644 (file)
@@ -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;