summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcus Meissner <marcus@jet.franken.de>2019-12-02 17:53:54 +0100
committerMarcus Meissner <marcus@jet.franken.de>2019-12-02 17:54:27 +0100
commit88cefc50736fd6027c657ee09448df8d8a613c4d (patch)
tree79f043608923b630be7365016075e0c29fa97ffd
parent30d712a6496146bec01b6971a53afb72b4fab7b7 (diff)
downloadlibgphoto2-88cefc50736fd6027c657ee09448df8d8a613c4d.tar.gz
adjust the focus mode handling for sony even more
If the mode is not manual, do the focus waiting. https://github.com/gphoto/gphoto2/issues/268
-rw-r--r--camlibs/ptp2/library.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/camlibs/ptp2/library.c b/camlibs/ptp2/library.c
index 1621882a0..3bcec7454 100644
--- a/camlibs/ptp2/library.c
+++ b/camlibs/ptp2/library.c
@@ -4238,7 +4238,7 @@ camera_sony_capture (Camera *camera, CameraCaptureType type, CameraFilePath *pat
/* Check if we are in manual focus to skip the wait for focus */
C_PTP (ptp_generic_getdevicepropdesc (params, PTP_DPC_FocusMode, &dpd));
- if (dpd.CurrentValue.u16 == 2) {
+ if (dpd.CurrentValue.u16 != 1) { /* 1 is Manual .. no need to wait there for focusing */
/* Now hold down the shutter button for a bit. We probably need to hold it as long as it takes to
* get focus, indicated by the 0xD213 property. But hold it for at most 1 second.
@@ -5442,8 +5442,7 @@ camera_trigger_capture (Camera *camera, GPContext *context)
/* Wait for focus only in automatic focus mode */
C_PTP (ptp_generic_getdevicepropdesc (params, PTP_DPC_FocusMode, &dpd));
- if (dpd.CurrentValue.u16 == 2) {
-
+ if (dpd.CurrentValue.u16 != 1) { /* 1 is Manual .. no need to wait there for focusing */
/* Now hold down the shutter button for a bit. We probably need to hold it as long as it takes to
* get focus, indicated by the 0xD213 property. But hold it for at most 1 second.
*/