mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-31 09:31:38 +08:00
FligtTaskManualAltitude: split functionality such that scale_stick values and the update_setpoints can be overwritten
This commit is contained in:
committed by
Beat Küng
parent
ea61af3164
commit
b5c19f6483
@@ -54,13 +54,24 @@ public:
|
||||
bool update() override;
|
||||
|
||||
protected:
|
||||
|
||||
float _vel_sp_z{0.0f}; /**< scaled velocity directly from stick */
|
||||
float _yaw_rate_sp{0.0f}; /** scaled yaw rate directly from stick */
|
||||
float _pos_sp_z{0.0f};
|
||||
float _yaw_sp{0.0f};
|
||||
|
||||
private:
|
||||
|
||||
control::BlockParamFloat _vel_max_down; /**< maximum speed allowed to go up */
|
||||
control::BlockParamFloat _vel_max_up; /**< maximum speed allowed to go down */
|
||||
control::BlockParamFloat _yaw_rate_scaling;
|
||||
control::BlockParamFloat _yaw_rate_scaling; /**< scaling factor from stick to yaw rate */
|
||||
|
||||
virtual void update_setpoints(); /**< updates all setpoints */
|
||||
virtual void scale_sticks(); /**< scales sticks to velocity */
|
||||
|
||||
private:
|
||||
void update_heading_setpoints(); /**< sets yaw or yaw speed */
|
||||
void update_z_setpoints(); /**< sets position or velocity setpoint */
|
||||
|
||||
float _pos_sp_predicted{0.0f}; /**< position setpoint computed in set_z_setpoints */
|
||||
float _yaw_sp_predicted{0.0f}; /**< yaw setpoint computed in set_heading_setpoints */
|
||||
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user