Updated: April 19, 2023 |
Manually adjust the lens position on the camera
#include <camera/camera_3a.h>
camera_error_t camera_set_manual_focus_step(camera_handle_t handle, int step)
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.
CAMERA_EOK when the function successfully completes, otherwise another camera_error_t value that provides the reason that the call failed.