mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-23 13:17:35 +08:00
Mission block: only accept transition WP as accepted once no longer in transition mode
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
This commit is contained in:
@@ -114,7 +114,8 @@ MissionBlock::is_mission_item_reached()
|
||||
|
||||
if (int(_mission_item.params[0]) == 3) {
|
||||
// transition to RW requested, only accept waypoint if vehicle state has changed accordingly
|
||||
return _navigator->get_vstatus()->vehicle_type == vehicle_status_s::VEHICLE_TYPE_ROTARY_WING;
|
||||
return !_navigator->get_vstatus()->in_transition_mode
|
||||
&& _navigator->get_vstatus()->vehicle_type == vehicle_status_s::VEHICLE_TYPE_ROTARY_WING;
|
||||
|
||||
} else if (int(_mission_item.params[0]) == 4) {
|
||||
// transition to FW requested, only accept waypoint if vehicle state has changed accordingly
|
||||
|
||||
Reference in New Issue
Block a user