Skip to content

Commit

Permalink
Vehiclee: use M_PI constant
Browse files Browse the repository at this point in the history
Signed-off-by: Julian Oes <[email protected]>
  • Loading branch information
julianoes committed Apr 24, 2023
1 parent a0f8307 commit c61b981
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Vehicle/Vehicle.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4290,9 +4290,9 @@ void Vehicle::_handleGimbalDeviceAttitudeStatus(const mavlink_message_t& message
float roll, pitch, yaw;
mavlink_quaternion_to_euler(o.q, &roll, &pitch, &yaw);

_curGimbalPitch = pitch * (180.0f / 3.141592653589793);
_curGimbalRoll = roll * (180.0f / 3.141592653589793);
_curGimbalYaw = yaw * (180.0f / 3.141592653589793);
_curGimbalPitch = pitch * (180.0f / M_PI);
_curGimbalRoll = roll * (180.0f / M_PI);
_curGimbalYaw = yaw * (180.0f / M_PI);

emit gimbalPitchChanged();
emit gimbalRollChanged();
Expand Down

0 comments on commit c61b981

Please sign in to comment.