From 7cb1292f74d903fb3795d1fd0946efe1bd4918f4 Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Sun, 16 Feb 2020 17:53:39 +0100 Subject: added some new SONY Property defines, hook up sony capturetarget --- camlibs/ptp2/config.c | 10 +++++++++- camlibs/ptp2/ptp.h | 17 ++++++++++++++++- 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/camlibs/ptp2/config.c b/camlibs/ptp2/config.c index f24489218..fbdaf77b0 100644 --- a/camlibs/ptp2/config.c +++ b/camlibs/ptp2/config.c @@ -6934,7 +6934,7 @@ _put_Sony_ManualFocus(CONFIG_PUT_ARGS) else if(val <= 6.0) xpropval.u16 = 6; else if(val <= 7.0) xpropval.u16 = 7; else xpropval.u16 = 0; - C_PTP (ptp_sony_setdevicecontrolvalueb (params, 0xd2d1, &xpropval, PTP_DTC_UINT16)); + C_PTP (ptp_sony_setdevicecontrolvalueb (params, PTP_DPC_SONY_NearFar, &xpropval, PTP_DTC_UINT16)); } else { xpropval.u16 = 1; C_PTP (ptp_sony_setdevicecontrolvalueb (params, 0xd2d2, &xpropval, PTP_DTC_UINT16)); @@ -7575,6 +7575,13 @@ _put_CaptureTarget(CONFIG_PUT_ARGS) { return GP_OK; } +static struct deviceproptableu16 sony_capturetarget[] = { + { "sdram", 0x0001, 0 }, + { "card", 0x0010, 0 }, + { "card+sdram", 0x0011, 0 }, +}; +GENERIC16TABLE(Sony_CaptureTarget,sony_capturetarget) + static struct { char *name; char *label; @@ -8286,6 +8293,7 @@ static struct submenu camera_settings_menu[] = { { N_("Autofocus"), "autofocus", 0, PTP_VENDOR_NIKON, 0, _get_Autofocus, _put_Autofocus }, { N_("Capture Target"), "capturetarget",0, PTP_VENDOR_CANON, 0, _get_CaptureTarget, _put_CaptureTarget }, { N_("Capture Target"), "capturetarget",0, PTP_VENDOR_PANASONIC,0, _get_CaptureTarget, _put_CaptureTarget }, + { N_("Capture Target"), "capturetarget",PTP_DPC_SONY_StillImageStoreDestination, PTP_VENDOR_SONY,0, _get_Sony_CaptureTarget, _put_Sony_CaptureTarget }, { N_("CHDK"), "chdk", PTP_OC_CHDK, PTP_VENDOR_CANON, 0, _get_CHDK, _put_CHDK }, { N_("Capture"), "capture", 0, PTP_VENDOR_CANON, 0, _get_Canon_CaptureMode, _put_Canon_CaptureMode }, { N_("Remote Mode"), "remotemode", PTP_OC_CANON_EOS_SetRemoteMode, PTP_VENDOR_CANON, 0, _get_Canon_RemoteMode, _put_Canon_RemoteMode }, diff --git a/camlibs/ptp2/ptp.h b/camlibs/ptp2/ptp.h index bfda8770f..c94d1d0e8 100644 --- a/camlibs/ptp2/ptp.h +++ b/camlibs/ptp2/ptp.h @@ -2369,14 +2369,29 @@ typedef struct _PTPCanonEOSDeviceInfo { #define PTP_DPC_SONY_SensorCrop 0xD219 #define PTP_DPC_SONY_PictureEffect 0xD21B #define PTP_DPC_SONY_ABFilter 0xD21C -#define PTP_DPC_SONY_ISO 0xD21E /* ? */ +#define PTP_DPC_SONY_ISO 0xD21E /* ? */ +#define PTP_DPC_SONY_StillImageStoreDestination 0xD222 /* (type=0x4) Enumeration [1,17,16] value: 17 */ +/* guessed DPC_SONY_DateTimeSettings 0xD223 error on query */ +/* guessed DPC_SONY_FocusArea 0xD22C (type=0x4) Enumeration [1,2,3,257,258,259,260,513,514,515,516,517,518,519,261,520] value: 1 */ +/* guessed DPC_SONY_LiveDisplayEffect 0xD231 (type=0x2) Enumeration [1,2] value: 1 */ +/* guessed DPC_SONY_FileType 0xD235 (enum: 0,1) */ +/* guessed DPC_SONY_JpegQuality 0xD252 */ +/* guessed DPC_SONY_PriorityKeySettings 0xD25A */ #define PTP_DPC_SONY_AutoFocus 0xD2C1 /* ? half-press */ #define PTP_DPC_SONY_Capture 0xD2C2 /* ? full-press */ /* also seen: D2C3 D2C4 */ +/* AEL - d2c3 + * FEL - d2c9 + * AFL - d2c4 + * AWBL - d2d9 + */ /* semi control opcodes */ #define PTP_DPC_SONY_Movie 0xD2C8 /* ? */ #define PTP_DPC_SONY_StillImage 0xD2C7 /* ? */ +#define PTP_DPC_SONY_NearFar 0xD2D1 + +#define PTP_DPC_SONY_AF_Area_Position 0xD2DC /* Casio EX-F1 */ -- cgit v1.2.1