diff options
author | Marcus Meissner <marcus@jet.franken.de> | 2020-05-22 17:24:51 +0200 |
---|---|---|
committer | Marcus Meissner <marcus@jet.franken.de> | 2020-05-22 17:24:51 +0200 |
commit | 6fe9c53ca33b5d6a28c93046dbb9039b0c3ca51d (patch) | |
tree | ebbb3a9b0bf051430f8a25c355d3d8f770f45339 | |
parent | 1973fcd63f5553e09c7f4e90266ec69b35f5e2ca (diff) | |
download | libgphoto2-6fe9c53ca33b5d6a28c93046dbb9039b0c3ca51d.tar.gz |
Nikon D780 can do 900 seconds exposure, so extend nikon exposure timeout to 1000s
also add RemainignExposureTime prop from D780
fixes https://github.com/gphoto/libgphoto2/issues/495
-rw-r--r-- | camlibs/ptp2/library.c | 6 | ||||
-rw-r--r-- | camlibs/ptp2/ptp.c | 1 | ||||
-rw-r--r-- | camlibs/ptp2/ptp.h | 1 |
3 files changed, 5 insertions, 3 deletions
diff --git a/camlibs/ptp2/library.c b/camlibs/ptp2/library.c index 794a0a72d..088e6492e 100644 --- a/camlibs/ptp2/library.c +++ b/camlibs/ptp2/library.c @@ -3711,7 +3711,7 @@ capturetriggered: CR (gp_port_set_timeout (camera->port, capture_timeout)); - C_PTP_REP (nikon_wait_busy (params, 100, 200*1000)); /* lets wait 200 seconds */ + C_PTP_REP (nikon_wait_busy (params, 100, 1000*1000)); /* lets wait 1000 seconds (D780 can do 900seconds exposures) */ newobject = 0xffff0001; done = 0; tries = 100; @@ -5448,7 +5448,7 @@ camera_trigger_capture (Camera *camera, GPContext *context) } while (tries--); /* busyness will be reported during the whole of the exposure time. */ - C_PTP_REP (nikon_wait_busy (params, 100, 200*1000)); /* lets wait 200 seconds */ + C_PTP_REP (nikon_wait_busy (params, 100, 1000*1000)); /* lets wait 1000 seconds (D780 can do 900 second exposures) */ return GP_OK; } @@ -5482,7 +5482,7 @@ camera_trigger_capture (Camera *camera, GPContext *context) return translate_ptp_result (ret); } while (ret == PTP_RC_DeviceBusy); - C_PTP_REP (nikon_wait_busy (params, 100, 200*1000)); /* lets wait 200 seconds */ + C_PTP_REP (nikon_wait_busy (params, 100, 1000*1000)); /* lets wait 1000 seconds (D780 can do 900 second exposures) */ return GP_OK; } diff --git a/camlibs/ptp2/ptp.c b/camlibs/ptp2/ptp.c index 9492af00c..509e26985 100644 --- a/camlibs/ptp2/ptp.c +++ b/camlibs/ptp2/ptp.c @@ -5850,6 +5850,7 @@ ptp_get_property_description(PTPParams* params, uint16_t dpc) {PTP_DPC_NIKON_RawImageSize,"RawImageSize"}, {PTP_DPC_NIKON_FlickerReductionSetting,"FlickerReductionSetting"}, {PTP_DPC_NIKON_DiffractionCompensatipn,"DiffractionCompensatipn"}, + {PTP_DPC_NIKON_RemainingExposureTime,"RemainingExposureTime"}, {PTP_DPC_NIKON_MovieLogOutput,"MovieLogOutput"}, {PTP_DPC_NIKON_MovieAutoDistortion,"MovieAutoDistortion"}, {PTP_DPC_NIKON_MovieLogSetting,"MovieLogSetting"}, diff --git a/camlibs/ptp2/ptp.h b/camlibs/ptp2/ptp.h index 91e3fe217..780c9346c 100644 --- a/camlibs/ptp2/ptp.h +++ b/camlibs/ptp2/ptp.h @@ -2198,6 +2198,7 @@ typedef struct _PTPCanonEOSDeviceInfo { #define PTP_DPC_NIKON_DiffractionCompensatipn 0xD0BA #define PTP_DPC_NIKON_MovieLogOutput 0xD0BB #define PTP_DPC_NIKON_MovieAutoDistortion 0xD0BC +#define PTP_DPC_NIKON_RemainingExposureTime 0xD0BE #define PTP_DPC_NIKON_MovieLogSetting 0xD0BF #define PTP_DPC_NIKON_Bracketing 0xD0C0 #define PTP_DPC_NIKON_AutoExposureBracketStep 0xD0C1 |