Porting a camera sx530hs - page 30 - DryOS Development - CHDK Forum

Porting a camera sx530hs

  • 297 Replies
  • 87504 Views
*

Offline srsa_4c

  • ******
  • 4142
Re: Porting a camera sx530hs
« Reply #290 on: 27 / February / 2020, 12:35:15 »
Advertisements
I can't control the wheel in scripts using LUA commands wheel_left() and wheel_right(). Also, the wheel buttons in the latest chdkptp app have no effect.
You could help (us) finding the correct constants.
Use the following command in chdkptp - you need to unlock the keys first by either entering rec mode or executing =post_levent_to_ui(4484):
Code: [Select]
=post_levent_to_ui(0x872,1)In place of 0x872 (aka 'RotateJogDialRight'), try constants you find in the attached levent list. You want something that can be rotated. The Canon manual calls the wheel 'front dial', that's maybe a hint.


Quote
Update: I just found out that I can't control the "ae_lock" button in lua either.
Try 'erase' (the button's second function).

*

Offline Davo

  • ***
  • 172
Re: Porting a camera sx530hs
« Reply #291 on: 27 / February / 2020, 14:06:47 »
Good call on "erase" - that seems to set AE lock  :)
No luck yet on the wheel commands. I tried all the obvious ones in your list but nothing happened. Could it be in the commands that don't have a name? I would be happy to work thru them one by one if that is not too dangerous.

*

Offline blackhole

  • *****
  • 737
  • A590IS 101b
    • Planetary astrophotography
Re: Porting a camera sx530hs
« Reply #292 on: 27 / February / 2020, 15:16:30 »
This camera will need a workaround similar to the sx60.
There is no classic jogdial there, the camera has two wheels with only horizontal movements.

*

Offline Davo

  • ***
  • 172
Re: Porting a camera sx530hs
« Reply #293 on: 28 / February / 2020, 05:06:22 »
This camera will need a workaround similar to the sx60.
There is no classic jogdial there, the camera has two wheels with only horizontal movements.
Can you point me towards the sx60 workaround?


*

Offline blackhole

  • *****
  • 737
  • A590IS 101b
    • Planetary astrophotography
Re: Porting a camera sx530hs
« Reply #294 on: 28 / February / 2020, 07:20:23 »
kbd.c lib.c boot.c stubs_entry_2.S stubs_min.S

As far as I remember everything related to jogdial was just copied from another camera, on sx530.
Don't forget the sx60 is a digic 6 camera.

*

Offline srsa_4c

  • ******
  • 4142
Re: Porting a camera sx530hs
« Reply #295 on: 28 / February / 2020, 11:13:29 »
kbd.c lib.c boot.c stubs_entry_2.S stubs_min.S

As far as I remember everything related to jogdial was just copied from another camera, on sx530.
Those parts of code are there to enable CHDK menu navigation via the wheel (does this not work?). I think Davo wants the opposite (sending wheel events to the Canon firmware).

@Davo

Try again the rotation events, but this time use this sequence:
Code: [Select]
=post_levent_to_ui(0x1134,1) post_levent_to_ui(EVENT,1) post_levent_to_ui(0x1135,1)Replace EVENT with the hex code of the event. This works for me on m10, 0x1134 and 0x1135 seem valid for this camera too.

*

Offline blackhole

  • *****
  • 737
  • A590IS 101b
    • Planetary astrophotography
Re: Porting a camera sx530hs
« Reply #296 on: 28 / February / 2020, 12:04:20 »
Those parts of code are there to enable CHDK menu navigation via the wheel (does this not work?).
As far as I can remember the chdk navigation does not work over the wheel,but maybe i'm wrong.
The original Canon's wheel behavior is the same as the <LEFT and RIGHT> buttons, but only when setting the exposure parameters (Tv, Av, EV, ISO or flash power). The wheel cannot be used in menus instead of LEFT or RIGHT buttons.

*

Offline Davo

  • ***
  • 172
Re: Porting a camera sx530hs
« Reply #297 on: 29 / February / 2020, 07:54:50 »
@srsa_4c
Great call again! Here are the lua codes to turn the wheel right or left:
Code: [Select]
=post_levent_to_ui(0x1134,1) post_levent_to_ui(0x08ad,1) post_levent_to_ui(0x1135,1)
=post_levent_to_ui(0x1134,1) post_levent_to_ui(0x08ae,1) post_levent_to_ui(0x1135,1)
Here are the calls from your previous list:
   Line 152: 0xff69881c 0x08ad 0x00000002 RotateEDialRight
   Line 153: 0xff698828 0x08ae 0x00000002 RotateEDialLeft
Many thanks for this. I needed the code for my AstroKam software to control my SX530 on a remote controlled telescope mount. It is in the garden and is wired up to a PC in my garage. I then use Google Remote Desktop to control everything from the study in my house. Your code means I can now adjust Av and video AEL without running back and forwards to the camera.
The SX530 is a great little mobile camera-scope combo. Here is a shot of Orion I took earlier with AstroKam.
http://starrydave.com/?p=1010


 

Related Topics