EOS M3 porting - page 56 - DryOS Development - CHDK Forum supplierdeeply

EOS M3 porting

  • 613 Replies
  • 200686 Views
Re: EOS M3 porting
« Reply #550 on: 15 / July / 2019, 15:04:45 »
Advertisements
@c_joerg

As usual, thanks for your help

Now I’m up and running, I’ll be getting to some scripting in the next few days.

First ‘issue’ I see, although won’t be too bad for me as long as Lua doesn’t play up, is that the CHDK DoF values, other than the hyperfocal, all show Inf.

Cheers

Garry

Re: EOS M3 porting
« Reply #551 on: 16 / July / 2019, 14:10:01 »
@c_joerg

Hope you can help.
Just started my M3 scripting experiments and got in trouble straight away.
The 120 build I downloaded obviously hasn't been enabled for native calls.
Could you kindly point me in the right direction.
Cheers
Garry

Re: EOS M3 porting
« Reply #552 on: 16 / July / 2019, 14:32:07 »
Just started my M3 scripting experiments and got in trouble straight away.
The 120 build I downloaded obviously hasn't been enabled for native calls.
Could you kindly point me in the right direction.
It's always disabled...
It's normal under Menu Miscellaneus Stuff...
https://chdk.fandom.com/wiki/Lua/Lua_Reference/Native_Function_Calls

But it looks like, sometimes is Brocken. I miss that point as well on my M3.

It probably only works on my M3 because I made the setting when the menu was still available and the settings are saved.
« Last Edit: 16 / July / 2019, 14:44:04 by c_joerg »
M100 100a, M3 101a, 2*G1x (101a,100e), S110 (103a), SX50 (100c), SX230 (101a), 2*S45,
Flickr https://www.flickr.com/photos/136329431@N06/albums
YouTube https://www.youtube.com/channel/UCrTH0tHy9OYTVDzWIvXEMlw/videos?shelf_id=0&view=0&sort=dd

Re: EOS M3 porting
« Reply #553 on: 16 / July / 2019, 14:50:27 »
@c_joerg

Thanks.

Just disabled it and tried a simple script that just calls

call_event_proc("EFLensCom.FocusSearchFar")

Set focus to very near to see what would happen.

Lens moved/focused, but not as I expected, ie to infinity.

I guess the call is calling AF and trying to find the next focus fix?

As I say, I guess  ;)


Re: EOS M3 porting
« Reply #554 on: 16 / July / 2019, 15:03:18 »
Just disabled it and tried a simple script that just calls
Why it works when native calls disabled???


call_event_proc("EFLensCom.FocusSearchFar")
Set focus to very near to see what would happen.
Lens moved/focused, but not as I expected, ie to infinity.
I guess the call is calling AF and trying to find the next focus fix?

Have you tried MF?
My script has an Option to do only this. I just checked it and it works.
M100 100a, M3 101a, 2*G1x (101a,100e), S110 (103a), SX50 (100c), SX230 (101a), 2*S45,
Flickr https://www.flickr.com/photos/136329431@N06/albums
YouTube https://www.youtube.com/channel/UCrTH0tHy9OYTVDzWIvXEMlw/videos?shelf_id=0&view=0&sort=dd

*

Offline srsa_4c

  • ******
  • 3979
Re: EOS M3 porting
« Reply #555 on: 16 / July / 2019, 15:06:35 »
It's normal under Menu Miscellaneus Stuff...
https://chdk.fandom.com/wiki/Lua/Lua_Reference/Native_Function_Calls

But it looks like, sometimes is Brocken. I miss that point as well on my M3.

It probably only works on my M3 because I made the setting when the menu was still available and the settings are saved.
CHDK-DE builds are built with OPT_FORCE_LUA_CALL_NATIVE, which means native operations are always enabled and therefore don't show up in menu.

Just disabled it and tried a simple script that just calls

call_event_proc("EFLensCom.FocusSearchFar")
You need to make sure that eventproc is already registered. c_joerg's script contains the necessary registration functions too. If it's unregistered, that one-liner script won't do anything.

edit:
Looks like the EFLensCom event procedures are registered by default, so they are always available.
« Last Edit: 16 / July / 2019, 15:47:34 by srsa_4c »

Re: EOS M3 porting
« Reply #556 on: 16 / July / 2019, 15:27:22 »
CHDK-DE builds are built with OPT_FORCE_LUA_CALL_NATIVE, which means native operations are always enabled and therefore don't show up in menu.
I never notice this before...
But only on M3. My SX50 and G1x have the native call menu in CHDK-DE.
M100 100a, M3 101a, 2*G1x (101a,100e), S110 (103a), SX50 (100c), SX230 (101a), 2*S45,
Flickr https://www.flickr.com/photos/136329431@N06/albums
YouTube https://www.youtube.com/channel/UCrTH0tHy9OYTVDzWIvXEMlw/videos?shelf_id=0&view=0&sort=dd

Re: EOS M3 porting
« Reply #557 on: 16 / July / 2019, 15:36:57 »
@c_joerg

Didn't make myself clear.

Went to menu and enabled native calls.
Used this simple test script:
Code: [Select]
--[[@title M3 Focus Test@chdk_version 1.4
--]]
--  calls to use--  call_event_proc("EFLensCom.FocusSearchFar")--  call_event_proc("EFLensCom.FocusSearchNear")--  call_event_proc("EFLensCom.MoveFocus",steps,speed)
call_event_proc("EFLensCom.FocusSearchNear")
Tried it with near and far and both worked, ie in above focus far and script drives lens to macro end.
If set to macro, and far used, script drives lens to infinity or 'beyond', ie no hard stop I guess.


*

Offline srsa_4c

  • ******
  • 3979
Re: EOS M3 porting
« Reply #558 on: 16 / July / 2019, 15:41:12 »
I never notice this before...
But only on M3. My SX50 and G1x have the native call menu in CHDK-DE.
You may want to check again (watch the splash screen).
There's this in core/gui.c
Code: [Select]
#if !defined(OPT_FORCE_LUA_CALL_NATIVE)
    MENU_ITEM   (0x5c,LANG_MENU_ENABLE_LUA_NATIVE_CALLS,    MENUITEM_BOOL|MENUITEM_ARG_CALLBACK, &conf.script_allow_lua_native_calls, (int)gui_lua_native_call_warning ),
#endif
Meaning that menu item is only visible when OPT_FORCE_LUA_CALL_NATIVE is not defined.

Re: EOS M3 porting
« Reply #559 on: 16 / July / 2019, 15:47:39 »
@c_joerg

Sorry being thick  ;)
Don't understand what you said.
All I know is that if I enable native calls, the script runs and if I don't, it doesn't.
Also, the simple script above drives the focus to change, ie near to far or far to near  :)

 

Related Topics