diff options
author | Marcus Meissner <marcus@jet.franken.de> | 2020-09-27 18:03:14 +0200 |
---|---|---|
committer | Marcus Meissner <marcus@jet.franken.de> | 2020-09-27 18:03:14 +0200 |
commit | 0c417e6804318e7979e0759f0a719a921aa64208 (patch) | |
tree | 8df2632a3b810cedd6594945c972ee181b724e62 | |
parent | 780287436ae574ebcb78b0139e1709ccb9493c03 (diff) | |
download | libgphoto2-0c417e6804318e7979e0759f0a719a921aa64208.tar.gz |
added more defines
added shuttercounter for Fuji
-rw-r--r-- | camlibs/ptp2/config.c | 12 | ||||
-rw-r--r-- | camlibs/ptp2/library.c | 9 | ||||
-rw-r--r-- | camlibs/ptp2/ptp.h | 10 |
3 files changed, 29 insertions, 2 deletions
diff --git a/camlibs/ptp2/config.c b/camlibs/ptp2/config.c index b5ee24a9a..4968e9c5c 100644 --- a/camlibs/ptp2/config.c +++ b/camlibs/ptp2/config.c @@ -1067,6 +1067,17 @@ _put_Range_UINT8(CONFIG_PUT_ARGS) { return (GP_OK); } +static int +_get_Fuji_Totalcount(CONFIG_GET_ARGS) { + char buf[20]; + + sprintf(buf,"%d",dpd->CurrentValue.u32 >> 16); + gp_widget_new (GP_WIDGET_TEXT, _(menu->label), widget); + gp_widget_set_name (*widget, menu->name); + gp_widget_set_value (*widget, buf); + return GP_OK; +} + /* generic int getter */ static int _get_INT(CONFIG_GET_ARGS) { @@ -9119,6 +9130,7 @@ static struct submenu camera_status_menu[] = { { N_("Lens Name"), "lensname", PTP_DPC_CANON_EOS_LensName, PTP_VENDOR_CANON, PTP_DTC_STR, _get_STR, _put_None }, { N_("Serial Number"), "eosserialnumber", PTP_DPC_CANON_EOS_SerialNumber, PTP_VENDOR_CANON, PTP_DTC_STR, _get_STR, _put_None }, { N_("Shutter Counter"), "shuttercounter", PTP_DPC_CANON_EOS_ShutterCounter, PTP_VENDOR_CANON, PTP_DTC_UINT32, _get_INT, _put_None }, + { N_("Shutter Counter"), "shuttercounter", PTP_DPC_FUJI_TotalShotCount, PTP_VENDOR_FUJI, PTP_DTC_UINT32, _get_Fuji_Totalcount, _put_None }, { N_("Available Shots"), "availableshots", PTP_DPC_CANON_EOS_AvailableShots, PTP_VENDOR_CANON, PTP_DTC_UINT32, _get_INT, _put_None }, { N_("Available Shots"), "availableshots", PTP_DPC_NIKON_ExposureRemaining, PTP_VENDOR_NIKON, PTP_DTC_UINT32, _get_INT, _put_None }, { N_("Focal Length Minimum"), "minfocallength", PTP_DPC_NIKON_FocalLengthMin, PTP_VENDOR_NIKON, PTP_DTC_UINT32, _get_Nikon_FocalLength, _put_None }, diff --git a/camlibs/ptp2/library.c b/camlibs/ptp2/library.c index 17fd30bd0..3ad6e4902 100644 --- a/camlibs/ptp2/library.c +++ b/camlibs/ptp2/library.c @@ -388,7 +388,7 @@ 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 + 35))); + C_MEM (di->DevicePropertiesSupported = realloc(di->DevicePropertiesSupported,sizeof(di->DevicePropertiesSupported[0])*(di->DevicePropertiesSupported_len + 40))); 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 */ @@ -424,7 +424,12 @@ fixup_cached_deviceinfo (Camera *camera, PTPDeviceInfo *di) { di->DevicePropertiesSupported[di->DevicePropertiesSupported_len+32] = 0xd34d; /* seen on xt3 */ di->DevicePropertiesSupported[di->DevicePropertiesSupported_len+33] = 0xd351; /* seen on xt3 */ di->DevicePropertiesSupported[di->DevicePropertiesSupported_len+34] = 0xd35e; /* seen on xt3 */ - di->DevicePropertiesSupported_len += 35; + di->DevicePropertiesSupported[di->DevicePropertiesSupported_len+35] = 0xd173; /* seen on xt3 */ + di->DevicePropertiesSupported[di->DevicePropertiesSupported_len+36] = 0xd365; /* seen on xt3 */ + di->DevicePropertiesSupported[di->DevicePropertiesSupported_len+37] = 0xd366; /* seen on xt3 */ + di->DevicePropertiesSupported[di->DevicePropertiesSupported_len+38] = 0xd38c; /* seen on xt3 */ + di->DevicePropertiesSupported[di->DevicePropertiesSupported_len+39] = 0xd310; /* seen on xt3 */ + di->DevicePropertiesSupported_len += 40; if (ptp_operation_issupported(&camera->pl->params, PTP_OC_FUJI_GetDeviceInfo)) { uint16_t *props; diff --git a/camlibs/ptp2/ptp.h b/camlibs/ptp2/ptp.h index e459d2e7f..8eec40d3b 100644 --- a/camlibs/ptp2/ptp.h +++ b/camlibs/ptp2/ptp.h @@ -2671,7 +2671,13 @@ typedef struct _PTPCanonEOSDeviceInfo { #define PTP_DPC_FUJI_BuiltinFlashMode 0xD121 #define PTP_DPC_FUJI_FlashManualMode 0xD122 #define PTP_DPC_FUJI_ModelingFlash 0xD12D +#define PTP_DPC_FUJI_FunctionLock 0xD136 +#define PTP_DPC_FUJI_ShutterExchangeCount 0xD155 +#define PTP_DPC_FUJI_WorldClock 0xD157 +#define PTP_DPC_FUJI_Language 0xD15A +#define PTP_DPC_FUJI_FrameNumberSequence 0xD15B #define PTP_DPC_FUJI_VideoMode 0xD15C +#define PTP_DPC_FUJI_SetUSBMode 0xD15D #define PTP_DPC_FUJI_VideoOutOnOff 0xD168 #define PTP_DPC_FUJI_LensZoomPos 0xD170 #define PTP_DPC_FUJI_FocusPosition 0xD171 @@ -2681,6 +2687,7 @@ typedef struct _PTPCanonEOSDeviceInfo { #define PTP_DPC_FUJI_LiveViewWhiteBalanceGain 0xD179 #define PTP_DPC_FUJI_FocusMeteringMode 0xD17C #define PTP_DPC_FUJI_FocusLength 0xD17D +#define PTP_DPC_FUJI_ResetSetting 0xD17F #define PTP_DPC_FUJI_IOPCode 0xD184 #define PTP_DPC_FUJI_TetherRawConditionCode 0xD186 #define PTP_DPC_FUJI_TetherRawCompatibilityCode 0xD187 @@ -2718,6 +2725,7 @@ typedef struct _PTPCanonEOSDeviceInfo { #define PTP_DPC_FUJI_ShutterSpeed2 0xD240 /* Movie Aperture */ #define PTP_DPC_FUJI_ImageAspectRatio 0xD241 #define PTP_DPC_FUJI_BatteryLevel 0xD242 /* Movie Sensitivity???? */ +#define PTP_DPC_FUJI_TotalShotCount 0xD310 #define PTP_DPC_FUJI_HighLightTone 0xD320 #define PTP_DPC_FUJI_ShadowTone 0xD321 #define PTP_DPC_FUJI_LongExposureNR 0xD322 @@ -2730,6 +2738,8 @@ typedef struct _PTPCanonEOSDeviceInfo { #define PTP_DPC_FUJI_LMOMode 0xD34D #define PTP_DPC_FUJI_ISMode 0xD351 #define PTP_DPC_FUJI_DateTimeDispFormat 0xD352 +#define PTP_DPC_FUJI_SilentMode 0xD355 +#define PTP_DPC_FUJI_PBSound 0xD356 #define PTP_DPC_FUJI_FocusCheckMode 0xD35E #define PTP_DPC_FUJI_FileNamePrefix1 0xD365 #define PTP_DPC_FUJI_FileNamePrefix2 0xD366 |