Skip to content

Commit

Permalink
Fix gimbal yaw clipping
Browse files Browse the repository at this point in the history
  • Loading branch information
gillamkid authored and HTRamsey committed Jan 7, 2025
1 parent 29ca1b0 commit 533dc39
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Gimbal/GimbalController.cc
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ GimbalController::_handleGimbalDeviceAttitudeStatus(const mavlink_message_t& mes
} else {
float absoluteYaw = qRadiansToDegrees(yaw);
float bodyYaw = absoluteYaw - _vehicle->heading()->rawValue().toFloat();
if (bodyYaw < 180.0f) {
if (bodyYaw < -180.0f) {
bodyYaw += 360.0f;
}

Expand Down

0 comments on commit 533dc39

Please sign in to comment.