From 3a8b744318f54117fd2b0070f7395c9ecbdab666 Mon Sep 17 00:00:00 2001 From: mattjowil Date: Fri, 27 Mar 2026 22:38:22 +0100 Subject: [PATCH 1/6] Added Bulb support for Panasonic Lumix DC-G9 (possibly for GH5 as well) --- camlibs/ptp2/config.c | 62 ++++++++++++++- camlibs/ptp2/library.c | 2 +- camlibs/ptp2/ptp.h | 173 +++++++++++++++++++++-------------------- 3 files changed, 149 insertions(+), 88 deletions(-) diff --git a/camlibs/ptp2/config.c b/camlibs/ptp2/config.c index 8b69aa6fb..4807fc62e 100644 --- a/camlibs/ptp2/config.c +++ b/camlibs/ptp2/config.c @@ -9554,7 +9554,9 @@ _put_Sony_SpotFocusArea(CONFIG_PUT_ARGS) { #undef SONY_TOUCH_MAX_X #undef SONY_TOUCH_MAX_Y - +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +////////////////////////////////////// PANASONIC /////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// static int _get_Panasonic_Movie(CONFIG_GET_ARGS) { int val; @@ -10258,6 +10260,59 @@ _get_Panasonic_Exposure(CONFIG_GET_ARGS) { return GP_OK; } +/* ========================================================================= */ +/* PANASONIC BULB PATCH START */ +/* ========================================================================= */ + +static int +_get_Panasonic_Bulb(CONFIG_GET_ARGS) { + int val; + + gp_widget_new (GP_WIDGET_TOGGLE, _(menu->label), widget); + gp_widget_set_name (*widget, menu->name); + val = 0; /* Standardwert: Bulb ist aus (0) */ + gp_widget_set_value (*widget, &val); + + return (GP_OK); +} + +static int +_put_Panasonic_Bulb(CONFIG_PUT_ARGS) +{ + PTPParams *params = &(camera->pl->params); + int val; + int ret; + GPContext *context = ((PTPData *) params->data)->context; + + /* Wert des Toggle-Schalters auslesen (1 = Start, 0 = Stopp) */ + CR (gp_widget_get_value(widget, &val)); + + if (val) { + /* Bulb Start: Opcode 0x9404, Parameter 0x03000012 */ + ret = ptp_generic_no_data(params, PTP_OC_PANASONIC_InitiateCapture, 1, 0x03000012); + if (ret != PTP_RC_OK) { + gp_context_error (context, _("Failed to start Panasonic bulb capture. Make sure the dial is set to M or B.")); + return translate_ptp_result (ret); + } + C_PTP_REP (ret); + } else { + /* Bulb Stop: Opcode 0x9404, Parameter 0x03000013 */ + ret = ptp_generic_no_data(params, PTP_OC_PANASONIC_InitiateCapture, 1, 0x03000013); + + /* Aufräumen (Cleanup): Opcode 0x9404, Parameter 0x03000019 */ + /* Wird direkt hinterhergeschickt, wie beim Lumix Tether Protokoll */ + ptp_generic_no_data(params, PTP_OC_PANASONIC_InitiateCapture, 1, 0x03000019); + + C_PTP_REP (ret); + } + + return GP_OK; +} + +/* ========================================================================= */ +/* PANASONIC BULB PATCH END */ +/* ========================================================================= */ + static int _put_Panasonic_LiveViewSize(CONFIG_PUT_ARGS) { @@ -10412,6 +10467,10 @@ _get_Panasonic_ImageFormat(CONFIG_GET_ARGS) { return GP_OK; } +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + static int _get_Canon_EOS_Bulb(CONFIG_GET_ARGS) { int val; @@ -11294,6 +11353,7 @@ static struct submenu camera_actions_menu[] = { { N_("Bulb Mode"), "bulb", 0, PTP_VENDOR_NIKON, PTP_OC_NIKON_TerminateCapture, _get_Nikon_Bulb, _put_Nikon_Bulb }, { N_("Bulb Mode"), "bulb", 0, PTP_VENDOR_GP_OLYMPUS_OMD, PTP_OC_OLYMPUS_OMD_Capture, _get_Olympus_OMD_Bulb, _put_Olympus_OMD_Bulb }, { N_("Bulb Mode"), "bulb", 0, PTP_VENDOR_FUJI, PTP_OC_InitiateCapture, _get_Fuji_Bulb, _put_Fuji_Bulb }, + { N_("Bulb Mode"), "bulb", 0, PTP_VENDOR_PANASONIC, PTP_OC_PANASONIC_InitiateCapture, _get_Panasonic_Bulb, _put_Panasonic_Bulb }, { N_("UI Lock"), "uilock", 0, PTP_VENDOR_CANON, PTP_OC_CANON_EOS_SetUILock, _get_Canon_EOS_UILock, _put_Canon_EOS_UILock }, { N_("Popup Flash"), "popupflash", 0, PTP_VENDOR_CANON, PTP_OC_CANON_EOS_PopupBuiltinFlash, _get_Canon_EOS_PopupFlash, _put_Canon_EOS_PopupFlash }, { N_("Drive Nikon DSLR Autofocus"), "autofocusdrive", 0, PTP_VENDOR_NIKON, PTP_OC_NIKON_AfDrive, _get_Nikon_AFDrive, _put_Nikon_AFDrive }, diff --git a/camlibs/ptp2/library.c b/camlibs/ptp2/library.c index 184436916..af15cacb9 100644 --- a/camlibs/ptp2/library.c +++ b/camlibs/ptp2/library.c @@ -1882,7 +1882,7 @@ static struct { {"Panasonic:DMC-LX7", 0x04da, 0x2374, 0}, /* Constantin B */ {"Panasonic:DMC-GF1", 0x04da, 0x2374, 0}, - + /* Matthias : The Panasonic Lumix DC-G9 reports the same vendor and product ID (04da:2382) */ {"Panasonic:DC-GH5", 0x04da, 0x2382, PTP_CAP|PTP_CAP_PREVIEW}, diff --git a/camlibs/ptp2/ptp.h b/camlibs/ptp2/ptp.h index 15774313a..864535f59 100644 --- a/camlibs/ptp2/ptp.h +++ b/camlibs/ptp2/ptp.h @@ -959,54 +959,55 @@ typedef struct _PTPIPHeader PTPIPHeader; #define PTP_OC_PARROT_MagnetoCalibStatus 0x9212 #define PTP_OC_PARROT_SendFirmwareUpdate 0x9213 -#define PTP_OC_PANASONIC_9101 0x9101 -#define PTP_OC_PANASONIC_OpenSession 0x9102 /* opensession (1 arg, seems to be storage id 0x00010001)*/ -#define PTP_OC_PANASONIC_CloseSession 0x9103 /* closesession (no arg) */ -#define PTP_OC_PANASONIC_9104 0x9104 /* get ext device id (1 arg?) */ +/* Panasonic opcodes */ +#define PTP_OC_PANASONIC_9101 0x9101 +#define PTP_OC_PANASONIC_OpenSession 0x9102 /* opensession (1 arg, seems to be storage id 0x00010001)*/ +#define PTP_OC_PANASONIC_CloseSession 0x9103 /* closesession (no arg) */ +#define PTP_OC_PANASONIC_9104 0x9104 /* get ext device id (1 arg?) */ /* 9104 gets this data: 0000 24 00 00 00 02 00 04 91-04 00 00 00 01 00 01 00 $............... 0010 01 00 e1 07 10 00 00 00-00 00 00 00 00 00 00 00 ................ 0020 00 00 00 00 - .... */ -#define PTP_OC_PANASONIC_9107 0x9107 /* getsize? */ -#define PTP_OC_PANASONIC_ListProperty 0x9108 -#define PTP_OC_PANASONIC_9110 0x9110 /* Get_Object infos */ -#define PTP_OC_PANASONIC_9112 0x9112 /* Get Partial Object , 4 args */ -#define PTP_OC_PANASONIC_9113 0x9113 /* Skip Objects Transfer , 1 arg */ +#define PTP_OC_PANASONIC_9107 0x9107 /* getsize? */ +#define PTP_OC_PANASONIC_ListProperty 0x9108 +#define PTP_OC_PANASONIC_9110 0x9110 /* Get_Object infos */ +#define PTP_OC_PANASONIC_9112 0x9112 /* Get Partial Object , 4 args */ +#define PTP_OC_PANASONIC_9113 0x9113 /* Skip Objects Transfer , 1 arg */ -#define PTP_OC_PANASONIC_9401 0x9401 -#define PTP_OC_PANASONIC_GetProperty 0x9402 -#define PTP_OC_PANASONIC_SetProperty 0x9403 -#define PTP_OC_PANASONIC_InitiateCapture 0x9404 /* Rec Ctrl Release */ -#define PTP_OC_PANASONIC_9405 0x9405 /* Rec Ctrl AF AE */ -#define PTP_OC_PANASONIC_9406 0x9406 /* Setup Ctrl various functions: Format, Sensor Cleaning, Menu Save, firmware update? */ -#define PTP_OC_PANASONIC_9408 0x9408 -#define PTP_OC_PANASONIC_9409 0x9409 /* 1 arg */ -#define PTP_OC_PANASONIC_GetCaptureTarget 0x940A /* 1 arg, e.g. 0x08000010 */ -#define PTP_OC_PANASONIC_SetCaptureTarget 0x940B /* 1 arg, e.g. 0x08000010 */ -#define PTP_OC_PANASONIC_MovieRecControl 0x940C /* 07000011 start, 07000012 stop, 0700013 still capture */ -#define PTP_OC_PANASONIC_PowerControl 0x940D /* 1 arg: 0x0A000011 power off, 0x0a00012 device reset, 0x0a00013 device restart */ -#define PTP_OC_PANASONIC_PlayControl 0x940E /* 2 arg? 0x05000011 current=0, next=1, prev=0xffffffff */ -#define PTP_OC_PANASONIC_PlayControlPlay 0x940F /* 0x05000020 */ -#define PTP_OC_PANASONIC_9410 0x9410 /* Rec Ctrl Other */ -#define PTP_OC_PANASONIC_SetGPSDataInfo 0x9411 -#define PTP_OC_PANASONIC_Liveview 0x9412 /* 0d000010 start, 0d000011 stop */ -#define PTP_OC_PANASONIC_PollEvents 0x9414 /* ? 1 arg e.g 12000020 */ +#define PTP_OC_PANASONIC_9401 0x9401 +#define PTP_OC_PANASONIC_GetProperty 0x9402 +#define PTP_OC_PANASONIC_SetProperty 0x9403 +#define PTP_OC_PANASONIC_InitiateCapture 0x9404 /* Rec Ctrl Release */ +#define PTP_OC_PANASONIC_9405 0x9405 /* Rec Ctrl AF AE */ +#define PTP_OC_PANASONIC_9406 0x9406 /* Setup Ctrl various functions: Format, Sensor Cleaning, Menu Save, firmware update? */ +#define PTP_OC_PANASONIC_9408 0x9408 +#define PTP_OC_PANASONIC_9409 0x9409 /* 1 arg */ +#define PTP_OC_PANASONIC_GetCaptureTarget 0x940A /* 1 arg, e.g. 0x08000010 */ +#define PTP_OC_PANASONIC_SetCaptureTarget 0x940B /* 1 arg, e.g. 0x08000010 */ +#define PTP_OC_PANASONIC_MovieRecControl 0x940C /* 07000011 start, 07000012 stop, 0700013 still capture */ +#define PTP_OC_PANASONIC_PowerControl 0x940D /* 1 arg: 0x0A000011 power off, 0x0a00012 device reset, 0x0a00013 device restart */ +#define PTP_OC_PANASONIC_PlayControl 0x940E /* 2 arg? 0x05000011 current=0, next=1, prev=0xffffffff */ +#define PTP_OC_PANASONIC_PlayControlPlay 0x940F /* 0x05000020 */ +#define PTP_OC_PANASONIC_9410 0x9410 /* Rec Ctrl Other */ +#define PTP_OC_PANASONIC_SetGPSDataInfo 0x9411 +#define PTP_OC_PANASONIC_Liveview 0x9412 /* 0d000010 start, 0d000011 stop */ +#define PTP_OC_PANASONIC_PollEvents 0x9414 /* ? 1 arg e.g 12000020 */ #define PTP_OC_PANASONIC_GetLiveViewParameters 0x9414 /* either all formats 0x0d800012 or current format 0x0d800011 */ #define PTP_OC_PANASONIC_SetLiveViewParameters 0x9415 /* current format 0x0d800011 */ -#define PTP_OC_PANASONIC_ManualFocusDrive 0x9416 /* Rec Ctrl Mf Assist, Rec Ctrl Backup Req ... 1 arg */ +#define PTP_OC_PANASONIC_ManualFocusDrive 0x9416 /* Rec Ctrl Mf Assist, Rec Ctrl Backup Req ... 1 arg */ -#define PTP_OC_PANASONIC_ChangeEvent 0x9603 /* 2 args ... e.g. 0x4002, new (change object added event) */ -#define PTP_OC_PANASONIC_GetFromEventInfo 0x9605 /* 1 arg, e.g. 0x41000013 , 15c00021: setup exec menu save comp, 15c00022: setup exec pixel refresh comp */ -#define PTP_OC_PANASONIC_SendDataInfo 0x9606 /* no args? used during firmware update */ -#define PTP_OC_PANASONIC_StartSendData 0x9607 /* no args? used during firmware update */ +#define PTP_OC_PANASONIC_ChangeEvent 0x9603 /* 2 args ... e.g. 0x4002, new (change object added event) */ +#define PTP_OC_PANASONIC_GetFromEventInfo 0x9605 /* 1 arg, e.g. 0x41000013 , 15c00021: setup exec menu save comp, 15c00022: setup exec pixel refresh comp */ +#define PTP_OC_PANASONIC_SendDataInfo 0x9606 /* no args? used during firmware update */ +#define PTP_OC_PANASONIC_StartSendData 0x9607 /* no args? used during firmware update */ -#define PTP_OC_PANASONIC_9703 0x9703 /* Mnt_GetInfo_GetVersion ... 1 arg? */ -#define PTP_OC_PANASONIC_9704 0x9704 /* Set USB Mode ... 80040001 */ -#define PTP_OC_PANASONIC_9705 0x9705 /* Ctrl Liveview */ -#define PTP_OC_PANASONIC_LiveviewImage 0x9706 /* Get Liveview Data */ -#define PTP_OC_PANASONIC_9707 0x9707 /* 4k6k cutting get stream */ +#define PTP_OC_PANASONIC_9703 0x9703 /* Mnt_GetInfo_GetVersion ... 1 arg? */ +#define PTP_OC_PANASONIC_9704 0x9704 /* Set USB Mode ... 80040001 */ +#define PTP_OC_PANASONIC_9705 0x9705 /* Ctrl Liveview */ +#define PTP_OC_PANASONIC_LiveviewImage 0x9706 /* Get Liveview Data */ +#define PTP_OC_PANASONIC_9707 0x9707 /* 4k6k cutting get stream */ /* Samsung NX: * 9002 send check event @@ -3490,61 +3491,61 @@ typedef struct _PTPCanonEOSDeviceInfo { #define PTP_DPC_PARROT_MultisensorsIrradianceIntegrationTime 0xD218 #define PTP_DPC_PARROT_OverlapRate 0xD219 -/* 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 +/* Panasonic does not have regular device properties, they use 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_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_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_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_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 -#define PTP_DPC_PANASONIC_RecDispConfig 0x020000E0 -#define PTP_DPC_PANASONIC_RecInfoFlash 0x02000110 -#define PTP_DPC_PANASONIC_BurstBracket 0x02000140 -#define PTP_DPC_PANASONIC_RecPreviewConfig 0x02000170 -#define PTP_DPC_PANASONIC_RecInfoSelfTimer 0x020001A0 -#define PTP_DPC_PANASONIC_RecInfoFlash2 0x020001B0 -#define PTP_DPC_PANASONIC_RecCtrlRelease 0x03000010 +#define PTP_DPC_PANASONIC_ImageFormat 0x020000A2 +#define PTP_DPC_PANASONIC_MeteringInfo 0x020000B0 +#define PTP_DPC_PANASONIC_IntervalInfo 0x020000C0 +#define PTP_DPC_PANASONIC_RecDispConfig 0x020000E0 +#define PTP_DPC_PANASONIC_RecInfoFlash 0x02000110 +#define PTP_DPC_PANASONIC_BurstBracket 0x02000140 +#define PTP_DPC_PANASONIC_RecPreviewConfig 0x02000170 +#define PTP_DPC_PANASONIC_RecInfoSelfTimer 0x020001A0 +#define PTP_DPC_PANASONIC_RecInfoFlash2 0x020001B0 +#define PTP_DPC_PANASONIC_RecCtrlRelease 0x03000010 -#define PTP_DPC_PANASONIC_RecCtrlAFAE 0x03000020 /* cmd base for afae */ -#define PTP_DPC_PANASONIC_RecCtrlAFAE_LockAE 0x03000021 -#define PTP_DPC_PANASONIC_RecCtrlAFAE_LockAF 0x03000022 -#define PTP_DPC_PANASONIC_RecCtrlAFAE_LockAFAE 0x03000023 -#define PTP_DPC_PANASONIC_RecCtrlAFAE_AF_OneShot 0x03000024 -#define PTP_DPC_PANASONIC_RecCtrlAFAE_Lock_Clear 0x03000025 +#define PTP_DPC_PANASONIC_RecCtrlAFAE 0x03000020 /* cmd base for afae */ +#define PTP_DPC_PANASONIC_RecCtrlAFAE_LockAE 0x03000021 +#define PTP_DPC_PANASONIC_RecCtrlAFAE_LockAF 0x03000022 +#define PTP_DPC_PANASONIC_RecCtrlAFAE_LockAFAE 0x03000023 +#define PTP_DPC_PANASONIC_RecCtrlAFAE_AF_OneShot 0x03000024 +#define PTP_DPC_PANASONIC_RecCtrlAFAE_Lock_Clear 0x03000025 -#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 +#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 */ /* 0000 54 00 00 00 02 00 0a 94-04 00 00 00 11 00 00 08 T............... @@ -3568,7 +3569,7 @@ typedef struct _PTPCanonEOSDeviceInfo { 00b0 9e 00 00 00 16 00 00 08-14 00 00 00 14 00 00 00 ................ 00c0 01 00 01 00 00 00 00 00-01 00 00 00 2c 00 00 00 ............,... */ -#define PTP_DPC_PANASONIC_08000091 0x08000091 /* SetupFilesConfig_Set_Target */ +#define PTP_DPC_PANASONIC_08000091 0x08000091 /* SetupFilesConfig_Set_Target */ /* 0000 16 00 00 00 02 00 0a 94-04 00 00 00 91 00 00 08 ................ 0010 02 00 00 00 00 00 - ...... From d52a249743baed3fd2111171444a49de98b93447 Mon Sep 17 00:00:00 2001 From: mattjowil Date: Sat, 28 Mar 2026 00:37:29 +0100 Subject: [PATCH 2/6] Cleaned-up comments, language to english --- camlibs/ptp2/config.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/camlibs/ptp2/config.c b/camlibs/ptp2/config.c index 4807fc62e..fe93b4e90 100644 --- a/camlibs/ptp2/config.c +++ b/camlibs/ptp2/config.c @@ -10260,17 +10260,13 @@ _get_Panasonic_Exposure(CONFIG_GET_ARGS) { return GP_OK; } -/* ========================================================================= */ -/* PANASONIC BULB PATCH START */ -/* ========================================================================= */ - static int _get_Panasonic_Bulb(CONFIG_GET_ARGS) { int val; gp_widget_new (GP_WIDGET_TOGGLE, _(menu->label), widget); gp_widget_set_name (*widget, menu->name); - val = 0; /* Standardwert: Bulb ist aus (0) */ + val = 0; /* Default: Bulb OFF (0) */ gp_widget_set_value (*widget, &val); return (GP_OK); @@ -10284,7 +10280,7 @@ _put_Panasonic_Bulb(CONFIG_PUT_ARGS) int ret; GPContext *context = ((PTPData *) params->data)->context; - /* Wert des Toggle-Schalters auslesen (1 = Start, 0 = Stopp) */ + /* Read toggle switch value (1 = start, 0 = stopp) */ CR (gp_widget_get_value(widget, &val)); if (val) { @@ -10299,8 +10295,8 @@ _put_Panasonic_Bulb(CONFIG_PUT_ARGS) /* Bulb Stop: Opcode 0x9404, Parameter 0x03000013 */ ret = ptp_generic_no_data(params, PTP_OC_PANASONIC_InitiateCapture, 1, 0x03000013); - /* Aufräumen (Cleanup): Opcode 0x9404, Parameter 0x03000019 */ - /* Wird direkt hinterhergeschickt, wie beim Lumix Tether Protokoll */ + /* Opcode 0x9404, Parameter 0x03000019 */ + /* Lumix Thether software sends this right after Bulb stop is sent.*/ ptp_generic_no_data(params, PTP_OC_PANASONIC_InitiateCapture, 1, 0x03000019); C_PTP_REP (ret); @@ -10309,10 +10305,6 @@ _put_Panasonic_Bulb(CONFIG_PUT_ARGS) return GP_OK; } -/* ========================================================================= */ -/* PANASONIC BULB PATCH END */ -/* ========================================================================= */ - static int _put_Panasonic_LiveViewSize(CONFIG_PUT_ARGS) { From dd404feccc7e920f6a39c6f220743b92e67fc1b0 Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Sun, 29 Mar 2026 17:30:34 +0200 Subject: [PATCH 3/6] Update camlibs/ptp2/config.c Co-authored-by: Sijawusz Pur Rahnama --- camlibs/ptp2/config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/camlibs/ptp2/config.c b/camlibs/ptp2/config.c index fe93b4e90..389b95520 100644 --- a/camlibs/ptp2/config.c +++ b/camlibs/ptp2/config.c @@ -10280,7 +10280,7 @@ _put_Panasonic_Bulb(CONFIG_PUT_ARGS) int ret; GPContext *context = ((PTPData *) params->data)->context; - /* Read toggle switch value (1 = start, 0 = stopp) */ + /* Read toggle switch value (1 = start, 0 = stop) */ CR (gp_widget_get_value(widget, &val)); if (val) { From 08704777551dd118e17bdea7a22b7a3ed73ee593 Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Sun, 29 Mar 2026 17:39:34 +0200 Subject: [PATCH 4/6] Update camlibs/ptp2/config.c MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Hubert Figuière --- camlibs/ptp2/config.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/camlibs/ptp2/config.c b/camlibs/ptp2/config.c index 389b95520..ad274d0e6 100644 --- a/camlibs/ptp2/config.c +++ b/camlibs/ptp2/config.c @@ -9554,9 +9554,6 @@ _put_Sony_SpotFocusArea(CONFIG_PUT_ARGS) { #undef SONY_TOUCH_MAX_X #undef SONY_TOUCH_MAX_Y -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -////////////////////////////////////// PANASONIC /////////////////////////////////////////////////////////////////////////////////////////////////// -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// static int _get_Panasonic_Movie(CONFIG_GET_ARGS) { int val; From 9ee36b2f0762e29b943d81ed60a58e83579576c1 Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Sun, 29 Mar 2026 17:39:50 +0200 Subject: [PATCH 5/6] Update camlibs/ptp2/config.c MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Hubert Figuière --- camlibs/ptp2/config.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/camlibs/ptp2/config.c b/camlibs/ptp2/config.c index ad274d0e6..4b567c0f5 100644 --- a/camlibs/ptp2/config.c +++ b/camlibs/ptp2/config.c @@ -10456,10 +10456,6 @@ _get_Panasonic_ImageFormat(CONFIG_GET_ARGS) { return GP_OK; } -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - static int _get_Canon_EOS_Bulb(CONFIG_GET_ARGS) { int val; From 4b8f28246f1ae39938e87f80283577773200daf5 Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Sun, 29 Mar 2026 17:41:22 +0200 Subject: [PATCH 6/6] Apply suggestions from code review Co-authored-by: Sijawusz Pur Rahnama --- camlibs/ptp2/config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/camlibs/ptp2/config.c b/camlibs/ptp2/config.c index 4b567c0f5..41495c220 100644 --- a/camlibs/ptp2/config.c +++ b/camlibs/ptp2/config.c @@ -10293,7 +10293,7 @@ _put_Panasonic_Bulb(CONFIG_PUT_ARGS) ret = ptp_generic_no_data(params, PTP_OC_PANASONIC_InitiateCapture, 1, 0x03000013); /* Opcode 0x9404, Parameter 0x03000019 */ - /* Lumix Thether software sends this right after Bulb stop is sent.*/ + /* Lumix Thether software sends this right after Bulb stop is sent. */ ptp_generic_no_data(params, PTP_OC_PANASONIC_InitiateCapture, 1, 0x03000019); C_PTP_REP (ret);