forked from Archive/PX4-Autopilot
mc_att_control: remove direct setting of att sp in Stabilized
Instead of directly setting the attitude setpoint for usage inside the same module only publish it to the uorb topic, which is subscribed to in the same module. Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
This commit is contained in:
parent
3576d513cd
commit
e5cfbbb1ee
|
@ -192,14 +192,6 @@ MulticopterAttitudeControl::generate_attitude_setpoint(const Quatf &q, float dt,
|
|||
|
||||
attitude_setpoint.timestamp = hrt_absolute_time();
|
||||
_vehicle_attitude_setpoint_pub.publish(attitude_setpoint);
|
||||
|
||||
// update attitude controller setpoint immediately (don't do it in vtol transition, then the VTOL module generates the attitude setpoint)
|
||||
if (!_vtol_in_transition_mode) {
|
||||
_attitude_control.setAttitudeSetpoint(q_sp, attitude_setpoint.yaw_sp_move_rate);
|
||||
_thrust_setpoint_body = Vector3f(attitude_setpoint.thrust_body);
|
||||
}
|
||||
|
||||
_last_attitude_setpoint = attitude_setpoint.timestamp;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Loading…
Reference in New Issue