diff options
author | Roman Bapst <romanbapst@yahoo.de> | 2014-09-24 13:45:38 +0200 |
---|---|---|
committer | Roman Bapst <romanbapst@yahoo.de> | 2014-09-24 13:45:38 +0200 |
commit | d7cf6c4319cd9522286f0a7abb73e24a3050a6f7 (patch) | |
tree | 3d5795d9d30fa0247048dd22fa8d56312bba6930 /src/lib | |
parent | 2b8a9b632555708731d93f4aa7945d19e83d3134 (diff) | |
download | px4-firmware-d7cf6c4319cd9522286f0a7abb73e24a3050a6f7.tar.gz px4-firmware-d7cf6c4319cd9522286f0a7abb73e24a3050a6f7.tar.bz2 px4-firmware-d7cf6c4319cd9522286f0a7abb73e24a3050a6f7.zip |
Use namespace std so that we can use the isfinite function, which should be available from math.h but the compiler gives an error that the function is undeclared
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/ecl/attitude_fw/ecl_pitch_controller.cpp | 5 | ||||
-rw-r--r-- | src/lib/ecl/attitude_fw/ecl_roll_controller.cpp | 4 | ||||
-rw-r--r-- | src/lib/ecl/attitude_fw/ecl_yaw_controller.cpp | 2 |
3 files changed, 6 insertions, 5 deletions
diff --git a/src/lib/ecl/attitude_fw/ecl_pitch_controller.cpp b/src/lib/ecl/attitude_fw/ecl_pitch_controller.cpp index 8ee8b9c68..fa0f98e16 100644 --- a/src/lib/ecl/attitude_fw/ecl_pitch_controller.cpp +++ b/src/lib/ecl/attitude_fw/ecl_pitch_controller.cpp @@ -51,7 +51,8 @@ #else #include<ros_error.h> #include <cmath> -#define isfinite std::isfinite +//#define isfinite std::isfinite +using namespace std; #endif ECL_PitchController::ECL_PitchController() : @@ -68,7 +69,7 @@ ECL_PitchController::ECL_PitchController() : _integrator(0.0f), _rate_error(0.0f), _rate_setpoint(0.0f), - _bodyrate_setpoint(0.0f) + _bodyrate_setpoint(0.0f), _nonfinite_input_perf(perf_alloc(PC_COUNT, "fw att control pitch nonfinite input")) { } diff --git a/src/lib/ecl/attitude_fw/ecl_roll_controller.cpp b/src/lib/ecl/attitude_fw/ecl_roll_controller.cpp index 6707a11ba..640940c99 100644 --- a/src/lib/ecl/attitude_fw/ecl_roll_controller.cpp +++ b/src/lib/ecl/attitude_fw/ecl_roll_controller.cpp @@ -51,7 +51,7 @@ #else #include<ros_error.h> #include <cmath> -#define isfinite std::isfinite +using namespace std; #endif ECL_RollController::ECL_RollController() : @@ -67,7 +67,7 @@ ECL_RollController::ECL_RollController() : _rate_error(0.0f), _rate_setpoint(0.0f), _bodyrate_setpoint(0.0f), - _nonfinite_input_perf(perf_alloc(PC_COUNT, "fw att control roll nonfinite input")), + _nonfinite_input_perf(perf_alloc(PC_COUNT, "fw att control roll nonfinite input")) { } diff --git a/src/lib/ecl/attitude_fw/ecl_yaw_controller.cpp b/src/lib/ecl/attitude_fw/ecl_yaw_controller.cpp index 7ff864175..5f01cecf9 100644 --- a/src/lib/ecl/attitude_fw/ecl_yaw_controller.cpp +++ b/src/lib/ecl/attitude_fw/ecl_yaw_controller.cpp @@ -50,7 +50,7 @@ #else #include<ros_error.h> #include <cmath> -#define isfinite std::isfinite +using namespace std; #endif ECL_YawController::ECL_YawController() : |