S95: Script command click "left"/"right" not working (CHDK 1.5) - General Help and Assistance on using CHDK stable releases - CHDK Forum
supplierdeeply

S95: Script command click "left"/"right" not working (CHDK 1.5)

  • 8 Replies
  • 4481 Views
*

Offline CanonUser9000

  • *
  • 30
  • A570 - S95 - S100 - SX220 - SX700 - EOSM
S95: Script command click "left"/"right" not working (CHDK 1.5)
« on: 19 / December / 2020, 08:07:26 »
Advertisements
Hi,
while moving some well working scripts from other PS models to the S95 I found out that the script commands
Code: [Select]
click "left"
click "right"
do nothing.

However
Code: [Select]
is_key "left"
is_key "right"
work well.
All other keys of the S95 can be managed within a Basic script like expected.

Anyone an idea about this?

Thanks and regards

btw: bulid CHDK_DE_s95-100h-1.5.1-5646
« Last Edit: 19 / December / 2020, 08:12:35 by CanonUser9000 »

*

Offline reyalp

  • ******
  • 14121
Re: S95: Script command click "left"/"right" not working (CHDK 1.5)
« Reply #1 on: 19 / December / 2020, 13:47:54 »
Hi,
while moving some well working scripts from other PS models to the S95 I found out that the script commands
Code: [Select]
click "left"
click "right"
do nothing.

However
Code: [Select]
is_key "left"
is_key "right"
work well.
All other keys of the S95 can be managed within a Basic script like expected.

Anyone an idea about this?
That is odd. Can you give an example of a specific script that fails, or describe what you are trying to adjust with these keys?
Don't forget what the H stands for.

*

Offline philmoz

  • *****
  • 3450
    • Photos
Re: S95: Script command click "left"/"right" not working (CHDK 1.5)
« Reply #2 on: 19 / December / 2020, 15:52:22 »
Hi,
while moving some well working scripts from other PS models to the S95 I found out that the script commands
Code: [Select]
click "left"
click "right"
do nothing.

One possibility is that some cameras require a longer delay between the press and release of the key inside the 'click' command.
Try
Code: [Select]
  press "left"
  sleep 30
  release "left"

If that works let us know and we can update the delay setting for the S95.

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)

*

Offline CanonUser9000

  • *
  • 30
  • A570 - S95 - S100 - SX220 - SX700 - EOSM
Re: S95: Script command click "left"/"right" not working (CHDK 1.5)
« Reply #3 on: 20 / December / 2020, 05:12:47 »
Hi philmoz,
hi realp,
thanks for the quick response.

The code excerpt below is part of a script used to make handling easier if the cam is used in a waterproof protection bag. The use case is to toggle between two mainly used flash and focus setting with just on click (as it works on all the other PowerShots I use).

The hint from Phil works!

Replacing click by press-sleep-release (even with a sleep of 20) does the job on the S95. So an update of the delay for the click command on the S95 is advised.

Thanks a lot an Happy Festive Days!


Code: [Select]
while ....

rem ... (some other stuff in here that works) ...

rem Toggle Macro<->Normal focus

if is_key "left" then
  if get_focus_mode>3 then
    click "left"
    sleep 200
  endif
  click "left"
  sleep 200
  click "left"
endif

rem Toggle Flash On<->Off

if is_key "right" then
  click "right"
  sleep 200
  click "right"
  sleep 200
  click "right"
endif

wend


*

Offline Mlapse

  • *****
  • 584
  • S95 S110
Re: S95: Script command click "left"/"right" not working (CHDK 1.5)
« Reply #4 on: 20 / December / 2020, 11:06:33 »
So an update of the delay for the click command on the S95 is advised.
rem Toggle Flash On<->Off


Only for that specific click command i hope, since click on the S95 does not need a longer delay on 'shoot_full', 'display' or other basic click functions.
« Last Edit: 20 / December / 2020, 11:14:56 by Mlapse »
frustration is a key ingredient in progress

*

Offline reyalp

  • ******
  • 14121
Re: S95: Script command click "left"/"right" not working (CHDK 1.5)
« Reply #5 on: 20 / December / 2020, 14:06:54 »
Only for that specific click command i hope, since click on the S95 does not need a longer delay on 'shoot_full', 'display' or other basic click functions.
The delay is global for the port. However, it refers to how long the key is held down, so it isn't going to affect how quickly the camera responds to something like shoot_full. Scripts that click through settings or menus will take a few tens of milliseconds longer. to do it.
Don't forget what the H stands for.

*

Offline philmoz

  • *****
  • 3450
    • Photos
Re: S95: Script command click "left"/"right" not working (CHDK 1.5)
« Reply #6 on: 20 / December / 2020, 16:29:28 »
Here is a test version for S95 1.00h with the key press delay changes to 60ms in line with other cameras from the same era.


This is a CHDK_DE build (with German as the default language) as that is what you said you were using in the first post.


Please let me know if this works ok and I will add the changes to SVN.

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)

*

Offline CanonUser9000

  • *
  • 30
  • A570 - S95 - S100 - SX220 - SX700 - EOSM
Re: S95: Script command click "left"/"right" not working (CHDK 1.5)
« Reply #7 on: 21 / December / 2020, 04:25:48 »
Hi Phil,

thanks a lot for this test bulid.

Now click "left" and click "right" work both like all the other key clicks!

Best regards


*

Offline Caefix

  • *****
  • 947
  • Sorry, busy deleting test shots...
Re: S95: Script command click "left"/"right" not working (CHDK 1.5)
« Reply #8 on: 22 / December / 2020, 12:27:59 »
Sx200 has similar issue with zoom keys, but same solution, needs no testzip.  :-*
https://chdk.setepontos.com/index.php?topic=14048.msg144776#msg144776
« Last Edit: 22 / December / 2020, 12:58:03 by Caefix »
All lifetime is a loan from eternity.

 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal