Is there a way to edit the timeout of the "usb_sync_wait" function to prevent a automatically timout shoot after 10 seconds?I wish to start usb_sync_wait and take a photo after the signal. Also if the signal is >10 sec. after call the sync_wait function.
If I understand your question correctly , the "usb_sync_wait" you refer to is the time that CHDK will wait, after the USB remote +5V signal goes active, for the release of that signal? If the signal does not release in that interval, CHDK treats that as a timeout and proceeds with taking the shot. As you have observed, that timeout is currently fixed at 10 seconds in the CHDK code. The only way to make it longer is to edit the CHDK source code and produce a custom version for your camera.
Please note that if you extend the delay too much, you could cause camera watchdog resets as CHDK is essentially hogging most (all?) of the camera processor time in a tight loop as it waits for the USB signal to release.
Which ist the file, I have to edit to set the timeout time by myself?
#define DELAY_TIMEOUT 10000
Do you have an idea for another solution, without usb_sync_wait? E.g. to interrupt usb_sync_wait() function after 8 sec. and call it again and again, if no signal released in this time?
do { } while( get_remote_state() && ((int)get_tick_count()-tick < DELAY_TIMEOUT));
do { msleep(10) ; } while( get_remote_state() && ((int)get_tick_count()-tick < DELAY_TIMEOUT*100)) ;
What would be the "normal" way to do this? Without recompile an edit the CHDK?I hope there is a easy way to react on an external signal without the information of its release-time, shoot a foto and get back in ptpcam mode with pc-connection
Are you trying to synchronize the shot across multiple cameras or is this a single camera project?
It is with the multicam.lua
So you have an external signal (like a motion sensor) that goes active (+5V -> USB plug) and tells the cameras to get ready to shoot? When something else happens some time later ( > 10seconds), the signal to goes inactive ( 0V -> USB plug ) and all cameras shoot at the same time. You then use chdkptp to upload all of the resulting images.Do I have that correct? Do you have a sense of how closely the camera's need to be sync'd?
Yes, right. The external signal should trigger all cameras and directly after the shoot I download all images to pc and delete them on the camera. I can use a signal that is constant 0V and goes up to 5V or the other way around. I will use the way which is better for work with CHDK.The cameras don´t have to be synced in exactly the same time. The photo object isn´t in move. So the goal is to shoot a image as fast as possible after the external signal goes activ but not in a millisecond-range. It is enaught to take the picture within 1/2 seconds. For download and delete I have more time afterwards.
Started by POMAH General Help and Assistance on using CHDK stable releases
Started by reyalp « 1 2 » LUA Scripting
Started by Salvatore Chiarelli General Discussion and Assistance
Started by lapser « 1 2 3 4 5 » General Discussion and Assistance
Started by c_joerg « 1 2 » LUA Scripting