Skip to content

Commit

Permalink
mavlink MOUNT_ORIENTATION use math::degrees
Browse files Browse the repository at this point in the history
  • Loading branch information
dagar authored and LorenzMeier committed Jul 13, 2018
1 parent f26c3ac commit 1ea63e4
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/modules/mavlink/mavlink_messages.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1061,7 +1061,6 @@ class MavlinkStreamVFRHUD : public MavlinkStream
actuator_armed_s armed = {};
airspeed_s airspeed = {};


bool updated = false;
updated |= _pos_sub->update(&_pos_time, &pos);
updated |= _armed_sub->update(&_armed_time, &armed);
Expand Down Expand Up @@ -4068,9 +4067,9 @@ class MavlinkStreamMountOrientation : public MavlinkStream

mavlink_mount_orientation_t msg = {};

msg.roll = 180.0f / M_PI_F * mount_orientation.attitude_euler_angle[0];
msg.pitch = 180.0f / M_PI_F * mount_orientation.attitude_euler_angle[1];
msg.yaw = 180.0f / M_PI_F * mount_orientation.attitude_euler_angle[2];
msg.roll = math::degrees(mount_orientation.attitude_euler_angle[0]);
msg.pitch = math::degrees(mount_orientation.attitude_euler_angle[1]);
msg.yaw = math::degrees(mount_orientation.attitude_euler_angle[2]);

mavlink_msg_mount_orientation_send_struct(_mavlink->get_channel(), &msg);

Expand Down

0 comments on commit 1ea63e4

Please sign in to comment.