USB Remote Switch in CHDK - version 2 implementation thread - page 8 - General Discussion and Assistance - CHDK Forum
supplierdeeply

USB Remote Switch in CHDK - version 2 implementation thread

  • 220 Replies
  • 63238 Views
Re: USB Remote Switch in CHDK - an open discussion about cleaning up the code
« Reply #70 on: 19 / January / 2012, 00:18:27 »
Advertisements
for the record,  usb remote code v2 was added to the main dev / unstable branch on Jan 15 2012

"cry havoc and let slip the dogs of war "

Still lots of "to do" things but I think what is there is already easier to understand, more stable and prettier than what came before.
Ported :   A1200    SD940   G10    Powershot N    G16

Re: USB Remote Switch in CHDK - an open discussion about cleaning up the code
« Reply #71 on: 19 / January / 2012, 23:31:03 »
Updated the code tonight to allow USB remote to control images displayed in Playback mode.  Props to vnd for his thoughts on this !

Click once to advance picture displayed,  twice to reverse directions,  three times to set "back in time" direction,  four times to set "forward in time" direction.  Works with "home built" switch and CA-1 full presses.

Question raised by reyalp =  should we add a way to return to shooting mode ?  Maybe five presses ?

Ported :   A1200    SD940   G10    Powershot N    G16

*

Online philmoz

  • *****
  • 3441
    • Photos
Re: USB Remote Switch in CHDK - an open discussion about cleaning up the code
« Reply #72 on: 19 / January / 2012, 23:42:04 »
Updated the code tonight to allow USB remote to control images displayed in Playback mode.  Props to vnd for his thoughts on this !

Click once to advance picture displayed,  twice to reverse directions,  three times to set "back in time" direction,  four times to set "forward in time" direction.  Works with "home built" switch and CA-1 full presses.

Question raised by reyalp =  should we add a way to return to shooting mode ?  Maybe five presses ?


Morse code triggered remote pressing of the camera buttons :)

Phil.
CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)
  g5x (1.00c, 1.01a, 1.01b)
  g7x2 (1.01a, 1.01b, 1.10b)

Re: USB Remote Switch in CHDK - an open discussion about cleaning up the code
« Reply #73 on: 19 / January / 2012, 23:47:00 »
Morse code triggered remote pressing of the camera buttons :)
Well - I've been thinking that the new pwm code that measures mark & space could do amazing things when hooked to a simple controller based on an inexpensive Arduino.

But at some point,  using ptp would make even more sense if you can get your hands on something more complicated than a simple switch and power source.
Ported :   A1200    SD940   G10    Powershot N    G16


Re: USB Remote Switch in CHDK - an open discussion about cleaning up the code
« Reply #74 on: 20 / January / 2012, 06:54:12 »
Updated the code tonight to allow USB remote to control images displayed in Playback mode. 

Interesting idea  ...... might be useful with two cameras.

Quote
- I've been thinking that the new pwm code that measures mark & space could do amazing things when hooked to a simple controller based on an inexpensive Arduino.

Not particulary amazing, just takes photos.

I use an ATTiny to allow communication of settings between two cameras.

Needs a lot of error-correction in the serial protocol.

Not included in the release version because SDM philosophy is to avoid bloat.
For the same reason, it does not include every possible feature from CHDK or CHDKDE.

A future version will be more minimal.
« Last Edit: 20 / January / 2012, 07:21:22 by Microfunguy »

Re: USB Remote Switch in CHDK - an open discussion about cleaning up the code
« Reply #75 on: 21 / January / 2012, 12:39:48 »
Updated dev trunk with two new patch files.   Details are here :

http://chdk.setepontos.com/index.php?topic=650.msg80270#msg80270
http://chdk.setepontos.com/index.php?topic=650.msg80306#msg80306

ToDo list :

1) Modify OSD USB icon to show half press / full press state
2) Handle cameras with seperate   KEY_VIDEO
3) Need to scale zoom mode logic for mega zooms with too many steps.
4)  Might need key press mode for zooming with cameras that crash on direct zoom position set (SD940)
5) Investigate control module state machine actions when USB power held on too long.
6) Investigate auto switch in & out of USB remote mode based on USB power duration.
Ported :   A1200    SD940   G10    Powershot N    G16

Re: USB Remote Switch in CHDK - an open discussion about cleaning up the code
« Reply #76 on: 27 / January / 2012, 21:42:04 »
Submitted seventh patch for USB remote code V2 to trunkPatch #7. Changes are documented there.

This version includes a build option for a high speed debug mode that logs USB state and driver variables to the SD card.  Code is courtesy of vnd

To decode the dump file,   vnd also provided this perl script :

Code: [Select]
#!/usr/bin/perl
# this script decodes the binary log from usb remote
# see #define USB_REMOTE_RECORD 1 in usb_remote.h
#
# usage: cat *.DAT |perl usb_remote_decode.pl >log.txt

my $buf;

while (read(stdin, $buf, 12)) {
   printf "tick: %8d  usb:%2d driver_state:%3d virtual_remote_state:%3d usb_count:%3d logic_module_state:%3d usb_sync_wait:%3d usb_remote_active:%2d\n", unpack("LCCCCCCC", $buf);
}
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline msl

  • *****
  • 1280
  • A720 IS, SX220 HS 1.01a
    • CHDK-DE links
Re: USB Remote Switch in CHDK - version 2 implementation thread
« Reply #77 on: 16 / February / 2012, 11:42:10 »
I finally found time to test the new remote functions with my selfmade remote control (a simple trigger).

Great work!

All I could test works as described. I still have a desire. Is it possible, to make a video recording option for cameras with extra video button. I mean a video capture instead of photo capture. With this option a first click starts the video und a second click stops the video.

msl
CHDK-DE:  CHDK-DE links


Re: USB Remote Switch in CHDK - version 2 implementation thread
« Reply #78 on: 16 / February / 2012, 11:51:28 »
All I could test works as described. I still have a desire. Is it possible, to make a video recording option for cameras with extra video button. I mean a video capture instead of photo capture. With this option a first click starts the video und a second click stops the video.
What happens now with those cameras when the Control Mode is set to Video ?  Does it take a photo instead of starting recording ? 
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline msl

  • *****
  • 1280
  • A720 IS, SX220 HS 1.01a
    • CHDK-DE links
Re: USB Remote Switch in CHDK - version 2 implementation thread
« Reply #79 on: 16 / February / 2012, 12:46:47 »
Does it take a photo instead of starting recording ?

Yes, that is also the normal function. For video recording you can only use the video button.

msl
CHDK-DE:  CHDK-DE links

 

Related Topics