forked from Archive/PX4-Autopilot
mavlink MOUNT_ORIENTATION use math::degrees
This commit is contained in:
parent
2bb9d7e91f
commit
b0f766d90e
|
@ -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);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue