mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-31 18:47:21 +08:00
mavlink MOUNT_ORIENTATION use math::degrees
This commit is contained in:
@@ -1060,7 +1060,6 @@ protected:
|
|||||||
actuator_armed_s armed = {};
|
actuator_armed_s armed = {};
|
||||||
airspeed_s airspeed = {};
|
airspeed_s airspeed = {};
|
||||||
|
|
||||||
|
|
||||||
bool updated = false;
|
bool updated = false;
|
||||||
updated |= _pos_sub->update(&_pos_time, &pos);
|
updated |= _pos_sub->update(&_pos_time, &pos);
|
||||||
updated |= _armed_sub->update(&_armed_time, &armed);
|
updated |= _armed_sub->update(&_armed_time, &armed);
|
||||||
@@ -3950,9 +3949,9 @@ protected:
|
|||||||
|
|
||||||
mavlink_mount_orientation_t msg = {};
|
mavlink_mount_orientation_t msg = {};
|
||||||
|
|
||||||
msg.roll = 180.0f / M_PI_F * mount_orientation.attitude_euler_angle[0];
|
msg.roll = math::degrees(mount_orientation.attitude_euler_angle[0]);
|
||||||
msg.pitch = 180.0f / M_PI_F * mount_orientation.attitude_euler_angle[1];
|
msg.pitch = math::degrees(mount_orientation.attitude_euler_angle[1]);
|
||||||
msg.yaw = 180.0f / M_PI_F * mount_orientation.attitude_euler_angle[2];
|
msg.yaw = math::degrees(mount_orientation.attitude_euler_angle[2]);
|
||||||
|
|
||||||
mavlink_msg_mount_orientation_send_struct(_mavlink->get_channel(), &msg);
|
mavlink_msg_mount_orientation_send_struct(_mavlink->get_channel(), &msg);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user