Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion indi-gphoto/gphoto_driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2328,7 +2328,7 @@ int gphoto_manual_focus(gphoto_driver *gphoto, int speed, char *errMsg)
}
case GP_WIDGET_RANGE:
{
int rval = speed;
float rval = speed;

/* Range is on Nikon from -32768 <-> 32768 */
if (strstr(device, "Nikon"))
Expand Down Expand Up @@ -2359,6 +2359,11 @@ int gphoto_manual_focus(gphoto_driver *gphoto, int speed, char *errMsg)
}
}

/* Reset to 0 first so the camera registers a change on repeated calls */
const float zero = 0;
gp_widget_set_value(gphoto->focus_widget->widget, &zero);
gphoto_set_config(gphoto->camera, gphoto->config, gphoto->context);

rc = gp_widget_set_value(gphoto->focus_widget->widget, &rval);
if (rc < GP_OK)
{
Expand Down
Loading