From 3ce7667e5a9d7c660f356f8c886ba812aaf12357 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 16 Oct 2014 10:55:38 +1100 Subject: [PATCH] AP_InertialSensor: tidy up MPU6000 driver --- libraries/AP_InertialSensor/AP_InertialSensor_MPU6000.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libraries/AP_InertialSensor/AP_InertialSensor_MPU6000.cpp b/libraries/AP_InertialSensor/AP_InertialSensor_MPU6000.cpp index 42db807b1a..f9687c66a7 100644 --- a/libraries/AP_InertialSensor/AP_InertialSensor_MPU6000.cpp +++ b/libraries/AP_InertialSensor/AP_InertialSensor_MPU6000.cpp @@ -507,10 +507,11 @@ bool AP_InertialSensor_MPU6000::_hardware_init(AP_InertialSensor::Sample_rate sa _sample_count = 2; break; case AP_InertialSensor::RATE_200HZ: - default: default_filter = BITS_DLPF_CFG_20HZ; _sample_count = 1; break; + default: + return false; } _set_filter_register(_imu.get_filter(), default_filter);