diff options
author | Lorenz Meier <lm@inf.ethz.ch> | 2013-02-16 18:16:29 +0100 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2013-02-16 18:16:29 +0100 |
commit | 598622a00f71fac330c7bc919382466cfa059601 (patch) | |
tree | 03ff312a1d34533d9d232a263edbae7fab215b10 /apps/px4io | |
parent | 63d95f672edefdb6a528accd3b0839c6a479ae84 (diff) | |
download | px4-firmware-598622a00f71fac330c7bc919382466cfa059601.tar.gz px4-firmware-598622a00f71fac330c7bc919382466cfa059601.tar.bz2 px4-firmware-598622a00f71fac330c7bc919382466cfa059601.zip |
Slightly adjusted battery voltage measurement after calibration against B&K Precision lab supply with beefy wiring. Needs more cross-validation.
Diffstat (limited to 'apps/px4io')
-rw-r--r-- | apps/px4io/registers.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/px4io/registers.c b/apps/px4io/registers.c index 6229a6cc1..f14cd8309 100644 --- a/apps/px4io/registers.c +++ b/apps/px4io/registers.c @@ -457,7 +457,7 @@ registers_get(uint8_t page, uint8_t offset, uint16_t **values, unsigned *num_val * Intercept corrected for best results @ 12V. */ unsigned counts = adc_measure(ADC_VBATT); - unsigned mV = (4150 + (counts * 46)) / 10; + unsigned mV = (4150 + (counts * 46)) / 10 - 200; unsigned corrected = (mV * r_page_setup[PX4IO_P_SETUP_VBATT_SCALE]) / 10000; r_page_status[PX4IO_P_STATUS_VBATT] = corrected; |