Browse Source

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
master
Jaeyoung-Lim 3 years ago committed by Daniel Agar
parent
commit
dec5e7e9c8
  1. 6
      src/modules/fw_pos_control_l1/FixedwingPositionControl.cpp

6
src/modules/fw_pos_control_l1/FixedwingPositionControl.cpp

@ -843,10 +843,6 @@ FixedwingPositionControl::control_auto(const hrt_abstime &now, const Vector2d &c @@ -843,10 +843,6 @@ FixedwingPositionControl::control_auto(const hrt_abstime &now, const Vector2d &c
_att_sp.pitch_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;
if (_vehicle_status.in_transition_to_fw) {
@ -893,6 +889,8 @@ FixedwingPositionControl::control_auto(const hrt_abstime &now, const Vector2d &c @@ -893,6 +889,8 @@ FixedwingPositionControl::control_auto(const hrt_abstime &now, const Vector2d &c
case position_setpoint_s::SETPOINT_TYPE_LOITER:
control_auto_loiter(now, dt, curr_pos, ground_speed, pos_sp_prev, current_sp, pos_sp_next);
publishOrbitStatus(pos_sp_curr);
break;
case position_setpoint_s::SETPOINT_TYPE_LAND:

Loading…
Cancel
Save