Browse Source

SITL: Gripper_EPM compiler warning resolved by using float and fabsf

master
Randy Mackay 6 years ago committed by Andrew Tridgell
parent
commit
d4b047fc1f
  1. 2
      libraries/SITL/SIM_Gripper_EPM.cpp
  2. 4
      libraries/SITL/SIM_Gripper_EPM.h

2
libraries/SITL/SIM_Gripper_EPM.cpp

@ -107,7 +107,7 @@ bool Gripper_EPM::should_report()
return false; return false;
} }
if (abs(reported_field_strength - field_strength) > 10.0) { if (fabsf(reported_field_strength - field_strength) > 10.0) {
return true; return true;
} }

4
libraries/SITL/SIM_Gripper_EPM.h

@ -48,8 +48,8 @@ private:
bool servo_based = true; bool servo_based = true;
double field_strength; // percentage float field_strength; // percentage
double reported_field_strength = -1; // unlikely float reported_field_strength = -1; // unlikely
// I've a feeling these are probably a higher order than this: // I've a feeling these are probably a higher order than this:
const float field_strength_slew_rate = 400; // (percentage of delta between field strength and 100)/second const float field_strength_slew_rate = 400; // (percentage of delta between field strength and 100)/second

Loading…
Cancel
Save