AV mode for Ixus with shutter speed compensation. - Feature Requests - CHDK Forum

AV mode for Ixus with shutter speed compensation.

  • 2 Replies
  • 3452 Views
*

Offline Atnas

  • *
  • 29
AV mode for Ixus with shutter speed compensation.
« on: 05 / September / 2009, 14:41:21 »
Advertisements
When using CHDK I usually love it all the time. One thing that puzzles me though is, that when setting an ND filter override, it overrides the filter and everything, but it doesn't compensate the shutter speed in the other direction to make the image darker.

What I'd like would be to be able to set the ND filter override, and have the camera select the correct shutter speed for this new setting. I have written a small script that does this, but I would still like to see it in the actual CHDK.
This should work for all DIGIC III cams with ND filter, although I don't know the strength of other ND filters than of that in the IXUS series.
Code: [Select]
@title ND override
@param a ND filter (off, in, out)
@default a 1
if a=0 then goto "shoot"
if get_nd_present=0 then print "No ND filter present!"
if get_nd_present=0 then print "Taking normal picture"
if get_nd_present=0 then goto "shoot"
set_nd_filter a
release "shoot_half"
press "shoot_half"
do
 P=get_shooting
until P=1
b=get_av96
if b>500 then c=1 else c=-1
if a=2 then a=-1
if a<>c then set_prop 262 get_tv96-(278*a)
:shoot
shoot
set_nd_filter 0
:end
end
« Last Edit: 05 / September / 2009, 14:52:44 by Atnas »
A710 - SD1000(IXUS70)

*

Offline Atnas

  • *
  • 29
Re: AV mode for Ixus with shutter speed compensation.
« Reply #1 on: 06 / September / 2009, 15:54:03 »
Okay...
I just read around, and realised I wanted tetris, then I had to compile my own chdk. While I was at it I figured I could to write this feature in the sources, and this is what I wrote. AFAIK, it works, but I would still like to know what you think about it, like why this might be a bad idea or something. Note I have not tested this on anything else than IXUS70, so results may wary. It should however work(not mess normal functionality up) for all cams.

The changed code in trunk796\platform\generic\shooting.c
Code: [Select]
void shooting_set_nd_filter_state(short v, short is_now)
{
#if CAM_HAS_ND_FILTER
if ((mode_get()&MODE_MASK) != MODE_PLAY){
if (is_now) {
if (v==1) _PutInNdFilter();
else if (v==2) _PutOutNdFilter();
if (shutter_koef[conf.tv_override_koef]==0) {
  if ((shooting_get_av96()>500)&(v==2)) shooting_set_tv96_direct(shooting_get_tv96()+278, is_now);
  if ((shooting_get_av96()<500)&(v==1)) shooting_set_tv96_direct(shooting_get_tv96()-278, is_now);
}
}
else photo_param_put_off.nd_filter=v;
}
#endif
}

I guess this is kinda in the wrong subforum now that it is not a request anymore, but I would like to know what you guys think.
A710 - SD1000(IXUS70)

Re: AV mode for Ixus with shutter speed compensation.
« Reply #2 on: 30 / March / 2011, 02:11:21 »
Thanks!  Works like a charm on my SD850.  I agree this should be put in the actual CHDK.  It's closer to a bug fix than a feature request. ;)

Here is what I did patch the function above and re-compile:

1)  Download http://chdk.wikia.com/wiki/CHDK-Shell (be sure to download and unzip the latest FULL package before you download and unzip the latest non-full package)

2)  Unzip to c:\chdk\

3)  Run the program c:\chdk\CHDK-Shell-vNNN.exe (where NNN is the latest version)

4)  Select the option to allow internet (which will download the latest trunk)

5)  Use wordpad to edit c:\chdk\trunk\trunkXXXX\platform\generic\shooting.c (where XXXX is the latest trunk number) and replace the function "shooting_set_nd_filter_state" per the second post above

6)  Select your camera in the list and re-compile (output goes to c:\chdk\trunk\trunkXXXX\bin\file_name_for_your_camera.zip)

7)  Unzip that file to your camera's memory card and voila, your camera's ND filter should now work correctly when enabled via CHDK!
« Last Edit: 30 / March / 2011, 02:13:13 by lakebagger »

 

Related Topics


SimplePortal © 2008-2014, SimplePortal