Hi, I was sad too, that nobody seems to work on the accessing of the live histogram data for use in basic scripts.
The port of CHDK for my camera has just started some weeks ago and I was lucky to get the code of the pre-alpha version. So I looked inside of some CHDK files and thought, that it could be done.
I'm not a programmer and it was hard for me and took many, many hours, but I really wanted to try this "ettr" .
After many hours of reading in the source codes, I managed to create a new basic command.
I called it "get_lhisto_range" (the l stand for "live"). I can use it like the old "get_histo_range" command
(which gets the % of values in a certain range of the histogram of the previous shot image).
The new command of course gets these % value from the live histogram.
I add the diff file I made from the actual trunk2135 and my changes and my first test script.
The new command and the script work good on my sx240.
Since not all commands for the sx240 are working now, I had to do a workaround for the ettr-script.
The basic Idea is: part the histogram in x parts, get the % value of each part (from 255 down to 0, for example: 225-255,200-225,175-200...), look if the % value is <= the given max_value (for ex. 4), if yes-count a variable +1 -otherwise do not count anymore, at the end you get a variable which you can multiply with 1/3ev and add this to the measured exposure (time),and make a safety -1/3ev for example. ...
(Always make sure to check in the script min and max exposure time (or whatever you change) your camera is capable when you change the exposure settings.)
I would be happy if anyone who is interested in ettr and/or accessing the live histogram from basic script would look at it and try it,
to see if it works on other cameras too (the files i changed are not camera specific i think).
As I said, I'm a beginner, but if someone can not compile this changes himself for his camera model, I would try to make it.I would be happy if anyone would read, try, and reply
.