Skip to content

Commit

Permalink
on manual focus do not set d2d2 to 2 (which seems to be autofocus)
Browse files Browse the repository at this point in the history
fixes #434
  • Loading branch information
msmeissn committed Oct 19, 2019
1 parent 4eb6c0e commit 5a750a2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions camlibs/ptp2/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -6848,8 +6848,10 @@ _put_Sony_ManualFocus(CONFIG_PUT_ARGS)
CR (gp_widget_get_value(widget, &val));

if(val != 0.0) {
/* value 2 seems to set it to autofocusmode. see issue https://github.com/gphoto/libgphoto2/issues/434
xpropval.u16 = 2;
C_PTP (ptp_sony_setdevicecontrolvalueb (params, 0xd2d2, &xpropval, PTP_DTC_UINT16));
*/
if(val <= -7) xpropval.u16 = 0xFFFF - 6;
else if(val <= -6.0) xpropval.u16 = 0xFFFF - 5;
else if(val <= -5.0) xpropval.u16 = 0xFFFF - 4;
Expand Down

0 comments on commit 5a750a2

Please sign in to comment.