{"action":"closed","issue":{"url":"https://api.github.com/repos/gphoto/gphoto2/issues/42","repository_url":"https://api.github.com/repos/gphoto/gphoto2","labels_url":"https://api.github.com/repos/gphoto/gphoto2/issues/42/labels{/name}","comments_url":"https://api.github.com/repos/gphoto/gphoto2/issues/42/comments","events_url":"https://api.github.com/repos/gphoto/gphoto2/issues/42/events","html_url":"https://github.com/gphoto/gphoto2/issues/42","id":183137189,"number":42,"title":"feature request: trigger_capture() for Sony","user":{"login":"jbreiden","id":4961958,"avatar_url":"https://avatars.githubusercontent.com/u/4961958?v=3","gravatar_id":"","url":"https://api.github.com/users/jbreiden","html_url":"https://github.com/jbreiden","followers_url":"https://api.github.com/users/jbreiden/followers","following_url":"https://api.github.com/users/jbreiden/following{/other_user}","gists_url":"https://api.github.com/users/jbreiden/gists{/gist_id}","starred_url":"https://api.github.com/users/jbreiden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbreiden/subscriptions","organizations_url":"https://api.github.com/users/jbreiden/orgs","repos_url":"https://api.github.com/users/jbreiden/repos","events_url":"https://api.github.com/users/jbreiden/events{/privacy}","received_events_url":"https://api.github.com/users/jbreiden/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"msmeissn","id":1862900,"avatar_url":"https://avatars.githubusercontent.com/u/1862900?v=3","gravatar_id":"","url":"https://api.github.com/users/msmeissn","html_url":"https://github.com/msmeissn","followers_url":"https://api.github.com/users/msmeissn/followers","following_url":"https://api.github.com/users/msmeissn/following{/other_user}","gists_url":"https://api.github.com/users/msmeissn/gists{/gist_id}","starred_url":"https://api.github.com/users/msmeissn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/msmeissn/subscriptions","organizations_url":"https://api.github.com/users/msmeissn/orgs","repos_url":"https://api.github.com/users/msmeissn/repos","events_url":"https://api.github.com/users/msmeissn/events{/privacy}","received_events_url":"https://api.github.com/users/msmeissn/received_events","type":"User","site_admin":false},"assignees":[{"login":"msmeissn","id":1862900,"avatar_url":"https://avatars.githubusercontent.com/u/1862900?v=3","gravatar_id":"","url":"https://api.github.com/users/msmeissn","html_url":"https://github.com/msmeissn","followers_url":"https://api.github.com/users/msmeissn/followers","following_url":"https://api.github.com/users/msmeissn/following{/other_user}","gists_url":"https://api.github.com/users/msmeissn/gists{/gist_id}","starred_url":"https://api.github.com/users/msmeissn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/msmeissn/subscriptions","organizations_url":"https://api.github.com/users/msmeissn/orgs","repos_url":"https://api.github.com/users/msmeissn/repos","events_url":"https://api.github.com/users/msmeissn/events{/privacy}","received_events_url":"https://api.github.com/users/msmeissn/received_events","type":"User","site_admin":false}],"milestone":null,"comments":1,"created_at":"2016-10-14T19:55:02Z","updated_at":"2016-10-21T07:23:17Z","closed_at":"2016-10-21T07:23:17Z","body":"I took a look at adding camera_trigger_capture() support to the Sony, based on sony_capture_camera(). It didn't go very well. Running gphoto-capture --trigger-capture in a loop on an Sony A7R would cause a shutter release every other time. I must be leaving the camera in a really weird state. Any thoughts on this?\r\n\r\n```diff\r\n--- libgphoto2-2.5.10.orig/camlibs/ptp2/library.c\r\n+++ libgphoto2-2.5.10/camlibs/ptp2/library.c\r\n@@ -3918,6 +3918,20 @@ camera_trigger_capture (Camera *camera,\r\n \r\n \tGP_LOG_D (\"Triggering capture to %s\", buf);\r\n \r\n+        if (params->deviceinfo.VendorExtensionID == PTP_VENDOR_SONY) {\r\n+          PTPPropertyValue propval;\r\n+          propval.u16 = 1;\r\n+          C_PTP (ptp_sony_setdevicecontrolvalueb (params, 0xD2C1, &propval, PTP_DTC_UINT16));\r\n+          propval.u16 = 2;\r\n+          C_PTP (ptp_sony_setdevicecontrolvalueb (params, PTP_DPC_SONY_StillImage, &propval, PTP_DTC_UINT16));\r\n+          propval.u16 = 1;\r\n+          C_PTP (ptp_sony_setdevicecontrolvalueb (params, 0xD2C2, &propval, PTP_DTC_UINT16));\r\n+          propval.u16 = 1;\r\n+          C_PTP (ptp_sony_setdevicecontrolvalueb (params, 0xD2C1, &propval, PTP_DTC_UINT16));\r\n+          return GP_OK;\r\n+        }\r\n+\r\n+        \r\n \t/* Nilon V and J seem to like that */\r\n \tif (\t(params->deviceinfo.VendorExtensionID == PTP_VENDOR_NIKON) &&\r\n \t\t!params->controlmode &&\r\n```"}}
{"actor":{"display_login":"msmeissn"}}