Hope you can help as I'm get some strange results on my M3.
Here is the code:
local iso = get_sv96()
myshoot()
set_sv96(iso+96*4)
myshoot()
set_sv96(iso)
All I'm trying to do is lift the ISO by 4 stops, eg from 100, say, to 1600.
The above gives me 400 and also 400 even if I use 96*8.
Any ideas?
Hard to say without any logging or knowing what myshoot does.
A few possibly relevant items:
The get_sv96 value is not necessarily valid outside of half press. It will likely be 0 before a shot has been taken, and whatever value was set in the last half press otherwise.
Another thing to keep in mind is that CHDK overrides set outside of half press are generally only applied in the next half press. So if you subsequently half press without shooting, the override will be lost, and if you shoot multiple shots, the override will only be applied to the first.
Using set_sv96 inside half press sets the values immediately, but because it isn't coordinated with the rest of the Canon shooting process, it may be sensitive to timing or behave somewhat differently from outside half press.
If you want to set ISO to a specific, standard value, you can use set_iso_mode (or propcase ISO_MODE) instead. This should act just like setting it in the Canon menu, but should only be used with standard values that appear in the Canon menu (0 for Auto, 100,200 etc, not 123)
Using set_sv96 implicitly sets the Canon firmware to auto-ISO. You can save and restore ISO_MODE if you don't want this to persist after the script ends.