altos: Add bit-bang i2c driver
[fw/altos] / altoslib / AltosCalData.java
index 7b16ae3911abb45ab30f767542dec8ddd80d33b5..8bca92291757a42c695985c23bb5337334c9b4e4 100644 (file)
@@ -12,7 +12,7 @@
  * General Public License for more details.
  */
 
-package org.altusmetrum.altoslib_13;
+package org.altusmetrum.altoslib_14;
 
 /*
  * Calibration and other data needed to construct 'real' values from various data
@@ -120,6 +120,13 @@ public class AltosCalData {
                        this.ground_accel = ground_accel;
        }
 
+       public double           ground_motor_pressure = AltosLib.MISSING;
+
+       public void set_ground_motor_pressure(double ground_motor_pressure) {
+               if (ground_motor_pressure != AltosLib.MISSING)
+                       this.ground_motor_pressure = ground_motor_pressure;
+       }
+
        /* Raw acceleration value */
        public double           accel = AltosLib.MISSING;
 
@@ -247,6 +254,10 @@ public class AltosCalData {
 
        public int              state = AltosLib.MISSING;
 
+       public String state_name() {
+               return AltosLib.state_name(state);
+       }
+
        public void set_state(int state) {
                if (state >= AltosLib.ao_flight_boost && boost_tick == AltosLib.MISSING)
                        set_boost_tick();
@@ -329,7 +340,9 @@ public class AltosCalData {
                return AltosIMU.convert_accel(counts - accel_zero_through, imu_type);
        }
 
-       public double   gyro_zero_roll, gyro_zero_pitch, gyro_zero_yaw;
+       public double   gyro_zero_roll = AltosLib.MISSING;
+       public double   gyro_zero_pitch = AltosLib.MISSING;
+       public double   gyro_zero_yaw = AltosLib.MISSING;
 
        public void set_gyro_zero(double roll, double pitch, double yaw) {
                if (roll != AltosLib.MISSING) {