mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-26 00:43:34 +08:00
FW stabalized mode properly initialize att_sp
This commit is contained in:
committed by
Lorenz Meier
parent
f3ec95c3b2
commit
41c1e56075
@@ -1063,13 +1063,17 @@ FixedwingAttitudeControl::task_main()
|
||||
* emit the manual setpoint here to allow attitude controller tuning
|
||||
* in attitude control mode.
|
||||
*/
|
||||
struct vehicle_attitude_setpoint_s att_sp;
|
||||
struct vehicle_attitude_setpoint_s att_sp = {};
|
||||
att_sp.timestamp = hrt_absolute_time();
|
||||
att_sp.roll_body = roll_sp;
|
||||
att_sp.pitch_body = pitch_sp;
|
||||
att_sp.yaw_body = 0.0f - _parameters.trim_yaw;
|
||||
att_sp.thrust = throttle_sp;
|
||||
|
||||
att_sp.roll_reset_integral = false;
|
||||
att_sp.pitch_reset_integral = false;
|
||||
att_sp.yaw_reset_integral = false;
|
||||
|
||||
/* lazily publish the setpoint only once available */
|
||||
if (_attitude_sp_pub != nullptr) {
|
||||
/* publish the attitude setpoint */
|
||||
|
||||
Reference in New Issue
Block a user