diff options
author | Marcus Meissner <marcus@jet.franken.de> | 2021-02-14 12:37:04 +0100 |
---|---|---|
committer | Marcus Meissner <marcus@jet.franken.de> | 2021-02-14 12:37:04 +0100 |
commit | 65b090e7d4e95a7ee21426aaa10d7bf57e38abc2 (patch) | |
tree | 069e5d82023e9cf4afc7ebb6b1dbcd2d81b30649 | |
parent | 0cfa62e27ee0179b056c5341b064310f30d74f0e (diff) | |
download | libgphoto2-65b090e7d4e95a7ee21426aaa10d7bf57e38abc2.tar.gz |
add more defines for panasonic, use some defines for queries instead of magic values
-rw-r--r-- | camlibs/ptp2/config.c | 13 | ||||
-rw-r--r-- | camlibs/ptp2/ptp.h | 24 |
2 files changed, 29 insertions, 8 deletions
diff --git a/camlibs/ptp2/config.c b/camlibs/ptp2/config.c index 1979a5038..23aa88b6d 100644 --- a/camlibs/ptp2/config.c +++ b/camlibs/ptp2/config.c @@ -8314,10 +8314,7 @@ _put_Panasonic_Shutter(CONFIG_PUT_ARGS) val = (uint32_t) f; val |= 0x80000000; } - - //printf("setting shutterspeed to %lu (%s)\n", val, xval); - - return translate_ptp_result (ptp_panasonic_setdeviceproperty(params, 0x2000031, (unsigned char*)&val, 4)); + return translate_ptp_result (ptp_panasonic_setdeviceproperty(params, PTP_DPC_PANASONIC_ShutterSpeed_Param, (unsigned char*)&val, 4)); } static int @@ -8328,7 +8325,7 @@ _get_Panasonic_Shutter(CONFIG_GET_ARGS) { PTPParams *params = &(camera->pl->params); GPContext *context = ((PTPData *) params->data)->context; - C_PTP_REP (ptp_panasonic_getdevicepropertydesc(params, 0x2000030, 4, ¤tVal, &list, &listCount)); + C_PTP_REP (ptp_panasonic_getdevicepropertydesc(params, PTP_DPC_PANASONIC_ShutterSpeed, 4, ¤tVal, &list, &listCount)); //printf("retrieved %lu property values\n", listCount); @@ -8409,7 +8406,7 @@ _put_Panasonic_ISO(CONFIG_PUT_ARGS) //printf("setting ISO to %lu (%s)\n", val, xval); - return translate_ptp_result (ptp_panasonic_setdeviceproperty(params, 0x2000021, (unsigned char*)&val, 4)); + return translate_ptp_result (ptp_panasonic_setdeviceproperty(params, PTP_DPC_PANASONIC_ISO_Param, (unsigned char*)&val, 4)); } static int @@ -8421,7 +8418,7 @@ _get_Panasonic_ISO(CONFIG_GET_ARGS) { PTPParams *params = &(camera->pl->params); GPContext *context = ((PTPData *) params->data)->context; - C_PTP_REP (ptp_panasonic_getdevicepropertydesc(params, 0x2000020, 4, ¤tVal, &list, &listCount)); + C_PTP_REP (ptp_panasonic_getdevicepropertydesc(params, PTP_DPC_PANASONIC_ISO, 4, ¤tVal, &list, &listCount)); //printf("retrieved %lu property values\n", listCount); @@ -8434,7 +8431,7 @@ _get_Panasonic_ISO(CONFIG_GET_ARGS) { sprintf (buf, "%d", (unsigned int)list[i]); gp_widget_add_choice (*widget, buf); } - ptp_panasonic_getdeviceproperty(params, 0x2000021, &valsize, ¤tVal); + ptp_panasonic_getdeviceproperty(params, PTP_DPC_PANASONIC_ISO_Param, &valsize, ¤tVal); sprintf (buf, "%d", (unsigned int)currentVal); gp_widget_set_value (*widget, buf); diff --git a/camlibs/ptp2/ptp.h b/camlibs/ptp2/ptp.h index 4ce72da52..07abb2c5f 100644 --- a/camlibs/ptp2/ptp.h +++ b/camlibs/ptp2/ptp.h @@ -3238,12 +3238,32 @@ typedef struct _PTPCanonEOSDeviceInfo { /* Panasonic does not have regular device properties, they use some 32bit values */ #define PTP_DPC_PANASONIC_PhotoStyle 0x02000010 #define PTP_DPC_PANASONIC_ISO 0x02000020 +#define PTP_DPC_PANASONIC_ISO_Param 0x02000021 +#define PTP_DPC_PANASONIC_ISO_UpperLimit 0x02000022 #define PTP_DPC_PANASONIC_ShutterSpeed 0x02000030 +#define PTP_DPC_PANASONIC_ShutterSpeed_Param 0x02000031 +#define PTP_DPC_PANASONIC_ShutterSpeed_RangeLimit 0x02000032 #define PTP_DPC_PANASONIC_Aperture 0x02000040 +#define PTP_DPC_PANASONIC_Aperture_Param 0x02000041 +#define PTP_DPC_PANASONIC_Aperture_RangeLimit 0x02000042 #define PTP_DPC_PANASONIC_WhiteBalance 0x02000050 +#define PTP_DPC_PANASONIC_WhiteBalance_Param 0x02000051 +#define PTP_DPC_PANASONIC_WhiteBalance_KSet 0x02000052 +#define PTP_DPC_PANASONIC_WhiteBalance_ADJ_AB 0x02000053 +#define PTP_DPC_PANASONIC_WhiteBalance_ADJ_GM 0x02000054 +#define PTP_DPC_PANASONIC_WhiteBalance_ADJ_AB_Sep 0x02000055 #define PTP_DPC_PANASONIC_Exposure 0x02000060 +#define PTP_DPC_PANASONIC_Exposure_Param 0x02000061 +#define PTP_DPC_PANASONIC_Exposure_RangeLimit 0x02000062 #define PTP_DPC_PANASONIC_AFArea 0x02000070 /* AFCONFIG */ +#define PTP_DPC_PANASONIC_AFArea_AFModeParam 0x02000071 /* AFCONFIG */ +#define PTP_DPC_PANASONIC_AFArea_AFAreaParam 0x02000072 /* AFCONFIG */ +#define PTP_DPC_PANASONIC_AFArea_SetQuickAFParam 0x02000073 /* AFCONFIG */ #define PTP_DPC_PANASONIC_CameraMode 0x02000080 +#define PTP_DPC_PANASONIC_CameraMode_DriveMode 0x02000081 +#define PTP_DPC_PANASONIC_CameraMode_ModePos 0x02000082 +#define PTP_DPC_PANASONIC_CameraMode_CreativeMode 0x02000083 +#define PTP_DPC_PANASONIC_CameraMode_iAMode 0x02000084 #define PTP_DPC_PANASONIC_ImageFormat 0x020000A2 #define PTP_DPC_PANASONIC_MeteringInfo 0x020000B0 #define PTP_DPC_PANASONIC_IntervalInfo 0x020000C0 @@ -3265,6 +3285,10 @@ typedef struct _PTPCanonEOSDeviceInfo { #define PTP_DPC_PANASONIC_Zoom 0x03000080 #define PTP_DPC_PANASONIC_RecCtrlLens 0x03010010 #define PTP_DPC_PANASONIC_MovConfig 0x06000010 /* uses 9408 */ +#define PTP_DPC_PANASONIC_MovConfig_C_Movie_Mode 0x06000011 /* uses 9409 */ +#define PTP_DPC_PANASONIC_MovConfig_HDMI_Mode 0x06000012 /* uses 9409 */ +#define PTP_DPC_PANASONIC_MovConfig_Quality_Mode 0x06000013 /* uses 9409 */ +#define PTP_DPC_PANASONIC_MovConfig_Rec_Mode 0x06000014 /* uses 9409 */ #define PTP_DPC_PANASONIC_08000010 0x08000010 /* various modes of the camera, HDMI, GetDateTimeWorldTime Mode/Area, SetupCfgInfo, SetupConfig_DateTime, GetSystemFreq Mode, GetSetupConfig Info */ /* |