It also seems to be somewhat intermittent, possibly related to the subject it is trying to focus on.Turning off the flash or removing the shooting_is_flash_ready() part appears to make this go away, unless I'm getting caught by the random element.
My first thought is that it's intermittent (also) because flash charging time varies, and that the problem is that CHDK stays in a loop waiting for the flash without letting the camera's software work it's magic, including watchdog resets.
I don't know how often the camera resets its watchdog, so the phase of the reset period could also be a source of variation.
hm, so this behaviour should occur on all cameras, right?
will do some tests tonight. this fix of yours, is it considered to be safe and not breaking anything? if yes (perhaps some people can do tests) i can patch the trunk and the branch. right?
ubasic.c: In function `case_statement':ubasic.c:830: warning: 'gosub_ln' might be used uninitialized in this functionubasic.c: In function `case_else_statement':ubasic.c:919: warning: 'gosub_ln' might be used uninitialized in this functionkbd.c: In function `kbd_process':kbd.c:565: warning: 'drmode' might be used uninitialized in this function
lmathlib.c: In function `math_pow':lmathlib.c:118: warning: implicit declaration of function `luai_ipow'
Correcting, instead of if ((t != 2) && (shooting_in_progress())) return (shooting_is_flash() && _IsStrobeChargeCompleted());one should say if ((t != 2) && (shooting_in_progress())) if (shooting_is_flash()) return _IsStrobeChargeCompleted();
Oh that makes sense. I'm embarrassed to say I looked at that a couple times and didn't notice
Well, one more little fix for the trunk. A brief click on the "Alt" button is supposed to invoke/dismiss the alt-menu. Well, invoke it does, but on the way out "Alt" remains clicked, so if there's a regular function on that button, it gets invoked whenever exiting the alt-menu. A simple fix takes just a few lines in core/kbd.c, namely instead of
Sounds like fix #7 in My modifications to CHDK, already in juciphox since #417. I use a (bit old by now) trunk build with some patches including ljl's zebra and cyril42e's alt fix and both work well. Your modification is suspiciously lot simpler, though...