mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-30 18:06:39 +08:00
chore(navigator): don't support VEHICLE_CMD_DO_REPOSITION in guided course
This commit is contained in:
@@ -280,16 +280,6 @@ void Navigator::run()
|
||||
// only update the reposition setpoint if armed, as it otherwise won't get executed until the vehicle switches to loiter,
|
||||
// which can lead to dangerous and unexpected behaviors (see loiter.cpp, there is an if(armed) in there too)
|
||||
|
||||
// In course mode with only an altitude change (no lat/lon target), update the course altitude directly.
|
||||
// The reposition triplet is not used in course mode — the course mode publishes its own setpoint
|
||||
if (_navigation_mode == &_course
|
||||
&& !PX4_ISFINITE(cmd.param5) && !PX4_ISFINITE(cmd.param6)
|
||||
&& PX4_ISFINITE(cmd.param7)) {
|
||||
_course.set_altitude(cmd.param7);
|
||||
// DO_REPOSITION is acknowledged by commander
|
||||
|
||||
} else {
|
||||
|
||||
// Wait for vehicle_status before handling the next command, otherwise the setpoint could be overwritten
|
||||
_wait_for_vehicle_status_timestamp = hrt_absolute_time();
|
||||
|
||||
@@ -437,8 +427,6 @@ void Navigator::run()
|
||||
|
||||
// CMD_DO_REPOSITION is acknowledged by commander
|
||||
|
||||
}
|
||||
|
||||
} else if (cmd.command == vehicle_command_s::VEHICLE_CMD_DO_CHANGE_ALTITUDE
|
||||
&& _vstatus.arming_state == vehicle_status_s::ARMING_STATE_ARMED) {
|
||||
// only update the setpoint if armed, as it otherwise won't get executed until the vehicle switches to loiter,
|
||||
|
||||
Reference in New Issue
Block a user