is_key "remote" and is_key "up" not working in same script - Script Writing - CHDK Forum

is_key "remote" and is_key "up" not working in same script

  • 2 Replies
  • 3642 Views
is_key "remote" and is_key "up" not working in same script
« on: 28 / March / 2011, 21:10:09 »
Advertisements
I have an IXUS 960 camera and CHDK 0.9.9-1077 version. I have tried to make a script using remote control and also
keys to control camera. I have found that if I have any remote control command for ex. is_key "remote" or get_usb_power
in the script, then key commands for ex. is_key "up" (or down, left, right, set, etc.) are not working any more. The script
does not react to any key presses except shoot and ALT keys. Also the reverse is also true. After an is_key "up" command
the camera is not respondig to remote control via USB in any way.

Is this behavior common to all canon cameras or is it only my cameras problem. My CHDK is pretty new, so the version
hardly is responsible to my problem. I wonder, if there is any solution I have not recognised?
« Last Edit: 28 / March / 2011, 21:14:44 by hoptari »

*

Offline reyalp

  • ******
  • 14082
Re: is_key "remote" and is_key "up" not working in same script
« Reply #1 on: 28 / March / 2011, 23:13:23 »
The following ubaisc works correctly for me on d10
Code: [Select]
@title iskey test
do
    wait_click 1000
    if is_key "up"    then print "up"
    if is_key "remote"  then print "rem"
    if is_key "display"  then print "disp"
until is_key "set"

Note that if you do not have "usb remote" enabled, is_key remote will still report remote status, but the camera may think there is an actual USB connection and disable the function of most keys in the normal canon firmware.
Don't forget what the H stands for.

Re: is_key "remote" and is_key "up" not working in same script
« Reply #2 on: 29 / March / 2011, 08:47:07 »
Thak you reyalp for your test script, it worked for me also and made me solve the problem.
I made some more tests and found, that if I shorten the wait time, the script stops working.
If the wait time is less than 400 ms, script reacts to key presses unreliably and below 100 ms
it stops completely. I had in my script wait_click 1, and that was the bug.

Now I can fulfill my astronomy script, thank you once again!
« Last Edit: 29 / March / 2011, 08:51:41 by hoptari »

 

Related Topics