Magic Lantern Forum

Developing Magic Lantern => Feature Requests => Topic started by: dlrpgmsvc on February 09, 2013, 07:46:55 PM

Title: Function to read the current light intensity (exposure meter) in the script lang
Post by: dlrpgmsvc on February 09, 2013, 07:46:55 PM
Do it is possible to have a function in the script language that can read the absolute and/or the relative light intensity that is coming through the camera lens, like the little vertical cursor on the exposure scale of the camera already does, so we can program an intervalometer exposure ramping without guessing the values by pre-setting them, but by directly read the light and then set the iso/aperture/time values in consequence ?
Title: Re: Function to read the current light intensity (exposure meter) in the script lang
Post by: scrax on February 09, 2013, 10:48:42 PM
I got something with:
printf("Ev%f", (get_tv() + get_av()) - get_sv());

but need to be in P mode and you should half press shutter before script starts to have a good value, can't find how to simulate halfpress without closing script.
Title: Re: Function to read the current light intensity (exposure meter) in the script lang
Post by: wolf on February 10, 2013, 02:34:37 AM
click(SHOOT_HALF);
Title: Re: Function to read the current light intensity (exposure meter) in the script lang
Post by: scrax on February 10, 2013, 02:47:32 AM
Quote from: wolf on February 10, 2013, 02:34:37 AM
click(SHOOT_HALF);
was the first I tried and didn't worked, added a sleep and now it works (sometimes, other times scripts hangs).

/*
@title Meter Test
*/

click(SHOOT_HALF);
sleep(1);
printf("Ev%f", (get_tv() + get_av()) - get_sv());
Title: Re: Function to read the current light intensity (exposure meter) in the script lang
Post by: wolf on February 10, 2013, 03:48:13 AM
I solved  a timing issue with:

press(SHOOT_HALF);
sleep(0.2);
unpress(SHOOT_HALF);

Also hiding console felt faster.
Title: Re: Function to read the current light intensity (exposure meter) in the script lang
Post by: dlrpgmsvc on February 10, 2013, 02:02:51 PM
Great boys ! You are the best !  8)
Title: Re: Function to read the current light intensity (exposure meter) in the script lang
Post by: blindcat on August 14, 2013, 06:37:07 PM
Can I use this method and override values in P mode?
In M mode the EV reading didn't do something useful.
I use a nightly build of 1 may 13 on a 5D2.
Thanks
Title: Re: Function to read the current light intensity (exposure meter) in the script lang
Post by: Audionut on August 15, 2013, 10:10:07 PM
Try this http://www.magiclantern.fm/forum/index.php?topic=7208.0
Title: Re: Function to read the current light intensity (exposure meter) in the script lang
Post by: blindcat on August 20, 2013, 09:19:16 AM
Nice function. Thanks for the answer and pointing to it. I better create a new thread in the scripting area.