Magic Lantern Forum

Developing Magic Lantern => Scripting Corner => Scripting Q&A => Topic started by: garry23 on January 07, 2017, 05:13:41 PM

Title: Latest Lua fix and step size
Post by: garry23 on January 07, 2017, 05:13:41 PM
Didn't know where to post this.

I'm using the latest nightly experimental: https://builds.magiclantern.fm/jenkins/job/manual_lens_info/5/artifact/platform/EOSM.202/magiclantern-manual_lens_info.2017Jan06.EOSM202.zip

I'm using this test script:

test_menu = menu.new
{
    name = "Show keypress",
    choices = { "Off", "On" },
    value = "On",
}

function event.keypress(key)
    if key == KEY.INFO then
        repeat
lens.focus(-1,3,false)
until lens.focus_distance >= lens.hyperfocal
    return false
    else
        return true
    end
end


All it does is move the lens to the hyperfocal after pushing the [INFO] button.

The thing is: change the step size, 1 vs 3, doesn't seem to change the lens drive on my EOSM.

Not sure why?

Any ideas?

Cheers

Garry
Title: Re: Latest Lua fix and step size
Post by: Licaon_Kter on January 07, 2017, 05:43:16 PM
Do these comments help: https://bitbucket.org/hudson/magic-lantern/pull-requests/748/focus-backend-updates-precise-focus/diff ?
Title: Re: Latest Lua fix and step size
Post by: garry23 on January 07, 2017, 06:02:03 PM
@Licaon_Kter

Not sure: but I don't think so.

But I need someone to confirm, ie who does the changes to lens.focus (if any).

Cheers

Garry
Title: Re: Latest Lua fix and step size
Post by: dfort on January 07, 2017, 06:13:10 PM
Quote from: Licaon_Kter on January 07, 2017, 05:43:16 PM
Do these comments help: https://bitbucket.org/hudson/magic-lantern/pull-requests/748/focus-backend-updates-precise-focus/diff ?

I jumped into the deep end when trying to help a1ex and went way over my head. Looks like there are still issues with the EOSM and 6D to resolve before we can get more precise focusing control. Right now it looks like focus control isn't working at all with EF-M lenses.
Title: Re: Latest Lua fix and step size
Post by: garry23 on January 07, 2017, 06:22:51 PM
Daniel

I can drive an EF lens OK, bt can't change the step size via lens.focus.

Also, sometime it wont start moving, but will work OK if I give it a little 'nudge'.

Cheers

Garry
Title: Re: Latest Lua fix and step size
Post by: Audionut on January 08, 2017, 03:41:29 AM
I would like to see all LUA related stuff (somewhere) in the scripting section.  http://www.magiclantern.fm/forum/index.php?board=53.0

That's what that section is there for.  ;D