mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-31 22:31:36 +08:00
flight tasks: refactor BlockParam -> Param and handle param updates
This commit is contained in:
@@ -45,16 +45,22 @@
|
||||
class FlightTaskManualPosition : public FlightTaskManualAltitude
|
||||
{
|
||||
public:
|
||||
FlightTaskManualPosition(control::SuperBlock *parent, const char *name);
|
||||
FlightTaskManualPosition() = default;
|
||||
|
||||
virtual ~FlightTaskManualPosition() = default;
|
||||
|
||||
protected:
|
||||
control::BlockParamFloat _vel_xy_manual_max; /**< maximum speed allowed horizontally */
|
||||
control::BlockParamFloat _acc_xy_max;/**< maximum acceleration horizontally. Only used to compute lock time */
|
||||
control::BlockParamFloat _vel_hold_thr_xy; /**< velocity threshold to switch back into horizontal position hold */
|
||||
|
||||
void _updateXYlock(); /**< applies positon lock based on stick and velocity */
|
||||
void _updateSetpoints() override;
|
||||
void _scaleSticks() override;
|
||||
|
||||
DEFINE_PARAMETERS_CUSTOM_PARENT(FlightTaskManualAltitude,
|
||||
(ParamFloat<px4::params::MPC_VEL_MANUAL>) _vel_xy_manual_max, /**< maximum speed allowed horizontally */
|
||||
(ParamFloat<px4::params::MPC_ACC_HOR_MAX>)
|
||||
_acc_xy_max, /**< maximum acceleration horizontally. Only used to compute lock time */
|
||||
(ParamFloat<px4::params::MPC_HOLD_MAX_XY>)
|
||||
_vel_hold_thr_xy /**< velocity threshold to switch back into horizontal position hold */
|
||||
)
|
||||
private:
|
||||
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user