mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-18 00:13:34 +08:00
Remove unsafe access to .data() and _data in Matrix
This commit is contained in:
@@ -3431,7 +3431,10 @@ protected:
|
||||
|
||||
} else {
|
||||
matrix::Quatf q = matrix::Eulerf(att_sp.roll_body, att_sp.pitch_body, att_sp.yaw_body);
|
||||
memcpy(&msg.q[0], q.data(), sizeof(msg.q));
|
||||
|
||||
for (size_t i = 0; i < 4; i++) {
|
||||
msg.q[i] = q(i);
|
||||
}
|
||||
}
|
||||
|
||||
msg.body_roll_rate = att_rates_sp.roll;
|
||||
|
||||
Reference in New Issue
Block a user