The code is now like this (after a few 100 test shots...):
chdkptp -c -e"clock -sync" -e"rs $downloadCamera -av=4.0 -sv=80 -shots=1 -int=5 -sdmode=AF -sd=1494mm"
chdkptp -c -e"rs $downloadCamera -av=4.0 -sv=80 -shots=600 -int=15 -sdmode=MF -sd=1494mm"
I'm really not sure about this. I got focus to infinity at about 1493mm-1496mm which is fine.
This does not seem right. At wide angle, "infinity" is often quite close, but only 1.5 meters is unusual.
What was not so funny: sometimes the focus point jumped. it was not consistend. also at -sdmode=MF
the focuspoint doesn't move at all? so in -sdmode=MF -sd=1494mm
the -sd=1494mm part is needed but doesn't change anything?
-sdmode=MF
should put the camera in MF mode. After that that, the camera should not change focus on it's own (but in practice I think it can change a little after shooting). -sd should set the focus to whatever distance you set.
Since I have to use anydesk to access the PC which controlls the camera, my brother confirmed that the camera still focuses before releasing the shutter. So it seems not to work properly.
Yes, if the camera does autofocus with -sdmode=MF something isn't right.
The "safety MF" setting in the Canon menu could be on.
On many cameras, if the display is turned off, the MF setting will be lost.
If your connection is good enough to use chdkptp live view, you can test MF:
use =set_mf(1) to enable MF mode, and then if you use =set_focus() with different numbers, you should see the focus distance change immediately.
If set_mf is just not working on this port, you could try set_aflock (-sdmode=AFL in chdkptp shooting commands) instead.
Is it possible to control the exposure via CHDKPTP? In the USAGE.TXT there is no command but maybe it is still possible somehow.
You can set shutter speed, aperture and ISO individually, but there isn't currently a way to modify the Canon exposure. If you don't set them all, the other values will be set by Canon auto-exposure, but it doesn't know about any values you did override, so the result will not be correct.
In fact, looking at your current command it sets Av and Sv so Canon auto exposure will probably be wrong. To get Canon auto exposure to use the right Tv, you should put the camera in Av mode
-e"luar require'capmode'.set('AV')"
And set the Canon manual AV setting
-e"luar set_prop(require'propcase'.USER_AV,aperture_to_av96(4000))"
Then in your shoot command, you can use just -isomode=80 without any other exposure controls
chdkptp -c -e"rs $downloadCamera -isomode=80 -shots=600 -int=15 -sdmode=MF -sd=1494mm"
There are some other ways approach this:
The
https://github.com/alesanmanoweb/multilapse-CHDK/blob/master/multilapse.lua script uses an separate script half press to read back the cameras measured exposure. In that case, it just gets the Bv, but you could return the camera Tv, Av and Sv if you wanted.
You can also write your own camera side script (or use an existing one, with some glue code) to decide the exposure for each shot. See
https://chdk.setepontos.com/index.php?topic=13386.msg136688#msg136688