LUA Scripting for 550D

288 views
Skip to first unread message

Alex

unread,
Jan 6, 2011, 4:05:08 PM1/6/11
to ml-d...@googlegroups.com
Hello,

Today I'm announcing the first experimental build of a very powerful ML feature:

The Ultimate Camera Bricking Tool from Magic Lantern, a.k.a. LUA
scripting. I'm going to call it MagicLUA.

This will expose the most important ML functionality to less
experienced programmers, without requiring a dedicated development
environment.
A simple text editor (like Notepad) is fine.

Wiki: http://magiclantern.wikia.com/wiki/MagicLUA
Code: https://bitbucket.org/a1ex/magic-lantern/changesets

This is in very early stages of development, and all the other ML
modules are disabled due to stability issues. With this version, you
can do:
- integer arithmetic
- run hello world
- display lens info
- take photos, start/stop movies
- run a simple intervalometer
- run a simple rack focus script
- crash your camera (actually, I couldn't with this build, but during
troubleshooting it crashed a lot)

See LUA.pdf in the zip file and read it carefully before trying this
build. Also, be careful since not all features documented in the PDF
are implemented or tested. Running the scripts included in the zip
should be safe.

The question is: what do you want for this scripting engine?
- Compatibility with CHDK?
- Change known shooting settings (iso, shutter, wb... etc)?
- Create custom timelapses, rack focus, bracketing sequences?
- Mess with properties, CFn's, dump memory... (i.e. experiment with
the camera to learn how it works)
- Create scripts which run continuously (like your own autofocus
algorithm... or auto iso...) ?
- ??? <put your feature request here>

Enjoy and don't brick your cameras!

On Thu, Jan 6, 2011 at 8:42 PM, Alex <broscu...@gmail.com> wrote:
> PROP_HANDLER is an event handler (it gets called when the value
> changes... or sometimes even if the value does not change).
>
> Attached is my build for spying properties. It watches all the ranges
> (2xxx, exxx), not only the usual 8xxx. That means it detects shutter
> counter prop, file/folder number prop and others missed by previous
> draw_prop.
>
> This is not in release build, because it seems to make ML unstable.
>
> So: this build is FOR DEBUGGING ONLY, and it's ONLY useful function is
> Debug->Draw_prop. Code based on 24dec build, diff is included in zip,
> but contains lots of useless stuff.
>
> On Thu, Jan 6, 2011 at 1:46 PM, Piers <pie...@gmail.com> wrote:
>> Does the Rode have a mono 3.5mm plug? Unfortunately to use the int/ext
>> option, it has to be the right external channel, which isn't on a mono plug.
>> I'll probably make/carry a small adaptor, 3.5mm mono to 3.5 mm right
>> channel.
>> I did some testing and: it looks like audio_configure() is called when you
>> go into record, so it always records the correct source, but in LV it wont
>> notice a change.*
>> Also - I fed it some dual mono tone in ext bal mode and got a low signal,
>> which went wayyy higher when I panned L or R, so I'm reasonably confident
>> that balanced audio really does work.
>> * does PROP_HANDLER install some kind of watcher/interrupt thingy? Or is all
>> this in the wiki, I must confess I haven't looked there for some time.
>> PG
>>
>> --
>> http://magiclantern.wikia.com/
>>
>> To post to this group, send email to ml-d...@googlegroups.com
>> To unsubscribe from this group, send email to
>> ml-devel+u...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/ml-devel?hl=en
>

magiclantern-2011Jan06.550d.fw109.lua.UNSTABLE.alex.zip

James Donnelly

unread,
Jan 6, 2011, 4:41:49 PM1/6/11
to ml-d...@googlegroups.com
On 6 January 2011 13:05, Alex <broscu...@gmail.com> wrote:
Hello,

Today I'm announcing the first experimental build of a very powerful ML feature:

The Ultimate Camera Bricking Tool from Magic Lantern, a.k.a. LUA
scripting. I'm going to call it MagicLUA
.



This is awesome, although I might wait a while before trying it out, as I can't afford to be without my camera.  Hopefully this will open the door for lesser mortals to continue to expand the ML feature set.  Great work again.  Do you sleep? 

Alex

unread,
Jan 6, 2011, 4:50:35 PM1/6/11
to ml-d...@googlegroups.com
It's not yet midnight :)

Stefano

unread,
Jan 13, 2011, 4:46:01 PM1/13/11
to Magic Lantern firmware development
I tried this build with LUA and found no problems (i.e. no Camera
Brick or Freez mode ;-))
Have LUA in my opinion is really a BIG feature because free up the
opportunity to everyone to customize camera beaviour!
I tried also to compile the last trunk from a1ex bitbucket but seem
that something is missing...
Why not do include LUA support in the main project? It's really
cool!!

Fernando Freire

unread,
Jan 13, 2011, 5:17:58 PM1/13/11
to ml-d...@googlegroups.com
Astonishing!!!  How are you able to work with so much parts of the project at the same time?

I agree Stefano, LUA scripting let programmers with C skills or not, make his "plugins" without affect the core.

Me is an example, if I need more complex bracketing routines, I prefer do it in LUA and not have to maintain "at home" a custom branch of core ML that implies patching, recompiling etc...  I can share then also to comunity, yes, but the core branch is the same.

It will be very important add it to the main branch.

¿Features? All you proposals are OK:

- Change known shooting settings (iso, shutter, wb... etc)?  OK
- Create custom timelapses, rack focus, stack focus, bracketing sequences?   OK

- Mess with properties, CFn's, dump memory... (i.e. experiment with
the camera to learn how it works)  OK


- Create scripts which run continuously (like your own autofocus
algorithm... or auto iso...) ? OK

- Make graphic menus.

Also, if the cam functions were sintax compatible to some extent with CHDK one, it will be easy to port a huge base of CHDK scripting to ML.

 

Alex

unread,
Jan 13, 2011, 5:49:35 PM1/13/11
to ml-d...@googlegroups.com
The other features are missing due to stability problems. As soon as
they are gone, it will be included in the main build.

For complex bracketing or focus stacking, LUA scripting much better.
So we can keep basic intervalometer settings in the menu (for most
users) and full control with scripts for advanced users.

Reply all
Reply to author
Forward
0 new messages