Using a Canon 6D and libgphoto2, I am trying to switch between capture and preview mode. That would be the equivalent of gphoto2 --set-config eosviewfinder=1
and gphoto2 --set-config eosviewfinder=0
, both of which are working smoothly (as long as I don't run the autofocus manually as described here).
However, using libgphoto2, I can only go to preview mode (setting eosviewfinder
to "1"), but I cannot go back to capture mode (setting eosviewfinder
to "0" does not give any error but just doesn't do anything).
I am using the same code as in the focus
example (here), but with "eosviewfinder" instead of "autofocusdrive".
Am I missing something?
can you attach the code you use here perhaps? that will make it easier to reproduce this for me.
Thanks for the answer. I uploaded a minimal example here. I am coding in C++.
Actually, I used
focus.c
to make the functiontoggleConfig
. It works with "autofocusdrive" (even though it lets the camera in an unstable state) and it also works with "eosviewfinder=1" (using `setPreviewMode(true));Running this code, you should hear that it goes to preview mode (
setPreviewMode(true)
) but it never goes back to capture mode (setPreviewMode(false)
).Could you reproduce my problem using the code I linked?