forked from Archive/PX4-Autopilot
commander: brackets added to return switch check
This commit is contained in:
parent
9f52c44593
commit
0b97dd2b77
|
@ -1236,7 +1236,7 @@ int commander_thread_main(int argc, char *argv[])
|
||||||
status.set_nav_state = NAV_STATE_MISSION;
|
status.set_nav_state = NAV_STATE_MISSION;
|
||||||
status.set_nav_state_timestamp = hrt_absolute_time();
|
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) {
|
pos_sp_triplet.nav_state == NAV_STATE_RTL) {
|
||||||
/* RETURN switch is in normal mode, no MISSION switch mapped, interrupt if in RTL state */
|
/* RETURN switch is in normal mode, no MISSION switch mapped, interrupt if in RTL state */
|
||||||
status.set_nav_state = NAV_STATE_MISSION;
|
status.set_nav_state = NAV_STATE_MISSION;
|
||||||
|
|
Loading…
Reference in New Issue