mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-20 04:03:34 +08:00
ERROR macro: get rid of the many 'oddly, ERROR is not defined for c++', use PX4_ERROR
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user