All supported dial modes worked including play but record crashed camera.
Just to be clear, you mean selecting ModeDialToRec crashed ? If so, you could try switching the Mask option on this item.
However, it seems like PressRecButton and PressPBButton (probably paired with Unpress) work on every camera so far, so no need to worry about it too much.
For anyone who wants input on the process, here's my thoughts how this is going to go into CHDK
- Use the PressRec/PressPB method to force Record/Playback.
For some cameras (probably all those switch rather than rec/play buttons) we need to find a variable or function to get the actual state, because they rely on physw_status bits related to the switch to detect mode. This should still be easier than figuring out and overriding the switch bits.
The script interface for this can be as simple as
force_play_mode and force_record_mode
- Probably use SetCurrentCaptureModeType for modes, either by finding the function on every camera, or as an eventproc.
This need more testing. I can provide builds for any camera, just ask. This is available in the eventproc patch
http://chdk.setepontos.com/index.php/topic,4417.msg42326.html#msg42326If this works on all cameras, it is much better than dial overrides. You can set any of the available modes, whether they are accessed by dial, switch, func menu etc. We already have a modemap for each camera, so they can be referred to by standard constants that already exist.
the script interface to this would be
set_capture_mode(x), where x is either a CHDK modemap constant, or (in lua) a string. I would also put in a function to determine if a particular mode is valid on the camera, and one to translate between canon propcase mode values and CHDK values.
With the above, I don't think we need a specific movie override.
In lua, almost all of this could be written in lua with just the eventproc interface, but if we are going to write functions for ubasic, we might as well provide the same simple built in interface to lua.
For all of the scripted overrides, it would be nice to be able to restore things to the original state when the script ended. OTOH, some people might want scripts that set things are particular way and then exited ?