Merge branch 'master' of ssh://git.gag.com/scm/git/fw/altos
[fw/altos] / altoslib / AltosConvert.java
index a5eb7ff8258c578b5ffc2f28a1d2a94c72bb1d5e..3e0f0e1ac99170caa03b1a626575fd936bae1873 100644 (file)
@@ -18,7 +18,7 @@
 /*
  * Sensor data conversion functions
  */
-package org.altusmetrum.altoslib_6;
+package org.altusmetrum.altoslib_7;
 
 public class AltosConvert {
        /*
@@ -230,6 +230,12 @@ public class AltosConvert {
                return sensor / 32767.0 * supply * (5.6 + 10.0) / 10.0;
        }
 
+       static double tele_bt_3_battery(int raw) {
+               if (raw == AltosLib.MISSING)
+                       return AltosLib.MISSING;
+               return 3.3 * mega_adc(raw) * (5.1 + 10.0) / 10.0;
+       }
+
        static double easy_mini_voltage(int sensor, int serial) {
                double  supply = 3.3;
                double  diode_offset = 0.0;