AP_Compass: removed comparison out of range compiler warning

uint_ >= 0 (-Wtype-limits)
This commit is contained in:
Tobias 2013-05-24 13:02:49 +02:00 committed by Andrew Tridgell
parent cf426fcb3e
commit ab311d1dd4
1 changed files with 1 additions and 1 deletions

View File

@ -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