diff options
author | Lorenz Meier <lm@inf.ethz.ch> | 2012-08-16 20:57:38 +0200 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2012-08-16 20:57:38 +0200 |
commit | 73286f3262b624ab62ce3f2d55e3521c1cb5f135 (patch) | |
tree | 3826b3da0c537d5fb4972c3b1e7824cc91528539 /apps/sensors/sensors.c | |
parent | 8575d8cd49a525bf67e7a11eeb3dd0261e20c77b (diff) | |
download | px4-firmware-73286f3262b624ab62ce3f2d55e3521c1cb5f135.tar.gz px4-firmware-73286f3262b624ab62ce3f2d55e3521c1cb5f135.tar.bz2 px4-firmware-73286f3262b624ab62ce3f2d55e3521c1cb5f135.zip |
Minor tweaks and command parsing debugging
Diffstat (limited to 'apps/sensors/sensors.c')
-rw-r--r-- | apps/sensors/sensors.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/sensors/sensors.c b/apps/sensors/sensors.c index 1506dee1d..5e93f180f 100644 --- a/apps/sensors/sensors.c +++ b/apps/sensors/sensors.c @@ -852,7 +852,7 @@ int sensors_main(int argc, char *argv[]) if (ADC_BATTERY_VOLATGE_CHANNEL == buf_adc.am_channel1) { /* Voltage in volts */ - raw.battery_voltage_v = (BAT_VOL_LOWPASS_1 * (raw.battery_voltage_v + BAT_VOL_LOWPASS_2 * (uint16_t)(buf_adc.am_data1 * battery_voltage_conversion))); + raw.battery_voltage_v = (BAT_VOL_LOWPASS_1 * (raw.battery_voltage_v + BAT_VOL_LOWPASS_2 * (buf_adc.am_data1 * battery_voltage_conversion))); if ((buf_adc.am_data1 * battery_voltage_conversion) < VOLTAGE_BATTERY_IGNORE_THRESHOLD_VOLTS) { raw.battery_voltage_valid = false; |