gphoto / libgphoto2

The libgphoto2 camera access and control library.
GNU Lesser General Public License v2.1
1.06k stars 327 forks source link

Improve eosremoterelease choices #778

Open transistortim opened 2 years ago

transistortim commented 2 years ago

Is your feature request related to a problem? Please describe. In my setup I need to capture photos with a Canon camera without triggering autofocus, which is why I dug into eosremoterelease. I found two issues dealing with autofocus and eosremoterelease settings, here and over at gphoto2. After some try & error and problems with localisation I got it working for my use-case. Nevertheless, in my opinion the eosremoterelease choice names are non-self-explanatory for users not looking into the low-level communication (info on AF is missing, Press 1, 2, 3). I felt invited by the comment / debugging / to do some tests and compile information from various places, see below.

Describe the solution you'd like Draft proposal for new eosremoterelease choices: choice name remotereleaseon remotereleaseoff
Half-Press no AF 1, 1
Full-Press no AF* 2, 1*
Instant-Press no AF 3, 1
Half-Press AF 1, 0
Full-Press AF 2, 0
Instant-Press AF 3, 0
Half-Release 1
Full-Release 2
Instant-Release 3

*remotereleaseon 2, 1 is currently missing from eosremoterelease options. If there is a logic behind this, this should be Full-Press without AF. "Full-Press" means pressing the button "the other half" (1/2 -> 1) after already having performed a "Half-Press" (0 -> 1/2). "Instant-Press" is the instant press without halting halfway (0 -> 1). I'm not a native speaker, maybe someone knows better fitting terms.

Describe alternatives you've considered I'm open to discussion.

Additional context To understand eosremoterelease, first of all I looked at capturing. What camera_trigger_canon_eos_capture does is:

The remotereleaseon/-off parameters for eosremoterelease are defined here. They are listed in the following table and cross-referenced to the names in the debug messages of camera_trigger_canon_eos_capture.

Choice name remotereleaseon remotereleaseoff Name in capture debug msg Note
Press Half 1, 1 not used
Press Full 3, 1 not used
Immediate 1, 1; 3, 1 not used
Press 1 1, 0 EOS Half-Press
Press 2 2, 0 EOS Full-Press
Press 3 3, 0 EOS M Full-Press
Release 1 1 EOS Half-Release same as Release Half
Release 2 2 EOS Full-Release
Release 3 3 EOS M Full-Release same as Release Full
Release Half 1 EOS Half-Release
Release Full 3 EOS M Full-Release

It seems the values 1 & 2 are valid for EOS, while 3 is valid for EOS M. This is also mentioned in the code of ptpy - a Python implementation of PTP. I do not think there is a difference between EOS and EOS M, because...

I'm pretty sure the second remotereleaseon parameter is AF, because

Results of my own tests with EOS M6 Mark II and EOS M50 (both show the same behaviour):

Choice name Shutter triggered AF triggered Note
Press Half
Press Full
Immediate
Press 1
Press 2 Error: PTP Device Busy (0x2019)
Press 2 after calling Press 1 without releasing
Press 3
Release Half
Release Full
Release 1
Release 2
Release 3

Open questions:

If the questions are resolved, I could help with the implementation.

msmeissn commented 2 years ago

sorry for not getting back earlier. i am very busy these days :/

i think that the second argument includes autofocusing might be true, but i need to go into debugging this locally too. i hope i can find the time somewhen in next weeks :/

Sija commented 1 month ago

Would be great to have this sorted out.

axxel commented 1 month ago

@transistortim if you are still around for feedback: nice work. I have a question regarding your Instant-Press suggestion: What is the expected/real behavior of sending just one 3,0 if the lens is out of focus? Does it focus or doesn't it?

Is your conclusion from your tests that sending a 3 is exactly equivalent of sending first a 1, then immediately a 2?

I'd be in support of removing the EOS-M special casing if not required. As a random data point: The very latest EOSUtility USB traces from an R5m2 shows the interesting pattern (1,1), (1), (1,1), (2,1), (2), (download the image!), (1).