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

This commit is contained in:
Roman Bapst
2014-09-24 13:45:38 +02:00
parent 2b8a9b6325
commit d7cf6c4319
3 changed files with 6 additions and 5 deletions
@@ -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"))
{
}
@@ -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"))
{
}
@@ -50,7 +50,7 @@
#else
#include<ros_error.h>
#include <cmath>
#define isfinite std::isfinite
using namespace std;
#endif
ECL_YawController::ECL_YawController() :