Hi,
Post by Gavin (Xingsheng) WanHi gphoto2 devs,
The trigger-capture fails on Nikon V3 (firmware v1.11). I made a patch based on libgphoto2-2.5.10 and it fixed the issue. We only tested the patch on another two Nikon camera (Nikon 1 J4 and Nikon 1 S2) since we only have the 3 Nikon camera. Please review the patch.
So basically the non-autofocus mode does not seem to work there.
One thing is that I can autofallback like I just committed... can you check current git?
(Alternatively I could set "af" = 1 on all Nikon 1 cameras.)
Ciao, Marcus
commit bc2dc40859941f1b0559d5ee19d163635e9b1605
Author: Marcus Meissner <***@jet.franken.de>
Date: Thu Nov 24 09:50:10 2016 +0100
The Nikon 1 V3 reports InvalidStatus on non-autofocus capture,
so fallback to autofocus capture.
diff --git a/camlibs/ptp2/library.c b/camlibs/ptp2/library.c
index fa2ec51..7b553bb 100644
--- a/camlibs/ptp2/library.c
+++ b/camlibs/ptp2/library.c
@@ -2929,7 +2929,14 @@ camera_nikon_capture (Camera *camera, CameraCaptureType type, CameraFilePath *pa
if (ptp_operation_issupported(params, PTP_OC_NIKON_InitiateCaptureRecInMedia)) {
int loops = 100;
do {
- ret = ptp_nikon_capture2(params,af,sdram);
+ ret = ptp_nikon_capture2 (params, af, sdram);
+ /* Nikon 1 ... if af is 0, it reports PTP_RC_NIKON_InvalidStatus */
+ if (!af && ((ret == PTP_RC_NIKON_InvalidStatus))) {
+ ret = ptp_nikon_capture2 (params, 1, sdram);
+ if (ret == PTP_RC_OK)
+ break;
+ }
+
if ( (ret == PTP_RC_DeviceBusy) ||
/* this is seen on Nikon V3 */
(ret == PTP_RC_NIKON_InvalidStatus)
@@ -4107,6 +4114,13 @@ camera_trigger_capture (Camera *camera, GPContext *context)
if (ret == PTP_RC_OK)
break;
+ /* Nikon 1 ... if af is 0, it reports PTP_RC_NIKON_InvalidStatus */
+ if (!af && ((ret == PTP_RC_NIKON_InvalidStatus))) {
+ ret = ptp_nikon_capture2 (params, 1, sdram);
+ if (ret == PTP_RC_OK)
+ break;
+ }
+
/* busy means wait and the invalid status might go away */
if ((ret != PTP_RC_DeviceBusy) && (ret != PTP_RC_NIKON_InvalidStatus))
return translate_ptp_result (ret);
------------------------------------------------------------------------------