From ab311d1dd4e5dd6978223875fd92c4281627776d Mon Sep 17 00:00:00 2001 From: Tobias Date: Fri, 24 May 2013 13:02:49 +0200 Subject: [PATCH] AP_Compass: removed comparison out of range compiler warning uint_ >= 0 (-Wtype-limits) --- libraries/AP_Compass/Compass.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/AP_Compass/Compass.h b/libraries/AP_Compass/Compass.h index 041e0fe377..86cff6f24e 100644 --- a/libraries/AP_Compass/Compass.h +++ b/libraries/AP_Compass/Compass.h @@ -135,7 +135,7 @@ public: /// @param comp_type 0 = disabled, 1 = enabled use throttle, 2 = enabled use current /// void motor_compensation_type(const uint8_t comp_type) { - if( comp_type >= AP_COMPASS_MOT_COMP_DISABLED && _motor_comp_type <= AP_COMPASS_MOT_COMP_CURRENT && _motor_comp_type != (int8_t)comp_type) { + if (_motor_comp_type <= AP_COMPASS_MOT_COMP_CURRENT && _motor_comp_type != (int8_t)comp_type) { _motor_comp_type = (int8_t)comp_type; _thr_or_curr = 0; // set current current or throttle to zero set_motor_compensation(Vector3f(0,0,0)); // clear out invalid compensation vector