Skip to content

Commit

Permalink
Merge pull request #905 from KazW/bug/xcode_8.3.x_compile_errors
Browse files Browse the repository at this point in the history
Fix compile errors on Xcode 8.3.x
  • Loading branch information
sytelus authored Mar 26, 2018
2 parents b4a934b + 9b13461 commit 4526689
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -117,13 +117,13 @@ class AdaptiveController : public IController {

// bias modification for level imu implementing deadband

if (abs(phi_in) <= 0.0001)
if (std::abs(phi_in) <= 0.0001)
phi_in = 0;

if (abs(theta_in) <= 0.00001)
if (std::abs(theta_in) <= 0.00001)
theta_in = 0;

if (abs(psi_in) <= 0.0001)
if (std::abs(psi_in) <= 0.0001)
psi_in = 0;
}

Expand Down Expand Up @@ -581,7 +581,7 @@ class AdaptiveController : public IController {

// Rescale such that the outputs normalize from -1,1

U1 = sqrt(abs(U1)) / 6.20; // I used sqrt to try and allow for smoother signal
U1 = sqrt(std::abs(U1)) / 6.20; // I used sqrt to try and allow for smoother signal

U2 = U2 / 80;

Expand Down Expand Up @@ -678,4 +678,4 @@ class AdaptiveController : public IController {


}
#endif
#endif

0 comments on commit 4526689

Please sign in to comment.