ERROR macro: get rid of the many 'oddly, ERROR is not defined for c++', use PX4_ERROR

This commit is contained in:
Beat Küng
2016-09-30 13:50:51 +02:00
committed by Julian Oes
parent c606554da3
commit 241fd629ce
42 changed files with 207 additions and 504 deletions
@@ -108,7 +108,7 @@ public:
/**
* Start the main task.
*
* @return OK on success.
* @return PX4_OK on success.
*/
int start();
@@ -344,12 +344,6 @@ private:
namespace att_control
{
/* oddly, ERROR is not defined for c++ */
#ifdef ERROR
# undef ERROR
#endif
static const int ERROR = -1;
FixedwingAttitudeControl *g_control = nullptr;
}
@@ -583,7 +577,7 @@ FixedwingAttitudeControl::parameters_update()
_wheel_ctrl.set_integrator_max(_parameters.w_integrator_max);
_wheel_ctrl.set_max_rate(math::radians(_parameters.w_rmax));
return OK;
return PX4_OK;
}
void
@@ -1221,7 +1215,7 @@ FixedwingAttitudeControl::start()
return -errno;
}
return OK;
return PX4_OK;
}
int fw_att_control_main(int argc, char *argv[])
@@ -1245,7 +1239,7 @@ int fw_att_control_main(int argc, char *argv[])
return 1;
}
if (OK != att_control::g_control->start()) {
if (PX4_OK != att_control::g_control->start()) {
delete att_control::g_control;
att_control::g_control = nullptr;
warn("start failed");