AP_Mission: set_zoom replaces set_zoom_step

This commit is contained in:
Randy Mackay 2023-04-12 21:37:02 +09:00 committed by Andrew Tridgell
parent 9100123efe
commit ddaff85166
1 changed files with 4 additions and 2 deletions

View File

@ -131,8 +131,10 @@ bool AP_Mission::start_command_camera(const AP_Mission::Mission_Command& cmd)
case MAV_CMD_SET_CAMERA_ZOOM:
if (cmd.content.set_camera_zoom.zoom_type == ZOOM_TYPE_CONTINUOUS) {
camera->set_zoom_step(cmd.content.set_camera_zoom.zoom_value);
return true;
return camera->set_zoom(AP_Camera::ZoomType::RATE, cmd.content.set_camera_zoom.zoom_value);
}
if (cmd.content.set_camera_zoom.zoom_type == ZOOM_TYPE_RANGE) {
return camera->set_zoom(AP_Camera::ZoomType::PCT, cmd.content.set_camera_zoom.zoom_value);
}
return false;