commander: brackets added to return switch check

This commit is contained in:
Anton Babushkin 2014-04-09 18:55:55 +04:00
parent 9f52c44593
commit 0b97dd2b77
1 changed files with 1 additions and 1 deletions

View File

@ -1236,7 +1236,7 @@ int commander_thread_main(int argc, char *argv[])
status.set_nav_state = NAV_STATE_MISSION;
status.set_nav_state_timestamp = hrt_absolute_time();
} else if (sp_man.return_switch == SWITCH_POS_OFF || sp_man.return_switch == SWITCH_POS_MIDDLE &&
} else if ((sp_man.return_switch == SWITCH_POS_OFF || sp_man.return_switch == SWITCH_POS_MIDDLE) &&
pos_sp_triplet.nav_state == NAV_STATE_RTL) {
/* RETURN switch is in normal mode, no MISSION switch mapped, interrupt if in RTL state */
status.set_nav_state = NAV_STATE_MISSION;