mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-03 15:38:52 +08:00
PositionControl: isolate skip controller, leave away unnecessary include
This commit is contained in:
@@ -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();
|
||||
@@ -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()
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user