diff options
author | Lorenz Meier <lm@inf.ethz.ch> | 2015-02-09 16:52:34 +0100 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2015-02-09 22:56:26 +0100 |
commit | df2ad183e3284c7526a43dc6f89ffb2d8303d337 (patch) | |
tree | ee44eefdf44423a23a75490ec4dde4dcd0e5e3eb /src/modules | |
parent | 3a151a9d0077d2de46c5171f6435430cf23a983f (diff) | |
download | px4-firmware-df2ad183e3284c7526a43dc6f89ffb2d8303d337.tar.gz px4-firmware-df2ad183e3284c7526a43dc6f89ffb2d8303d337.tar.bz2 px4-firmware-df2ad183e3284c7526a43dc6f89ffb2d8303d337.zip |
Initialize error counts high enough
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/sensors/sensors.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/modules/sensors/sensors.cpp b/src/modules/sensors/sensors.cpp index 82671372d..c5b7a2265 100644 --- a/src/modules/sensors/sensors.cpp +++ b/src/modules/sensors/sensors.cpp @@ -2074,6 +2074,21 @@ Sensors::task_main() raw.adc_voltage_v[2] = 0.0f; raw.adc_voltage_v[3] = 0.0f; + /* set high initial error counts to deselect gyros */ + raw.gyro_errcount = 100000; + raw.gyro1_errcount = 100000; + raw.gyro2_errcount = 100000; + + /* set high initial error counts to deselect accels */ + raw.accelerometer_errcount = 100000; + raw.accelerometer1_errcount = 100000; + raw.accelerometer2_errcount = 100000; + + /* set high initial error counts to deselect mags */ + raw.magnetometer_errcount = 100000; + raw.magnetometer1_errcount = 100000; + raw.magnetometer2_errcount = 100000; + memset(&_battery_status, 0, sizeof(_battery_status)); _battery_status.voltage_v = -1.0f; _battery_status.voltage_filtered_v = -1.0f; |