mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-05 07:11:36 +08:00
main state auto mission don't require valid mission
This commit is contained in:
@@ -298,7 +298,7 @@ bool StateMachineHelperTest::armingStateTransitionTest()
|
|||||||
&status_flags,
|
&status_flags,
|
||||||
5.0f, /* avionics rail voltage */
|
5.0f, /* avionics rail voltage */
|
||||||
check_gps,
|
check_gps,
|
||||||
true, /* can arm without valid mission */
|
false, /* valid mission not required*/
|
||||||
2e6 /* 2 seconds after boot, everything should be checked */
|
2e6 /* 2 seconds after boot, everything should be checked */
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -415,9 +415,9 @@ main_state_transition(struct vehicle_status_s *status, main_state_t new_main_sta
|
|||||||
case commander_state_s::MAIN_STATE_AUTO_MISSION:
|
case commander_state_s::MAIN_STATE_AUTO_MISSION:
|
||||||
|
|
||||||
/* need global position, home position, and a valid mission */
|
/* need global position, home position, and a valid mission */
|
||||||
|
// TODO: require mission? condition_auto_mission_available
|
||||||
if (status_flags->condition_global_position_valid &&
|
if (status_flags->condition_global_position_valid &&
|
||||||
status_flags->condition_home_position_valid &&
|
status_flags->condition_home_position_valid) {
|
||||||
status_flags->condition_auto_mission_available) {
|
|
||||||
|
|
||||||
ret = TRANSITION_CHANGED;
|
ret = TRANSITION_CHANGED;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user