mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-23 17:03:34 +08:00
added check for MAIN_STATE_OFFBOARD @#1152 so that we dont get thrown out of this state
This commit is contained in:
@@ -1149,7 +1149,7 @@ int commander_thread_main(int argc, char *argv[])
|
|||||||
status_changed = true;
|
status_changed = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (status.main_state != MAIN_STATE_AUTO && armed.armed) {
|
if (status.main_state != MAIN_STATE_AUTO && armed.armed && status.main_state != MAIN_STATE_OFFBOARD) {
|
||||||
transition_result_t res = main_state_transition(&status, MAIN_STATE_AUTO);
|
transition_result_t res = main_state_transition(&status, MAIN_STATE_AUTO);
|
||||||
|
|
||||||
if (res == TRANSITION_CHANGED) {
|
if (res == TRANSITION_CHANGED) {
|
||||||
|
|||||||
Reference in New Issue
Block a user