Skip to content

Commit

Permalink
PositionControl: isolate skip controller, leave away unnecessary include
Browse files Browse the repository at this point in the history
  • Loading branch information
MaEtUgR committed Dec 10, 2019
1 parent 26d02dd commit bdcc15c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ void PositionControl::setConstraints(const vehicle_constraints_s &constraints)
void PositionControl::update(const float dt)
{
if (_skip_controller) {

// Already received a valid thrust set-point.
// Limit the thrust vector.
float thr_mag = _thr_sp.length();
Expand All @@ -129,11 +128,11 @@ void PositionControl::update(const float dt)
_pos_sp = _pos;
_vel_sp = _vel;
_acc_sp = _vel_dot;

} else {
_positionControl();
_velocityControl(dt);
return;
}

_positionControl();
_velocityControl(dt);
}

bool PositionControl::_interfaceMapping()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
#include <matrix/matrix/math.hpp>
#include <uORB/topics/vehicle_attitude_setpoint.h>
#include <uORB/topics/vehicle_constraints.h>
#include <uORB/topics/vehicle_local_position.h>
#include <uORB/topics/vehicle_local_position_setpoint.h>

struct PositionControlStates {
Expand Down

0 comments on commit bdcc15c

Please sign in to comment.