From 21eff5426c8fb8d38bfc8fa72db45e1ca3219427 Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Sun, 10 Apr 2022 13:59:08 +0200 Subject: [PATCH] ignore lens is retracting error as a test https://github.com/gphoto/libgphoto2/issues/780 --- camlibs/ptp2/library.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/camlibs/ptp2/library.c b/camlibs/ptp2/library.c index 4e32108a9..408698c0c 100644 --- a/camlibs/ptp2/library.c +++ b/camlibs/ptp2/library.c @@ -3597,6 +3597,7 @@ enable_liveview: if (have_prop(camera, params->deviceinfo.VendorExtensionID, PTP_DPC_NIKON_LiveViewProhibitCondition)) { PTPPropertyValue cond; + C_PTP (ptp_getdevicepropvalue (params, PTP_DPC_NIKON_LiveViewProhibitCondition, &cond, PTP_DTC_UINT32)); if (cond.u32) { @@ -3605,7 +3606,7 @@ enable_liveview: if (cond.u32 & (1<<17)){ gp_context_error (context, _("Liveview cannot start: %s"),_("Temperature too high")); return GP_ERROR; } if (cond.u32 & (1<<9)) { gp_context_error (context, _("Liveview cannot start: %s"),_("TTL error")); return GP_ERROR; } if (cond.u32 & (1<<22)){ gp_context_error (context, _("Liveview cannot start: %s"),_("In Mirror-up operation")); return GP_ERROR; } - if (cond.u32 & (1<<24)){ gp_context_error (context, _("Liveview cannot start: %s"),_("Lens is retracting")); return GP_ERROR; } + if (cond.u32 & (1<<24)){ gp_context_error (context, _("Liveview cannot start: %s"),_("Lens is retracting")); goto ignoreerror; } if (cond.u32 & (1<<5)) { gp_context_error (context, _("Liveview cannot start: %s"),_("Minimum aperture warning")); return GP_ERROR; } if (cond.u32 & (1<<15)){ gp_context_error (context, _("Liveview cannot start: %s"),_("Processing of shooting operation")); return GP_ERROR; } if (cond.u32 & (1<<2)) { gp_context_error (context, _("Liveview cannot start: %s"),_("Sequence error")); return GP_ERROR; } @@ -3620,6 +3621,7 @@ enable_liveview: if (cond.u32 & (1<<4)) { gp_context_error (context, _("Liveview cannot start: %s"),_("Fully pressed button")); return GP_ERROR; } gp_context_error (context, _("Liveview cannot start: code 0x%08x"), cond.u32); return GP_ERROR; +ignoreerror: } }