mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-17 02:20:34 +08:00
PositionControl: replace overwrite with ModuleParams updateParams method
This commit is contained in:
committed by
Lorenz Meier
parent
6d716f2d26
commit
89c0259b2a
@@ -277,9 +277,11 @@ void PositionControl::updateConstraints(const Controller::Constraints &constrain
|
||||
}
|
||||
}
|
||||
|
||||
void PositionControl::overwriteParams()
|
||||
void PositionControl::updateParams()
|
||||
{
|
||||
ModuleParams::updateParams();
|
||||
|
||||
// Tilt needs to be in radians
|
||||
MPC_TILTMAX_AIR.set(math::radians(MPC_TILTMAX_AIR.get()));
|
||||
MPC_MAN_TILT_MAX.set(math::radians(MPC_MAN_TILT_MAX.get()));
|
||||
MPC_TILTMAX_AIR_rad.set(math::radians(MPC_TILTMAX_AIR_rad.get()));
|
||||
MPC_MAN_TILT_MAX_rad.set(math::radians(MPC_MAN_TILT_MAX_rad.get()));
|
||||
}
|
||||
|
||||
@@ -167,6 +167,10 @@ public:
|
||||
*/
|
||||
matrix::Vector3f getPosSp() {return _pos_sp;}
|
||||
|
||||
protected:
|
||||
|
||||
void updateParams() override;
|
||||
|
||||
private:
|
||||
void _interfaceMapping(); /** maps set-points to internal member set-points */
|
||||
void _positionController(); /** applies the P-position-controller */
|
||||
|
||||
Reference in New Issue
Block a user