mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-29 03:53:33 +08:00
Fix attitude controller braces
This commit is contained in:
@@ -667,8 +667,9 @@ FixedwingAttitudeControl::task_main()
|
|||||||
int pret = poll(&fds[0], (sizeof(fds) / sizeof(fds[0])), 100);
|
int pret = poll(&fds[0], (sizeof(fds) / sizeof(fds[0])), 100);
|
||||||
|
|
||||||
/* timed out - periodic check for _task_should_exit, etc. */
|
/* timed out - periodic check for _task_should_exit, etc. */
|
||||||
if (pret == 0)
|
if (pret == 0) {
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
/* this is undesirable but not much we can do - might want to flag unhappy status */
|
/* this is undesirable but not much we can do - might want to flag unhappy status */
|
||||||
if (pret < 0) {
|
if (pret < 0) {
|
||||||
@@ -1167,15 +1168,17 @@ int fw_att_control_main(int argc, char *argv[])
|
|||||||
|
|
||||||
if (!strcmp(argv[1], "start")) {
|
if (!strcmp(argv[1], "start")) {
|
||||||
|
|
||||||
if (att_control::g_control != nullptr)
|
if (att_control::g_control != nullptr) {
|
||||||
warnx("already running");
|
warnx("already running");
|
||||||
return 1;
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
att_control::g_control = new FixedwingAttitudeControl;
|
att_control::g_control = new FixedwingAttitudeControl;
|
||||||
|
|
||||||
if (att_control::g_control == nullptr)
|
if (att_control::g_control == nullptr) {
|
||||||
warnx("alloc failed");
|
warnx("alloc failed");
|
||||||
return 1;
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
if (OK != att_control::g_control->start()) {
|
if (OK != att_control::g_control->start()) {
|
||||||
delete att_control::g_control;
|
delete att_control::g_control;
|
||||||
|
|||||||
Reference in New Issue
Block a user