altoslib: fix computation of TeleGPS battery voltage
authorBdale Garbee <bdale@gag.com>
Sat, 20 Oct 2018 07:17:39 +0000 (01:17 -0600)
committerBdale Garbee <bdale@gag.com>
Sat, 20 Oct 2018 07:17:39 +0000 (01:17 -0600)
altoslib/AltosConvert.java

index d246018..e193043 100644 (file)
@@ -261,7 +261,7 @@ public class AltosConvert {
        static double tele_gps_voltage(int sensor) {
                double  supply = 3.3;
 
-               return sensor / 32767.0 * supply * (5.6 + 10.0) / 10.0;
+               return sensor / 4095.0 * supply * (5.6 + 10.0) / 10.0;
        }
 
        static double tele_bt_3_battery(int raw) {