mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-07 07:41:36 +08:00
Publish orbit status whenever the vehicle is in loiter
This commit moves the publish orbit status to be published whenever the vehicle is considering a loiter setpoint
This commit is contained in:
committed by
Daniel Agar
parent
19c98b8841
commit
dec5e7e9c8
@@ -843,10 +843,6 @@ FixedwingPositionControl::control_auto(const hrt_abstime &now, const Vector2d &c
|
|||||||
_att_sp.pitch_reset_integral = false;
|
_att_sp.pitch_reset_integral = false;
|
||||||
_att_sp.yaw_reset_integral = false;
|
_att_sp.yaw_reset_integral = false;
|
||||||
|
|
||||||
if (pos_sp_curr.valid && pos_sp_curr.type == position_setpoint_s::SETPOINT_TYPE_LOITER) {
|
|
||||||
publishOrbitStatus(pos_sp_curr);
|
|
||||||
}
|
|
||||||
|
|
||||||
position_setpoint_s current_sp = pos_sp_curr;
|
position_setpoint_s current_sp = pos_sp_curr;
|
||||||
|
|
||||||
if (_vehicle_status.in_transition_to_fw) {
|
if (_vehicle_status.in_transition_to_fw) {
|
||||||
@@ -893,6 +889,8 @@ FixedwingPositionControl::control_auto(const hrt_abstime &now, const Vector2d &c
|
|||||||
|
|
||||||
case position_setpoint_s::SETPOINT_TYPE_LOITER:
|
case position_setpoint_s::SETPOINT_TYPE_LOITER:
|
||||||
control_auto_loiter(now, dt, curr_pos, ground_speed, pos_sp_prev, current_sp, pos_sp_next);
|
control_auto_loiter(now, dt, curr_pos, ground_speed, pos_sp_prev, current_sp, pos_sp_next);
|
||||||
|
publishOrbitStatus(pos_sp_curr);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case position_setpoint_s::SETPOINT_TYPE_LAND:
|
case position_setpoint_s::SETPOINT_TYPE_LAND:
|
||||||
|
|||||||
Reference in New Issue
Block a user