Browse Source

AP_Compass: removed comparison out of range compiler warning

uint_ >= 0 (-Wtype-limits)
mission-4.1.18
Tobias 12 years ago committed by Andrew Tridgell
parent
commit
ab311d1dd4
  1. 2
      libraries/AP_Compass/Compass.h

2
libraries/AP_Compass/Compass.h

@ -135,7 +135,7 @@ public: @@ -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

Loading…
Cancel
Save