mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-28 02:36:37 +08:00
Require valid position setpoint for path setpoint
This commit is contained in:
@@ -386,7 +386,8 @@ FixedWingModeManager::set_control_mode_current(const hrt_abstime &now)
|
|||||||
|
|
||||||
if (_control_mode.flag_control_offboard_enabled && _position_setpoint_current_valid
|
if (_control_mode.flag_control_offboard_enabled && _position_setpoint_current_valid
|
||||||
&& _control_mode.flag_control_position_enabled) {
|
&& _control_mode.flag_control_position_enabled) {
|
||||||
if (PX4_ISFINITE(_pos_sp_triplet.current.vx) && PX4_ISFINITE(_pos_sp_triplet.current.vy)) {
|
if (PX4_ISFINITE(_pos_sp_triplet.current.lat) && PX4_ISFINITE(_pos_sp_triplet.current.lon) && PX4_ISFINITE(_pos_sp_triplet.current.vx)
|
||||||
|
&& PX4_ISFINITE(_pos_sp_triplet.current.vy)) {
|
||||||
// Offboard position with velocity setpoints
|
// Offboard position with velocity setpoints
|
||||||
_control_mode_current = FW_POSCTRL_MODE_AUTO_PATH;
|
_control_mode_current = FW_POSCTRL_MODE_AUTO_PATH;
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user