Magic Lantern Forum

Using Magic Lantern => General Help Q&A => Topic started by: garry23 on July 17, 2016, 07:21:16 PM

Title: EOSM: is there hope?
Post by: garry23 on July 17, 2016, 07:21:16 PM
I have a 5D3, an IR-converted 50D and an EOSM  :)

The one thing that I'm lacking is focus/lens control via Lua on the EOSM.

I'm asking this question out of pure ignorance and a desire to better understand the inner workings of the ML-enabled cameras.

The question: is there any hope that the EOSM Lua will be able to drive a lens? For example, the native lenses and EOS lenses via an adapter?

As I say, I ask in ignorance.
Title: Re: EOSM: is there hope?
Post by: a1ex on July 17, 2016, 07:43:40 PM
The answer is here: http://www.magiclantern.fm/forum/index.php?topic=4997

The strings are present in the EOS M firmware, so there is hope. It only needs a motivated EOS M owner who can sit down to try, debug and polish the proof-of-concept code from there.
Title: Re: EOSM: is there hope?
Post by: garry23 on July 17, 2016, 08:56:13 PM
A1ex

I have an EOSM, but I'm not a coder.

However, I'm prepared to be guided by others, i.e. Using my hardware and time.

Cheers

Garry
Title: Re: EOSM: is there hope?
Post by: a1ex on July 22, 2016, 10:46:21 PM
Something worth trying IMO:


/* stub for EOS M 2.0.2; "dwSize < TXBD_DATA_SIZE" */
void (*mpu_send)(char*,int) = (void*) (0xFFA872BC - 0xFFA69590);
char msg[] = { 0x08, 0x09, 0x01, 0x10, 0x00, 0x07, 0x00, 0x00 };
mpu_send(msg, msg[0]);


Ref: http://www.magiclantern.fm/forum/index.php?topic=17596.msg170023#msg170023
Title: Re: EOSM: is there hope?
Post by: garry23 on July 23, 2016, 07:57:42 AM
Looking at the above, I'm afraid I will have to take myself out of helping, as playing around with such code is beyond me.  >:(

Sorry.
Title: Re: EOSM: is there hope?
Post by: a1ex on July 23, 2016, 02:01:30 PM
Hm, I remember you were able to compile ML from source code. Just copy that code and call it from somewhere (for example, from "don't click me").

In any case, I bet you are not the only EOS M user interested in this feature.
Title: Re: EOSM: is there hope?
Post by: garry23 on July 23, 2016, 02:08:33 PM
A1ex

You are right: a few years ago I did 'play around' with Compile in the Cloud: but only while I was trying to get the DoF diffraction running: that you optimized  ;)

My coding is now totally 'limited' to Lua scripting.

IMHO getting the focus control working in EOSM should be a reasonably high priority in the ML coders group: I know I'm waiting for some kind guru to make it work  :D

Sorry to be no help this time: but once it is up and running, I'll try and add value through scripting, eg my fully auto script for focus & exposure bracketing works really well for me on my 5D3: https://gist.github.com/pigeonhill/e008f051681885bc6ff84de637cb1d8e

Cheers

Garry
Title: Re: EOSM: is there hope?
Post by: a1ex on August 24, 2016, 09:46:54 AM
BTW, does the focus distance indicator works on EOS M?

I just came across a piece of code that doesn't make any sense (lens.c, PROP_LV_LENS appears to assume focal_len/focus_dist are invalid on EOS M, but records them in lens_info, while PROP_LV_FOCAL_DISTANCE is used to trigger the focus assist tools from the focus ring, but no values are checked).
Title: Re: EOSM: is there hope?
Post by: dfort on August 24, 2016, 02:36:43 PM
Quote from: a1ex on August 24, 2016, 09:46:54 AM
BTW, does the focus distance indicator works on EOS M?

YES!

@garry23 - I have been following along on some of your LUA scripting adventures on the forum. Nice work though I think you don't give yourself enough credit on your coding skills. I could help by compiling special EOSM builds though I'm sure you can handle compiling the ML source code. I wrote some tutorials a while back that should get you compiling in a jiffy:

Windows: http://magiclantern.fm/forum/index.php?topic=15894.msg154435#msg154435

Mac: http://magiclantern.fm/forum/index.php?topic=16012.msg155422#msg155422

If you're on Linux or running a Linux virtual machine then you don't need my help--it is super easy to compile the code in Linux.

PM me if you have any issues. Of course you can post in those discussions but I've been busy on other projects and don't check the forum as often as I used to.
Title: Re: EOSM: is there hope?
Post by: garry23 on August 25, 2016, 12:34:14 AM
@dfort

Many thanks for your post.

I must say, my 'full spectrum' stacking script https://gist.github.com/pigeonhill/e008f051681885bc6ff84de637cb1d8e (https://gist.github.com/pigeonhill/e008f051681885bc6ff84de637cb1d8e) is now my go to tool on my 5D3. Also runs on my IR converted 50D, although very much slower in driving the same lens, i.e. Must simply be the 'chip set' I guess.

And on my EOSM I make full use of my toggler script https://gist.github.com/pigeonhill/156ea0e55cd0a029bc447f8bf5593224 (https://gist.github.com/pigeonhill/156ea0e55cd0a029bc447f8bf5593224)

These two Lua scripts are all I need at the moment, although I am waiting to see lens control brought to the EOSM  ;D
Title: Re: EOSM: is there hope?
Post by: dfort on August 25, 2016, 05:21:54 AM
Quote from: garry23 on August 25, 2016, 12:34:14 AM
I am waiting to see lens control brought to the EOSM  ;D

Working on it.

https://bitbucket.org/hudson/magic-lantern/pull-requests/748/focus-backend-updates-precise-focus/diff