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