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

dial and button issues on some cams

  • 39 Replies
  • 12885 Views
*

Offline Caefix

  • *****
  • 947
  • Sorry, busy deleting test shots...
Re: dial and button issues on some cams
« Reply #10 on: 09 / June / 2020, 12:29:43 »
Advertisements
Sx210: wheel_ :lol already fine.
Modified Your  :-* Dialtest.lua:
         if k ~= 'no_key' then
            click(k); sleep(99)
            print('key',k)
         end
Only shoot_half | playback perform as expected, all others are eaten (equivalent:Ix300)

// For Sx240 I would expect a copy&paste solution from new Sx260 code working.
All lifetime is a loan from eternity.

*

Offline reyalp

  • ******
  • 14121
Re: dial and button issues on some cams
« Reply #11 on: 09 / June / 2020, 13:27:25 »
Sx210: wheel_ :lol already fine.
Do you mean the test build I posted fixes it?

I think there's no way the current trunk code can be correct, but I really have trouble understanding your posts.

Quote
         if k ~= 'no_key' then
            click(k); sleep(99)
            print('key',k)
         end
Only shoot_half | playback perform as expected, all others are eaten (equivalent:Ix300)
I don't understand what this is supposed to accomplish.

Quote
// For Sx240 I would expect a copy&paste solution from new Sx260 code working.
Good point, I've made that change and checked it in.
Don't forget what the H stands for.

*

Offline Caefix

  • *****
  • 947
  • Sorry, busy deleting test shots...
Re: dial and button issues on some cams
« Reply #12 on: 09 / June / 2020, 13:41:59 »
Sx210: wheel_ :lol already fine.
Do you mean the test build I posted fixes it?
1.) Yes.
2.) if k=='menu' then click ('menu'); print('menu') end  :blink:     ... does only the print()

« Last Edit: 09 / June / 2020, 13:44:56 by Caefix »
All lifetime is a loan from eternity.

*

Offline Caefix

  • *****
  • 947
  • Sorry, busy deleting test shots...
Re: dial and button issues on some cams
« Reply #13 on: 11 / June / 2020, 12:01:38 »
 :D Found "copy&paste solution from new Sx240/260 code" with all the values working on S110 & Sx50.
&& Sx230 seems done with _PostLogicalEventForNotPowerType() >> _PostLogicalEventToUI().

// Probably Sx1,10,30 & G9-15 need a closer look. (not my cams  :( )
// Sx30+G12 has same lines as Sx230. Who knows...?
Ix970, Sx20 & S95: flat wheel, too.
Ixus170,... No wheel, poor cams.
« Last Edit: 15 / June / 2020, 13:45:21 by Caefix »
All lifetime is a loan from eternity.


*

Offline Caefix

  • *****
  • 947
  • Sorry, busy deleting test shots...
Re: dial and button issues on some cams
« Reply #14 on: 15 / June / 2020, 10:37:33 »
 :D Other fine wheels:
Code: [Select]
Ix970:
void JogDial_CW(void)
{
_PostLogicalEventToUI(0x866, 2);  // RotateJogDialRight
}

void JogDial_CCW(void)
{
_PostLogicalEventToUI(0x867, 2);  // RotateJogDialLeft
}
--- :...,....1....,....2....,....3....,....4....,....5....,....6....,....7....,....
Ix200:
void JogDial_CW(void){
 _PostLogicalEventToUI(0x876, 2);  // RotateJogDialRight
}

void JogDial_CCW(void){
 _PostLogicalEventToUI(0x877, 2);  // RotateJogDialLeft
}
--- :...,....1....,....2....,....3....,....4....,....5....,....6....,....7....,....
S90:
void JogDial_CW(void){
 _PostLogicalEventForNotPowerType(0x876, 1);  // RotateJogDialRight
}

void JogDial_CCW(void){
 _PostLogicalEventForNotPowerType(0x877 1);  // RotateJogDialLeft
}

--- :...,....1....,....2....,....3....,....4....,....5....,....6....,....7....,....
S95, Sx230, SX30?:
void JogDial_CW(void){
_PostLogicalEventToUI(0x86E, 1);  // RotateJogDialRight
}

void JogDial_CCW(void){
_PostLogicalEventToUI(0x86F, 1);  // RotateJogDialLeft
}
--- :...,....1....,....2....,....3....,....4....,....5....,....6....,....7....,....
Sx20:
void JogDial_CW(void){
_PostLogicalEventToUI(0x876, 1);  // RotateJogDialRight
}

void JogDial_CCW(void){
_PostLogicalEventToUI(0x877, 1);  // RotateJogDialLeft
}
All lifetime is a loan from eternity.

*

Offline reyalp

  • ******
  • 14121
Re: dial and button issues on some cams
« Reply #15 on: 16 / June / 2020, 00:52:13 »
Checked in changes for ixus200_sd980, s90, s95, sx20, sx230 in trunk 5527

It would be much better if you can post a patch for things like this in the future, so I can be sure I'm getting exactly the changes you tested.
Don't forget what the H stands for.

*

Offline Caefix

  • *****
  • 947
  • Sorry, busy deleting test shots...
Re: dial and button issues on some cams
« Reply #16 on: 16 / June / 2020, 14:41:39 »
 :xmas Who wants to test other cams can do it without USB, too.
If default test wheel<> doesn´t work,
a) one of the 2*2 other options do the expected or
b) You could compare displayed CW/CCW event IDs with those in platform\lib.c and reclamate any difference or
c) I forgot something...
Code: [Select]
--- :...,....1....,....2....,....3....,....4....,....5....,....6....,....7....,....
S110, Sx50
// note this camera was reported to require *ToUI rather than ForNotPowerType
// https://chdk.setepontos.com/index.php?topic=7889.msg143589#msg143589
void JogDial_CW(void) {
    _PostLogicalEventToUI(0x872, 1);    //asm1989 RotateJogDialRight (in table @ FF58799C)
}

void JogDial_CCW(void) {
    _PostLogicalEventToUI(0x873, 1);    //asm1989  RotateJogDialLeft (in table @FF5879A8  like SX40 -> FF593E5C,)
}
« Last Edit: 17 / June / 2020, 15:00:09 by Caefix »
All lifetime is a loan from eternity.

*

Offline reyalp

  • ******
  • 14121
Re: dial and button issues on some cams
« Reply #17 on: 17 / June / 2020, 20:13:29 »
2.) if k=='menu' then click ('menu'); print('menu') end  :blink:     ... does only the print()
It sounds like you are saying the click function doesn't work at all, for all keys except playback and half shoot, on ixus300 and sx230 sx210?

Are you sure? Or is there only some specific situation it doesn't work?

You can try increasing CAM_KEY_PRESS_DELAY in platform_camera.h, like
Code: [Select]
    #undef  CAM_KEY_PRESS_DELAY
    #define CAM_KEY_PRESS_DELAY                 60      // delay after a press

Two other things, just in case:
If you have USB connected, most keys are ignored in playback mode, unless you do =post_levent_to_ui(4484), or switch to rec and back to playback

If you leave alt mode while the script is running, behavior is not well defined.
« Last Edit: 19 / June / 2020, 16:33:41 by reyalp »
Don't forget what the H stands for.


*

Offline Caefix

  • *****
  • 947
  • Sorry, busy deleting test shots...
Re: dial and button issues on some cams
« Reply #18 on: 18 / June / 2020, 13:24:05 »
 :-[ Probably that...    ( // Sx230 & Ix200 Sx210 & Ix300 need look, other backpack...)
2.) if k=='menu' then click ('menu'); print('menu') end  :blink:     ... does only the print()
If you leave alt mode while the script is running, behavior is not well defined.
Code: [Select]
-- from !Edi.Lua :)
function exitalt(x) -- keeps cursor on place
x=x or 1
sleep(99); wait_click(22)
if x~=0 then exit_alt() end; wait_click(22)
repeat sleep(333) until get_alt_mode()
if get_mode() then set_record(false) end
-- update values
EXP_COUNT=string.format("_%04d.",get_exp_count() or 0)
INSERT_MAP[1][3]=EXP_COUNT
sleep(1000)
play_sound(4)
end
--- :...,....1....,....2....,....3....,....4....,....5....,....6....,....7....,....
    if todo=="exit_alt()" then exitalt(1) end
    if not get_alt_mode() then exitalt(1) end

Now I have set a lot of cams to *ToUI,1. All fine so far.

A zoom_key <> issue is: Sx50 takes only if_pressed, but ignores if_key.(Was old Build)

// Is this interesting?
// In that playmode S110 has ugly flicker, Sx230 & Ix200... don´t have.
Edit :/// That has somewhat to do with the displayed filedate.
« Last Edit: 19 / June / 2020, 13:47:29 by Caefix »
All lifetime is a loan from eternity.

*

Offline Caefix

  • *****
  • 947
  • Sorry, busy deleting test shots...
Re: dial and button issues on some cams
« Reply #19 on: 19 / June / 2020, 12:11:09 »
2.) if k=='menu' then click ('menu'); print('menu') end  :blink:     ... does only the print()
It sounds like you are saying the click function doesn't work at all, for all keys except playback and half shoot, on ixus300 and sx230 Sx210?

Are you sure?
:( Yes, & delay doesn´t help.

// 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: [Select]
    #define CAM_ADJUSTABLE_ALT_BUTTON           1
    #define CAM_ALT_BUTTON_NAMES                {  "Video",   "Playback",   "Shortcut" }//, "Wifi" }
    #define CAM_ALT_BUTTON_OPTIONS              {  KEY_VIDEO, KEY_PLAYBACK, KEY_PRINT }//,  KEY_WIFI}
// Reading source I found missing "Wifi" @ Sx420, too.
« Last Edit: 20 / June / 2020, 15:21:56 by Caefix »
All lifetime is a loan from eternity.

 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal