summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Stout <ryanstout@gmail.com>2019-10-12 18:03:28 +0200
committerMarcus Meissner <marcus@jet.franken.de>2019-10-12 18:03:28 +0200
commitbcd86bab811a0ca0ae907f8ed3b592e050a53c46 (patch)
tree2faa7a6c4a259a4d025d73d2744e4278eead95a0
parent970f769c1b71f8f411be8bcc3307267d25e2c3c7 (diff)
downloadlibgphoto2-bcd86bab811a0ca0ae907f8ed3b592e050a53c46.tar.gz
Fuji set focus point
(partially)
-rw-r--r--camlibs/ptp2/library.c5
-rw-r--r--camlibs/ptp2/ptp.c3
-rw-r--r--camlibs/ptp2/ptp.h1
3 files changed, 6 insertions, 3 deletions
diff --git a/camlibs/ptp2/library.c b/camlibs/ptp2/library.c
index 9c4cb1d57..8380ccca8 100644
--- a/camlibs/ptp2/library.c
+++ b/camlibs/ptp2/library.c
@@ -378,13 +378,14 @@ fixup_cached_deviceinfo (Camera *camera, PTPDeviceInfo *di) {
}
if (di->VendorExtensionID == PTP_VENDOR_FUJI) {
- C_MEM (di->DevicePropertiesSupported = realloc(di->DevicePropertiesSupported,sizeof(di->DevicePropertiesSupported[0])*(di->DevicePropertiesSupported_len + 5)));
+ C_MEM (di->DevicePropertiesSupported = realloc(di->DevicePropertiesSupported,sizeof(di->DevicePropertiesSupported[0])*(di->DevicePropertiesSupported_len + 6)));
di->DevicePropertiesSupported[di->DevicePropertiesSupported_len+0] = PTP_DPC_ExposureTime;
di->DevicePropertiesSupported[di->DevicePropertiesSupported_len+1] = PTP_DPC_FNumber;
di->DevicePropertiesSupported[di->DevicePropertiesSupported_len+2] = 0xd38c; /* PC Mode */
di->DevicePropertiesSupported[di->DevicePropertiesSupported_len+3] = 0xd171; /* Focus control */
di->DevicePropertiesSupported[di->DevicePropertiesSupported_len+4] = 0xd21c; /* Needed for X-T2? */
- di->DevicePropertiesSupported_len += 5;
+ di->DevicePropertiesSupported[di->DevicePropertiesSupported_len+5] = 0xd347; /* Focus Position */
+ di->DevicePropertiesSupported_len += 6;
}
/* Nikon DSLR hide its newer opcodes behind another vendor specific query,
diff --git a/camlibs/ptp2/ptp.c b/camlibs/ptp2/ptp.c
index a095d7023..90fc6b338 100644
--- a/camlibs/ptp2/ptp.c
+++ b/camlibs/ptp2/ptp.c
@@ -4975,7 +4975,7 @@ ptp_fuji_getevents (PTPParams* params, uint16_t** events, uint16_t* count)
{
param = dtoh16a(&data[2 + 6 * i]);
value = dtoh32a(&data[2 + 6 * i + 2]);
- *events[i] = param;
+ (*events)[i] = param;
ptp_debug(params, "param: %02x, value: %d ", param, value);
}
}
@@ -5814,6 +5814,7 @@ ptp_get_property_description(PTPParams* params, uint16_t dpc)
{PTP_DPC_FUJI_Quality, N_("AE Lock")}, /* 0xD213 */
{PTP_DPC_FUJI_Quality, N_("Aperture")}, /* 0xD218 */
{PTP_DPC_FUJI_Quality, N_("Shutter Speed")}, /* 0xD219 */
+ {PTP_DPC_FUJI_FocusPoint, N_("Focus Point")}, /* 0xD347 */
{0,NULL}
};
diff --git a/camlibs/ptp2/ptp.h b/camlibs/ptp2/ptp.h
index 19b0dbe29..bfda8770f 100644
--- a/camlibs/ptp2/ptp.h
+++ b/camlibs/ptp2/ptp.h
@@ -2231,6 +2231,7 @@ typedef struct _PTPCanonEOSDeviceInfo {
#define PTP_DPC_FUJI_Copyright 0xD215
#define PTP_DPC_FUJI_Aperture 0xD218
#define PTP_DPC_FUJI_ShutterSpeed 0xD219
+#define PTP_DPC_FUJI_FocusPoint 0xD347
/* Microsoft/MTP specific */
#define PTP_DPC_MTP_SecureTime 0xD101