camera_set_manual_focus_step()

Updated: April 19, 2023

Manually adjust the lens position on the camera

Synopsis:

#include <camera/camera_3a.h>
camera_error_t camera_set_manual_focus_step(camera_handle_t handle,
                                            int step)

Arguments:

handle
The handle returned by a call to the camera_open() function.
step
The position to set the lens to. Use the camera_get_manual_focus_step() function to retrieve the details on the range of values supported.

Library:

libcamapi

Description:

Use this function to adjust the lens position when using manual focus mode. Larger step values correspond to lens positions approaching infinity focus, and smaller step values correspond to lens positions approaching macro focus.

You can use this function only when the CAMERA_FEATURE_MANUALFOCUS feature is available. You can determine whether this feature is available by calling the camera_can_feature() function.

Before you can change the focus, you must set the camera to CAMERA_FOCUSMODE_MANUAL using the camera_set_focus_mode() function.

For more information regarding these manual settings, see the Manual camera settings section.

Returns:

CAMERA_EOK when the function successfully completes, otherwise another camera_error_t value that provides the reason that the call failed.