A few other items (most we discussed in IRC, putting here so the don't get lost)
- set_MF should fail if not in rec mode, without calling the underlying canon function.
Should this apply to set_aflock() too ?
And maybe this should also be a condition in
shooting_can_focus()- set_focus could (should?) return a status value that tells whether focus override is expected to work with the current settings.
We could just use the result of a call in
luaCB_set_focus() (and the uBASIC equivalent) to
shooting_can_focus() as the return value ?
- script set_focus still has some weird logic with shooting_get_common_focus_mode, mf, set_now and set later. In particular the current checks make it use set_now only if the camera has real Canon MF, cameras without Canon MF will use the non-MF codepath even if *MFOn eventprocs work. This doesn't need to be addressed for the first patch.
- Related to the previous, and srsa's suggestion earlier in the thread, the attached patch makes set_focus use set_now if aflock is on. This works on all my cameras. The patch is intended to go on top of waterwingz last patch (it needs the propcase set to know aflock is on). This may address cameras that had no working method. It's also nice because you can see the effect of focus changes right away without shooting.
Patch file merged with mine and attached below.
Fixed
DoMFLock() UnlockMF() when using
PressSw1AndMF to enable MF. The call needs to use
PostLogicalEventForNotPowerType rather than
PostLogicalEventToUI. Tested on my G10 - now toggles Canon OSD MF icons as expected.
Also includes the new
mf3_test.lua script.