Bump java library versions
[fw/altos] / altoslib / AltosConfigData.java
index a9e863c7759edac882571fa00ab7904d190b7602..d8f4d945e466bf5d9d8e61f35b721bd414e6ae31 100644 (file)
@@ -15,7 +15,7 @@
  * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
  */
 
-package org.altusmetrum.altoslib_5;
+package org.altusmetrum.altoslib_6;
 
 import java.util.*;
 import java.text.*;
@@ -93,6 +93,16 @@ public class AltosConfigData implements Iterable<String> {
        /* HAS_GYRO */
        public int      accel_zero_along, accel_zero_across, accel_zero_through;
 
+       /* ms5607 data */
+       public int      ms5607_reserved;
+       public int      ms5607_sens;
+       public int      ms5607_off;
+       public int      ms5607_tcs;
+       public int      ms5607_tco;
+       public int      ms5607_tref;
+       public int      ms5607_tempsens;
+       public int      ms5607_crc;
+
        public static String get_string(String line, String label) throws  ParseException {
                if (line.startsWith(label)) {
                        String  quoted = line.substring(label.length()).trim();
@@ -289,6 +299,15 @@ public class AltosConfigData implements Iterable<String> {
 
                /* Version also contains MS5607 info, which we ignore here */
 
+               try { ms5607_reserved = get_int(line, "ms5607 reserved:"); } catch (Exception e) {}
+               try { ms5607_sens = get_int(line, "ms5607 sens:"); } catch (Exception e) {}
+               try { ms5607_off = get_int(line, "ms5607 off:"); } catch (Exception e) {}
+               try { ms5607_tcs = get_int(line, "ms5607 tcs:"); } catch (Exception e) {}
+               try { ms5607_tco = get_int(line, "ms5607 tco:"); } catch (Exception e) {}
+               try { ms5607_tref = get_int(line, "ms5607 tref:"); } catch (Exception e) {}
+               try { ms5607_tempsens = get_int(line, "ms5607 tempsens:"); } catch (Exception e) {}
+               try { ms5607_crc = get_int(line, "ms5607 crc:"); } catch (Exception e) {}
+
                /* Config show replies */
 
                /* HAS_FLIGHT */
@@ -558,6 +577,14 @@ public class AltosConfigData implements Iterable<String> {
                dest.set_tracker_interval(tracker_interval);
        }
 
+       public boolean log_has_state() {
+               switch (log_format) {
+               case AltosLib.AO_LOG_FORMAT_TELEGPS:
+                       return false;
+               }
+               return true;
+       }
+
        public void save(AltosLink link, boolean remote) throws InterruptedException, TimeoutException {
 
                /* HAS_FLIGHT */