diff options
author | Thomas Gubler <thomasgubler@gmail.com> | 2013-02-26 11:18:13 +0100 |
---|---|---|
committer | Thomas Gubler <thomasgubler@gmail.com> | 2013-02-26 11:18:13 +0100 |
commit | de77cba5387018007f0a2b27aeb6984ee9ebc1d0 (patch) | |
tree | c0348986fcfda605aec1e61372ba4d91ffb9e533 /apps/sensors/sensors.cpp | |
parent | 6f1d7dc7de3609f73367794acc8d625c1ca27d03 (diff) | |
download | px4-firmware-de77cba5387018007f0a2b27aeb6984ee9ebc1d0.tar.gz px4-firmware-de77cba5387018007f0a2b27aeb6984ee9ebc1d0.tar.bz2 px4-firmware-de77cba5387018007f0a2b27aeb6984ee9ebc1d0.zip |
small cleanup
Diffstat (limited to 'apps/sensors/sensors.cpp')
-rw-r--r-- | apps/sensors/sensors.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/apps/sensors/sensors.cpp b/apps/sensors/sensors.cpp index f77bc9b8b..6a4cf0c65 100644 --- a/apps/sensors/sensors.cpp +++ b/apps/sensors/sensors.cpp @@ -1041,10 +1041,7 @@ Sensors::adc_poll(struct sensor_combined_s &raw) */ if (voltage > 0.4f) { -// float pres_raw = fabsf(voltage - (3.3f / 2.0f)); -// float pres_mbar = pres_raw * (3.3f / 5.0f) * 10.0f; - //XXX depends on sensor used..., where are the above numbers from? - float diff_pres_pa = (voltage - _parameters.airspeed_offset) * 1000.0f; //for MPXV7002DP + float diff_pres_pa = (voltage - _parameters.airspeed_offset) * 1000.0f; //for MPXV7002DP sensor float airspeed_true = calc_true_airspeed(diff_pres_pa + _barometer.pressure*1e2f, _barometer.pressure*1e2f, _barometer.temperature - 5.0f); //factor 1e2 for conversion from mBar to Pa @@ -1074,7 +1071,6 @@ Sensors::adc_poll(struct sensor_combined_s &raw) } _last_adc = hrt_absolute_time(); - //break; } } } |