This could be the simplest solution for SD4000 hangs after taking shots at 1/15s and slower. It doesn't involve build modifications nor Canon firmware modifications. It is very, very simple.
My autorun script, extended:
@title SD4000 Bootup
@chdk_version 1.4.1
sleep 500
if autostarted = 0 then goto "Exit"
if get_drive_mode = 0 then
press "shoot_half"
sleep 1000
release "shoot_half"
endif
:Exit
cls
exit_alt 0
:Loop
wait_click 99999
if is_key "shoot_full_only" then get_tv a
if a < 13 then sleep 5000
set_record(0)
sleep 5000
set_record(1)
goto "Loop"end
The loop works as intended, but there is no difference between shoot_half and shoot_full. Set_record command activates on
half press already, regardless of selected shutter speed in Av, which should NOT happen. I tried all combinations (shoot, shoot_full, shoot_full_only). The first part of the script works fine, and it seems that shoot_half is properly recognized. Why isn't it recognized in the loop I wrote? The idea is to check shutter speed for taken shot, and then, if shutter speed is 1/15s or slower, automatically go to playback mode, then go back to recording mode after 5000ms. Times will have to be adjusted of course. There is a table for shutter speed values at one of the CHDK pages (13 = 1/20, 12 = 1/15). Maybe Tv96 is required for SD4000? Maybe something else?
Also, instead of activating playback mode, one could also activate Alt, and then exit Alt - but what is the command? This could be even better as shutter button would stop the script and one could stay in Alt, then go to playback/image review etc.
This is the solution I want, and the only one realistic for SD4000. Automatic image review doesn't do what I want, I tested it. This could be handy if you don't want to review images but need to prevent the hangs (sometimes one could forget to press the buttons!).
The problem is marked in red: is_key must be SHOOT FULL, not HALF PRESS, and the value for shutter speed must be correct for Canon SD4000/IXUS 300 HS.
Can this be done?