supplierdeeply

The \core\kbd.c\kbd_process() function

  • 14 Replies
  • 2735 Views
The \core\kbd.c\kbd_process() function
« on: 05 / July / 2011, 18:29:55 »
Advertisements
The SDM version of the above function is more complex than the CHDK version because of its support for Chinese wireless doorbells (!), fast shooting on switch press and various stereo features.

Nevertheless, the CHDK version could be far simpler.

To developers who may not be aware of the earliest days of CHDK and SDM development, you need to understand why certain features were in the SDM version that CHDK copied.

Zooming with the remote is simply to synchronise zoom on multiple cameras, of little value with a single camera.

Movie stop/start with the remote is again  for controlling multiple cameras (though attaining precision synch is an unsolved goal).

Other parts of the code are to ensure precision synch of multiple cameras when the switch is RELEASED.
Of no value whatsoever for single cameras and slows the shooting response.

Personally, I would simplify the CHDK code considerably.



David

Re: The \core\kbd.c\kbd_process() function
« Reply #1 on: 05 / July / 2011, 20:15:43 »
In trying to understand the CHDK version of this function,  it would be really nice to know what devices it is supposed to support.  Obviously a simple USB power on/off is one choice.   And there is mention in the wiki about a Ricoh CA-, which I think is a commercial version of the USB power on/off circuit. Is there anything else ?

The USB on/off option seems to be limited to one quick press for half-shoot and a second press for full-shoot.   It seems it would be more useful for a half-shoot to occur on press and a shoot to occur on release.  Has anyone figured out how to do that ?

I think our big challenge is to risk backwards compatability in the interest of making something understandable.  Personnally,  I could live with that.
« Last Edit: 05 / July / 2011, 20:17:14 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline reyalp

  • ******
  • 11514
Re: The \core\kbd.c\kbd_process() function
« Reply #2 on: 06 / July / 2011, 00:29:00 »
Thanks for that David.

This is one of those things that I've just avoided touching since it pre-dated my involvement and I wasn't clear how it was supposed to work.

It would be useful to hear from people who are currently using remotes with CHDK.
Don't forget what the H stands for.

Re: The \core\kbd.c\kbd_process() function
« Reply #3 on: 06 / July / 2011, 05:40:47 »
Yes, I forgot to mention that the Ricoh CA-1 (or Chinese clones available on Ebay) is supported.

You have to detect various pulse widths :-

http://stereo.jpn.org/eng/sdm/ca1.htm


Re: The \core\kbd.c\kbd_process() function
« Reply #4 on: 06 / July / 2011, 10:18:50 »
The CA-1 would probably explain the interesting use of a state machine in the code.

I guess there is also some support for the gentWIRE-USB type devices as well ?
Ported :   A1200    SD940   G10    Powershot N    G16

Re: The \core\kbd.c\kbd_process() function
« Reply #5 on: 06 / July / 2011, 11:00:07 »
The CA-1 would probably explain the interesting use of a state machine in the code.
Yes.
The original code was written by a Japanese friend.
I hate to tell you this, but I struggle to understand his code myself.

Quote
I guess there is also some support for the gentWIRE-USB type devices as well ?

In the sense of shooting as soon as USB goes high.

*

Offline fudgey

  • *****
  • 1705
  • a570is
Re: The \core\kbd.c\kbd_process() function
« Reply #6 on: 07 / July / 2011, 17:58:58 »
It would be useful to hear from people who are currently using remotes with CHDK.

I'm not saying I really use it, but I find it precious that CHDK is able to achieve a good repeatability of delay from USB trigger to shutter opening. For stereo setups this means good sync between cameras, but for single camera (e.g. scientific) purposes this allows precisely timed shooting of some rapid phenomena that can be triggered with a delay from the camera trigger. I'd hate to see that go away.

*

Offline reyalp

  • ******
  • 11514
Re: The \core\kbd.c\kbd_process() function
« Reply #7 on: 07 / July / 2011, 21:53:33 »
I'm not saying I really use it, but I find it precious that CHDK is able to achieve a good repeatability of delay from USB trigger to shutter opening. For stereo setups this means good sync between cameras, but for single camera (e.g. scientific) purposes this allows precisely timed shooting of some rapid phenomena that can be triggered with a delay from the camera trigger. I'd hate to see that go away.
I agree that should stay. That's mostly done by wait_until_remote_button_is_released, not the mess in core/kbd.c, right  ?

wait_until_remote_button_is_released is also a mess, and (needlessly ?) copied into a bunch of different cameras kbd.c, but I don't think anyone is proposing to remove the functionality.

One useful step would be factor out any platform specific stuff wait_until_remote_button_is_released and put it somewhere generic.
Don't forget what the H stands for.


Re: The \core\kbd.c\kbd_process() function
« Reply #8 on: 08 / July / 2011, 05:32:07 »
That's mostly done by wait_until_remote_button_is_released, not the mess in core/kbd.c, right  ?

Yes.


Quote
(needlessly ?) copied into a bunch of different cameras kbd.c

Yes, two versions will suffice.

Re: The \core\kbd.c\kbd_process() function
« Reply #9 on: 08 / July / 2011, 11:51:11 »
Quote
I guess there is also some support for the gentWIRE-USB type devices as well ?
In the sense of shooting as soon as USB goes high.
I'm not sure the current code actually has a mode that fires as soon as the USB signal goes high ?

Wrestled it for a while in this thread -
http://chdk.setepontos.com/index.php?topic=5855.465

It seems that anything "we" do should consider the "gent" devices - the have some very nice toys - especially for kite photography.
« Last Edit: 08 / July / 2011, 12:38:20 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

 

Related Topics