function bookend() set_user_tv96(usec_to_tv96(1000)) set_av96_direct(get_max_av96()) local ecnt = get_exp_count() snap() set_user_tv96(s_start) set_av96_direct(av) repeat sleep(10) until (get_exp_count() ~= ecnt)end
What I see is that the shutter is not explicitly set to 1/1000 every time I call the function, as I would expect. Are you aware of a situation when set_user_tv96 won’t explicitly set the shutter value?
I’m using this script https://gist.github.com/pigeonhill/3fe9e52621db7149eb3505bd60b395cb
Quote from: pigeonhill on 30 / January / 2023, 00:26:42I’m using this script https://gist.github.com/pigeonhill/3fe9e52621db7149eb3505bd60b395cbOne thing I notice is that bookend() is called in a lot of different places. Figuring out whether only some of these calls are affected could help narrow down the problem.A possible cause is if bookend were called before get_shooting goes false from a preceding shot. In that case, the new USER_TV value would likely not be applied. It looks like this could potentially happen for the final bookend call, since some of the preceding code uses myshoot() directly, which only waits for the raw hook, and does not itself release shoot_half.I'm a big fan using logs to collect detailed information about what actually happened. In this case, you could log each call to bookend() and the get_shooting() state on entry.While not likely to be directly related to this problem, another thing I noticed is that seems like some of this code calls myshoot() without shoot_half already held. For example, on line 616, it releases shoot_half and waits for get_shooting to go false, and then calls myshoot, which presses shoot_full_only.I would generally avoid pressing shoot_full_only without having shoot_half held, for two reasons: 1) Going to full press without waiting for get_shooting() in half press is known to trigger various bugs on some ports, like incorrect overrides or missed CHDK raw files2) Having shoot_full_only pressed without shoot_half is impossible using the physical buttons, so the firmware probably doesn't expect it.X_Bracket appears to do the correct sequence, pressing shoot_half, waiting for get_shooting, and then doing multiple shoot_full_only clicks to take individual shots, and then releasing shoot_half when done.
While not likely to be directly related to this problem, another thing I noticed is that seems like some of this code calls myshoot() without shoot_half already held. For example, on line 616, it releases shoot_half and waits for get_shooting to go false, and then calls myshoot, which presses shoot_full_only.
function bookend() --set_user_tv96(usec_to_tv96(1000)) set_tv96_direct(usec_to_tv96(1000)) set_av96_direct(get_max_av96()) local ecnt = get_exp_count() snap() --set_user_tv96(s_start) set_tv96_direct(s_start) set_av96_direct(av) repeat sleep(10) until (get_exp_count() ~= ecnt)end
@reyalp OK, although I don't fully understand why, I've found out what was going wrong, ie using set_user_tv96(s_start)The following is the corrected code, showing what I've done.The script works as expected now :-)Code: [Select]function bookend() --set_user_tv96(usec_to_tv96(1000)) set_tv96_direct(usec_to_tv96(1000)) set_av96_direct(get_max_av96()) local ecnt = get_exp_count() snap() --set_user_tv96(s_start) set_tv96_direct(s_start) set_av96_direct(av) repeat sleep(10) until (get_exp_count() ~= ecnt)end
Started by mikeage General Help and Assistance on using CHDK stable releases
Started by uavz General Help and Assistance on using CHDK stable releases
Started by simtek Script Writing
Started by stevedawson Creative Uses of CHDK
Started by actionman General Help and Assistance on using CHDK stable releases