Skip to content

Commit

Permalink
SITL: Gripper_EPM compiler warning resolved by using float and fabsf
Browse files Browse the repository at this point in the history
  • Loading branch information
rmackay9 authored and tridge committed Sep 9, 2019
1 parent 1fd7618 commit d4b047f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion libraries/SITL/SIM_Gripper_EPM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ bool Gripper_EPM::should_report()
return false;
}

if (abs(reported_field_strength - field_strength) > 10.0) {
if (fabsf(reported_field_strength - field_strength) > 10.0) {
return true;
}

Expand Down
4 changes: 2 additions & 2 deletions libraries/SITL/SIM_Gripper_EPM.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ class Gripper_EPM {

bool servo_based = true;

double field_strength; // percentage
double reported_field_strength = -1; // unlikely
float field_strength; // percentage
float reported_field_strength = -1; // unlikely

// 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
Expand Down

0 comments on commit d4b047f

Please sign in to comment.