Skip to content

Commit

Permalink
Copter: add nan check in handle_command_mount
Browse files Browse the repository at this point in the history
  • Loading branch information
tajisoft committed Nov 20, 2023
1 parent f71fbb2 commit 9abe420
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ArduCopter/GCS_Mavlink.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -846,7 +846,8 @@ MAV_RESULT GCS_MAVLINK_Copter::handle_command_mount(const mavlink_command_int_t
case MAV_CMD_DO_MOUNT_CONTROL:
// if vehicle has a camera mount but it doesn't do pan control then yaw the entire vehicle instead
if ((copter.camera_mount.get_mount_type() != AP_Mount::Type::None) &&
!copter.camera_mount.has_pan_control()) {
!copter.camera_mount.has_pan_control() &&
!isnan(packet.param3)) {
copter.flightmode->auto_yaw.set_yaw_angle_rate((float)packet.param3, 0.0f);
}
break;
Expand Down

0 comments on commit 9abe420

Please sign in to comment.