Browse Source

Publish orbit status also when the waypoint is a loiter waypoint (#19048)

* Publish orbit status also when the waypoint is a loiter waypoint

* Remove redundant orbit status publishing
master
JaeyoungLim 3 years ago committed by GitHub
parent
commit
0607982b23
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      src/modules/fw_pos_control_l1/FixedwingPositionControl.cpp

7
src/modules/fw_pos_control_l1/FixedwingPositionControl.cpp

@ -872,6 +872,11 @@ FixedwingPositionControl::control_auto(const hrt_abstime &now, const Vector2d &c @@ -872,6 +872,11 @@ FixedwingPositionControl::control_auto(const hrt_abstime &now, const Vector2d &c
_position_sp_type = position_sp_type;
if (position_sp_type == position_setpoint_s::SETPOINT_TYPE_LOITER
|| current_sp.type == position_setpoint_s::SETPOINT_TYPE_LOITER) {
publishOrbitStatus(current_sp);
}
switch (position_sp_type) {
case position_setpoint_s::SETPOINT_TYPE_IDLE:
_att_sp.thrust_body[0] = 0.0f;
@ -889,8 +894,6 @@ FixedwingPositionControl::control_auto(const hrt_abstime &now, const Vector2d &c @@ -889,8 +894,6 @@ 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(current_sp);
break;
case position_setpoint_s::SETPOINT_TYPE_LAND:

Loading…
Cancel
Save