dial and button issues on some cams - page 3 - General Discussion and Assistance - CHDK Forum
supplierdeeply

dial and button issues on some cams

  • 39 Replies
  • 9996 Views
*

Offline reyalp

  • ******
  • 14079
Re: dial and button issues on some cams
« Reply #20 on: 20 / June / 2020, 21:30:28 »
Advertisements
Turns out ixus300 and sx210 both have a "touch" feature on the control dial. If you touch, it's supposed to show the icon of the action that clicking on that part of the dial would trigger.

See https://chdk.setepontos.com/index.php?topic=12245.msg121374#msg121374
In the following post, srsa_4c previously noted scripted clicks didn't work on cameras with the similar "touch control dial" feature.

From searching the PDF manuals (for "If you touch the control dial in"), cameras like sx210 are
ixus110, ixus300, ixus1000, sx210, sx220, sx230
These cameras apparently expose the "touch" as a bit in physw_status. Some kbd.c have KEY_*_SOFT keys defined for them (ixus1000 and sx230, commented in ixus100, sx210, sx220). It seems likely that setting both bits for scripted presses or clicks may be required. I'll try to come up with a test build, but it may be complicated to support in the current CHDK keyboard code.

edit:
OTOH, this probably should affect menu  :blink:

Some older cameras, like the ixus65 srsa_4c mentioned have what canon called a "touch control dial" (also sometimes called feather in the firmware and CHDK) which is similar but also kind of works like a touch based jogdial. The following have this feature based on the manual
ixus65_sd630, ixus75_sd750, ixus950_sd850, ixus860_sd870, ixus900_sd900, ixus960_sd950


Quote
// Edit: G16 would also run with ...
Edit2: Ajeh,  :-X ... for the price of "AF frame select" in rec modes, so it´s probably not useful.
Code:
Sorry, I have no idea what this is about.
« Last Edit: 20 / June / 2020, 21:40:30 by reyalp »
Don't forget what the H stands for.

*

Offline reyalp

  • ******
  • 14079
Re: dial and button issues on some cams
« Reply #21 on: 21 / June / 2020, 00:58:52 »
Here's a test build that sets the "touch" bits for left and right on sx210. Please check if scripted click('left') and click('right') work, and also if left and right are still detected correctly in CHDK.

Note if you are using the dialtest script, you should remove the wheel_left() and wheel_right() commands to avoid confusion.
Don't forget what the H stands for.

*

Offline Caefix

  • *****
  • 945
  • Sorry, busy deleting test shots...
Re: dial and button issues on some cams
« Reply #22 on: 21 / June / 2020, 12:14:56 »
 Sx210 :( Behaves same...
Edit: You talked about the wheel, @ Ix300 & Sx210 CLICK 'menu', ('disp') & 'zoom-*' are ignored, too.
Just found k<0 in modified Dialtest.Lua working on both cams.
Code: [Select]
if k ~= 'no_key' then
if K==1 then click(k); sleep(99) end
if K<0  then press(k); sleep(99); release(k); sleep(99)  end
print('key',k)
break
end

// G16 ???
Appending Wifi to <alt>-button list was possible, but the "AF frame select" switch would be gone.
Long  <ON> ... nothing happens; (?)
 Short <on> & <play> fine.
« Last Edit: 21 / June / 2020, 15:06:09 by Caefix »
All lifetime is a loan from eternity.

*

Offline reyalp

  • ******
  • 14079
Re: dial and button issues on some cams
« Reply #23 on: 21 / June / 2020, 17:37:19 »
Sx210 :( Behaves same...
Edit: You talked about the wheel, @ Ix300 & Sx210 CLICK 'menu', ('disp') & 'zoom-*' are ignored, too.
Yeah, that makes it unlikely it's related to the touch feature.
Quote
Just found k<0 in modified Dialtest.Lua working on both cams.
Code: [Select]
if k ~= 'no_key' then
if K==1 then click(k); sleep(99) end
if K<0  then press(k); sleep(99); release(k); sleep(99)  end
print('key',k)
break
end
Did you try CAM_KEY_PRESS_DELAY higher than 60? A few cameras use 120.

Quote
// G16 ???
Appending Wifi to <alt>-button list was possible, but the "AF frame select" switch would be gone.
They are the same key. It could be added, but the 3 existing options are probably enough.

Quote
Long  <ON> ... nothing happens; (?)
 Short <on> & <play> fine.
You mean the camera doesn't start at all if you hold power?
Don't forget what the H stands for.


*

Offline Caefix

  • *****
  • 945
  • Sorry, busy deleting test shots...
Re: dial and button issues on some cams
« Reply #24 on: 22 / June / 2020, 11:11:06 »
I´ve tested up to 80, but 100 is fine on both cams. :haha
So it can´t be compensated by scripted sleep().
Code: [Select]
    #undef  CAM_KEY_PRESS_DELAY
    #define CAM_KEY_PRESS_DELAY              100      // delay after a press

if k ~= 'no_key' then
if K>0 then click(k); sleep(K*10) end
if K<0  then press(k); sleep(-K*10); release(k); sleep(-K*10)  end
print('key',k,K)
break
end

You mean the camera doesn't start at all if you hold power?
G16  :o YES.
Long  <ON> ... nothing happens (Edit: & Not any LED reaction.)
  <alt> seems "script mode" only.
& some people want to 'disable' the Wifi- button...
« Last Edit: 22 / June / 2020, 12:18:32 by Caefix »
All lifetime is a loan from eternity.

Re: dial and button issues on some cams
« Reply #25 on: 22 / June / 2020, 15:44:16 »
You mean the camera doesn't start at all if you hold power?
G16  :o YES.
Long  <ON> ... nothing happens (Edit: & Not any LED reaction.)
Confirmed.  I'll take a look.

Quote
  <alt> seems "script mode" only.
I don't understand this comment.  Pressing the <ALT> key puts the camera into CHDK <ALT> mode. 

Perhaps Caefix has the Script Autostart option set to ALT ? Or something selected in the User Menu ?

Quote
& some people want to 'disable' the Wifi- button...
As I'll be rebuilding and testing anyway,  I'll add this.


Edit :  hmmm .. "// no GPIO checks needed with 0x12345678 set, native fw handles long press" in boot.c
« Last Edit: 22 / June / 2020, 16:03:45 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline Caefix

  • *****
  • 945
  • Sorry, busy deleting test shots...
Re: dial and button issues on some cams
« Reply #26 on: 22 / June / 2020, 16:04:26 »
 :) ...
With "script mode" I mean 'shutter' starts script.

Edit: That´s what most of (my) other cams do, sorry for confusion (again), too.
After starting cam with long <ON> Chdk´s osd & batt icon is displayed & 'shutter' shoots.
« Last Edit: 23 / June / 2020, 10:50:10 by Caefix »
All lifetime is a loan from eternity.

Re: dial and button issues on some cams
« Reply #27 on: 22 / June / 2020, 16:12:29 »
:) ...
With "script mode" I mean 'shutter' starts script.
That is what normally happens if you press the shutter button when you are in <ALT> mode.

Quote
After starting cam with long <ON> Chdk´s osd & batt icon is displayed & 'shutter' shoots.
You previously stated that "Long  <ON> ... nothing happens (Edit: & Not any LED reaction.)"   Now you say that the OSD & BATT icon are displayed and the camera shoots normally?

My G16 does nothing if I us a long <ON>.

Ported :   A1200    SD940   G10    Powershot N    G16


*

Offline reyalp

  • ******
  • 14079
Re: dial and button issues on some cams
« Reply #28 on: 22 / June / 2020, 19:20:00 »
Edit :  hmmm .. "// no GPIO checks needed with 0x12345678 set, native fw handles long press" in boot.c
FWIW, that only seems to work on a few cameras (definitely g7x, maybe sx60)

Others need the startup mode sub overridden, like sx710 101a sub_fc0cf0ee_my in boot.c
Don't forget what the H stands for.

Re: dial and button issues on some cams
« Reply #29 on: 22 / June / 2020, 19:44:59 »


FWIW, that only seems to work on a few cameras (definitely g7x, maybe sx60)
Thanks .. Basically got that far with 10 minutes of grepping. 

It's been 18+ months since I did the G16 port. Capdis no longer works so getting that fixed will take me longer than patching boot.c.

SSDD.

Ported :   A1200    SD940   G10    Powershot N    G16

 

Related Topics