I need to be able to make external controller select between photo/video, press shutter, and maybe other things, like zoom in/out.
The built-in USB remote code supports both pulse counting and pulse width measurement so you can choose to do either. Documentaiton is here : http://chdk.wikia.com/wiki/USB_Remote_V2#Scripting_Interface
function cmds.usb_sync_wait() press('shoot_half') sleep(2000) usb_sync_wait(1) press('shoot_full') sleep(9000) --usb transistion from +5v -> 0V in this period release('shoot_full')end
I'd like a function, among others,
to manage releasing the synch hook, for a multi-camera setup, in script, simplified e.g.Code: [Select]function cmds.usb_sync_wait() press('shoot_half') sleep(2000) usb_sync_wait(1) press('shoot_full') sleep(9000) --usb transistion from +5v -> 0V in this period release('shoot_full')end When this function has finished (as part of a long running script similar to multicam.lua but without choosing which function to run as a result of a received ptp message) i'd then like to choose another function (e.g. to set Canon AV/TV/ISO) utilising "get_usb_power(3)" (pulses from a ucontroller pulse generator) but note the wiki page states "USB remote must be enabled for this function to work"Is there a scheme whereby, following the +5v -> 0V transistion in my example "function cmds.usb_sync_wait()" the next usb transistion (0V->+5V) can be ignored in respect of activating a "Shoot Half" so the script can merely continue with it's monitoring of pulses (similarly to the way multicam.lua "function mc.run(opts)" monitors for ptp messages and chooses which function to execute)?
Further to above, noting msl's advice here https://chdk.setepontos.com/index.php?topic=12772.msg126824#msg126824,is there any difference (in the proposed scenario) between using Code: [Select]usb_sync_wait(1)to set the usb_sync_wait_flag rather thanCode: [Select]set_config_value(core.synch_enable, 1)in my simplified example functon above?
Correct so far?
Am I still correct?
If so, the simple answer is to set the Enable Remote [ * ] option in the CHDK Remote Parameters menu but to leave Switch Type [ None ] and Control Mode [ None ]
Incidentally, if you use the Script Shooting Hooks you can eliminate the sleep(9000) statement and have your function return right after the actual shot takes place.
Yes - there is a big difference.
Image download may not prove the big issue that concurrent usbremote/ptp has already solved
In a similar fashion must I set the:Enable Remote [ * ] option but to leave Switch Type [ None ] and Control Mode [ None ] in the CHDK Remote Parameters menu rather than, in script, as:core=require("gen/cnf_core")set_config_value(core.remote_enable, 1)set_config_value(core.remote_switch_type, 0)set_config_value(core.remote_control_mode, 0)
Both methods work well.
hint : usb_force_active(1)
Started by cybercom
« 1 2 3 4 5 »
Started by BrianX
Started by Siel
General Help and Assistance on using CHDK stable releases
Started by RBurk10
General Discussion and Assistance
Started by RBurk10
« 1 2 »
Hello, I'm a NEWBIE - HELP!! (Newbies assistance, User Guides and thank you notes)