mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-02 03:49:12 +08:00
fix(navigator): fix bug in DO_CHANGE_ALTITUDE
Co-authored-by: Nathaniel-hl <3181616004@qq.com>
This commit is contained in:
@@ -461,12 +461,6 @@ void Navigator::run()
|
|||||||
// set the altitude corresponding to command
|
// set the altitude corresponding to command
|
||||||
rep->current.alt = PX4_ISFINITE(cmd.param1) ? cmd.param1 : get_global_position()->alt;
|
rep->current.alt = PX4_ISFINITE(cmd.param1) ? cmd.param1 : get_global_position()->alt;
|
||||||
|
|
||||||
if (_vstatus.vehicle_type == vehicle_status_s::VEHICLE_TYPE_ROTARY_WING
|
|
||||||
&& (get_position_setpoint_triplet()->current.type != position_setpoint_s::SETPOINT_TYPE_TAKEOFF)) {
|
|
||||||
|
|
||||||
preproject_stop_point(rep->current.lat, rep->current.lon);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (PX4_ISFINITE(curr->current.loiter_radius) && curr->current.loiter_radius > FLT_EPSILON) {
|
if (PX4_ISFINITE(curr->current.loiter_radius) && curr->current.loiter_radius > FLT_EPSILON) {
|
||||||
rep->current.loiter_radius = curr->current.loiter_radius;
|
rep->current.loiter_radius = curr->current.loiter_radius;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user