Change timeout time for usb_sync_wait - page 3 - General Help and Assistance on using CHDK stable releases - CHDK Forum

Change timeout time for usb_sync_wait

  • 20 Replies
  • 7858 Views
*

Offline reyalp

  • ******
  • 14126
Re: Change timeout time for usb_sync_wait
« Reply #20 on: 05 / April / 2019, 03:04:23 »
Advertisements
Yes I did it with '!'.
OK, that, explains it. "local" makes the status values local to that command.
You can put it all on one line, or take out the local, or put it in a lua file.

Not using local is somewhat risky because you could clobber other global variables in chdkptp.
Quote
Quote
FWIW, the suggestion I added in edit ( remote_on_wait ) might be a better solution for you, I didn't remember that feature until after I wrote the first part.

This would be with trigger over the USB Cable, right?
Yes. With that method you would
call mc:cmdwait('call usb_force_active(1)') once before you do any shooting

when you want to shoot:
Make the usb +5v low
call mc:shoot with {remote_on_wait=N,remote_sync=true}
where N is the maximum time you'd want to wait before shooting. It's not subject to the timeout mentioned in the original post. If it expires, the cameras will shoot anyway.

When you are ready to shoot, make the +5v high, and then low again (pulse at least 40ms or so, not more than a few hundred). When it goes high, the script will transfer to the usb_sync_wait loop, and when it goes low, the shot will be triggered.
Don't forget what the H stands for.

 

Related Topics


SimplePortal © 2008-2014, SimplePortal