mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-15 11:11:36 +08:00
vehicle_attitude_setpoint: get rid of unused q_d_valid flag
This commit is contained in:
@@ -3516,17 +3516,7 @@ protected:
|
||||
mavlink_attitude_target_t msg = {};
|
||||
|
||||
msg.time_boot_ms = att_sp.timestamp / 1000;
|
||||
|
||||
if (att_sp.q_d_valid) {
|
||||
memcpy(&msg.q[0], &att_sp.q_d[0], sizeof(msg.q));
|
||||
|
||||
} else {
|
||||
matrix::Quatf q = matrix::Eulerf(att_sp.roll_body, att_sp.pitch_body, att_sp.yaw_body);
|
||||
|
||||
for (size_t i = 0; i < 4; i++) {
|
||||
msg.q[i] = q(i);
|
||||
}
|
||||
}
|
||||
matrix::Quatf(att_sp.q_d).copyTo(msg.q);
|
||||
|
||||
msg.body_roll_rate = att_rates_sp.roll;
|
||||
msg.body_pitch_rate = att_rates_sp.pitch;
|
||||
|
||||
Reference in New Issue
Block a user