Help needed: Where in the code is script started by shutter button? - General Discussion and Assistance - CHDK Forum  

Help needed: Where in the code is script started by shutter button?

  • 3 Replies
  • 2210 Views
Advertisements
 Hello,

I have a camera with a broken shutter button which I use with CHDK and scripts.
Until now I have used the Autostart feature for scripts to enable them to start.

Now I would like to try to modify the code and make my own build with the Set button as start/stop for scripts.
Could anyone tell me where in the code I should start to look?
I have not been looking into the CHDK code before but I have a lot of coding experience.

If someone have a better idea how to solve this problem, please let me know. ;-)

Thanks in advance!
/Erik

Re: Help needed: Where in the code is script started by shutter button?
« Reply #1 on: 28 / February / 2010, 19:23:51 »
In \core\kbd.c, look at  'kbd_process()'  lines 672 to 675.

http://tools.assembla.com/chdk/browser/trunk/core/kbd.c

That function is called from the camera's platform code kbd.c.


David
« Last Edit: 28 / February / 2010, 19:45:02 by Microfunguy »

Re: Help needed: Where in the code is script started by shutter button?
« Reply #2 on: 01 / March / 2010, 03:25:36 »
Thank you!

I found it this morning and have tested it succesfully.

There is a small issue with the script parameters meny showing for < 0,5 s when a script is stopped and then
all infomation is erased from the screen.
A easy work around is to press the menu button and the screen is restored.
There is also a problem when entering the menues and I try to select something with Set.
It seems to be some problem with the normal handling of the Set key.
I have not found where the Set key is handeled so if someone could give a hint I'd thankfull.
Or maybe I should use a different key for start/stop.


Btw, the CHDK-Shell rocks!!!

/E
« Last Edit: 01 / March / 2010, 03:33:46 by chdk4ever »

Re: Help needed: Where in the code is script started by shutter button?
« Reply #3 on: 01 / March / 2010, 06:02:36 »
Hi again,

I used the Display key instead and know it works as I hoped.

Thanks again.

I don't think this will be my last modification of CHDK.
Hoppefully I can contribute in some way to the community as a thanks to all those heroes
which made CHDK possible.

/E


 

Related Topics