Fix attitude controller braces

This commit is contained in:
Lorenz Meier 2015-08-23 17:41:45 +02:00
parent d26aa2c85b
commit a508330bdf

View File

@ -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;