NEW: Toggler for the EOSM

Started by garry23, January 04, 2017, 03:26:17 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

garry23

We all know the EOSM is a great (ML) camera: apart, that is, from having a rather basic UI and lack of buttons; compared to other EOS cameras.

Although I do not use my EOSM from videography (most probably like most ML users with an EOSM) I do like using the EOSM for timelape, with or without FRSP, in DNG or MLV mode.

The downside for me is the accessing the ML menu is rather fiddly, especially if you have 'fat fingers'.

This is why I have updated my 'Toggler' script specifically for the EOSM: although the script will work on other cameras.

The script has no menus, ie it is always on, once ML Lua autoload is set in the ML menu.

The first thing you will need to do is set up your preferred ML states. The script below shows you mine (in the preset table). Note you can set any number of ML menus and sub-menus for each condition.

You should make sure you control the ML menus as you 'toggle' through the states, ie switching menus on and off. One approach I have found is to set up a base configuration and use this in each state condition, ie switching on or off, or to specific menu conditions. BTW you will need to know the number that each ML menu uses. O is a safe off and 1 a safe on. Most menus with more than one state start at 0 and move up, ie 1, 2 etc. The best bet if you don't know is to set it to 0 in the script and see what happens. The script still works if you are in the ML menu, so you can see things change :-)

I personally use the [MENU] and [PLAY] buttons, but you can change these, but note things are rather limited on the EOSM, eg you could use KEY.INFO.

You can change the on-screen notification display time: the default is 2 sec.

To use the script simply note the following sequences:

[MENU] = normal use of [MENU]
[PLAY][PLAY] = normal use of [PLAY]
[PLAY][MENU] = enter toggler interactive mode
In interactive mode [PLAY] will toggler through your ML condition states giving you an on-screen message
In interactive mode [MENU] will set that condition (and give an on-screen message) and leave interactive mode.
In interactive mode pressing any other key (not [MENU] or [PLAY]) will leave interactive mode

As I say above, you can use the toggle mode at any time, including when you are in the ML menu.

As usual I welcome feedback to help me become a better Lua scripter.

--[[
Simple (no menu) script to reset EOSM to your ML favorite states 'just' using the MENU and PLAY buttons on the EOSM
Change/set the preset table below to your liking
Version 0.1
Garry George Jan  2017
http://photography.grayheron.net/
--]]

last_key_pressed = 999
imode = false
config = 0
button_1 = KEY.MENU
button_2 = KEY.PLAY
message_time = 2000 -- in ms

presets =
{
    {
        name = "All off",
        menus=
        {
{ menu = "Shoot", item = "Advanced Bracket", value = 0},
{ menu = "Shoot", item = "Silent Picture", value = 0},
{ menu = "Expo", item = "Auto ETTR", value = 0},
{ menu = "Expo", item = "Dual ISO", value = 0},
{ menu = "Shoot", item = "Intervalometer", value = 0},
        }
    },
    {
        name = "Auto ETTR", -- Only Auto ETTR
        menus=
        {
{ menu = "Shoot", item = "Advanced Bracket", value = 0},
{ menu = "Shoot", item = "Silent Picture", value = 0},
{ menu = "Expo", item = "Auto ETTR", value = 1},
{ menu = "Expo", item = "Dual ISO", value = 0},
{ menu = "Shoot", item = "Intervalometer", value = 0},
}
    },
    {
        name = "Dual ISO", -- Only DUAL ISO
        menus=
        {
{ menu = "Shoot", item = "Advanced Bracket", value = 0},
{ menu = "Shoot", item = "Silent Picture", value = 0},
{ menu = "Expo", item = "Auto ETTR", value = 0},
{ menu = "Expo", item = "Dual ISO", value = 1},
{ menu = "Shoot", item = "Intervalometer", value = 0},
        }
    },
    {
        name = "Dual + ETTR", -- Both DUAL + ETTR
        menus=
        {
{ menu = "Shoot", item = "Advanced Bracket", value = 0},
{ menu = "Shoot", item = "Silent Picture", value = 0},
{ menu = "Expo", item = "Auto ETTR", value = 1},
{ menu = "Expo", item = "Dual ISO", value = 1},
{ menu = "Shoot", item = "Intervalometer", value = 0},
        }
    },
    {
        name = "MLV FRSP Timelapse", -- Silient timelapse in MLV FR mode
        menus=
        {
{ menu = "Shoot", item = "Advanced Bracket", value = 0},
{ menu = "Shoot", item = "Silent Picture", value = 1},
{ menu = "Silent Picture", item = "Silent Mode", value = 5},
{ menu = "Silent Picture", item = "File Format", value = 1},
{ menu = "Expo", item = "Auto ETTR", value = 0},
{ menu = "Expo", item = "Dual ISO", value = 0},
{ menu = "Shoot", item = "Intervalometer", value = 1},
        }
    },
    {
        name = "ML Auto Bracketing", -- Auto Bracketing
        menus=
        {
{ menu = "Shoot", item = "Advanced Bracket", value = 1},
{ menu = "Shoot", item = "Silent Picture", value = 0},
{ menu = "Expo", item = "Auto ETTR", value = 0},
{ menu = "Expo", item = "Dual ISO", value = 0},
{ menu = "Shoot", item = "Intervalometer", value = 0},
        }
    },
    {
        name = "FRSP", -- Full Res Silent Picture
        menus=
        {
{ menu = "Shoot", item = "Advanced Bracket", value = 0},
{ menu = "Shoot", item = "Silent Picture", value = 1},
{ menu = "Expo", item = "Auto ETTR", value = 0},
{ menu = "Expo", item = "Dual ISO", value = 0},
{ menu = "Shoot", item = "Intervalometer", value = 0},
        }
    }
}

reset = function(key)
for i,v in ipairs(presets[key].menus) do
menu.set(v.menu,v.item,v.value)
end
end

function test4reset(key)
-- check for imode frst
if imode then
if key == button_2 then -- move through presets
config = config + 1
if config > #presets then config = 1 end
display.notify_box(presets[config].name, message_time)
return false
end
if key == button_1 then -- leave imode and reset ML menus as requested
imode = false
if config == 0 then config = 1 end
reset(config)
local text = "Set to: "..presets[config].name
display.notify_box(text, message_time)
return false
end
end
imode = false
if key == button_2 and last_key_pressed == button_2 then -- use play key as normal
last_key_pressed = 999 -- reset
return true
elseif (key == button_1 and last_key_pressed == button_2) and imode == false then -- go into imode
imode = true
            last_key_pressed = 999
if config == 0 then config = 1 end
display.notify_box(presets[config].name, message_time)
return false -- steal key press
elseif key == button_2 then -- first press of PLAY key in new sequence
last_key_pressed = button_2
imode = false
return false -- steal key press
else
imode = false
last_key_pressed = 999 -- reset
return true -- use all other keys in an unmodified way
end
end

event.keypress = test4reset

Licaon_Kter


garry23

A minor update to allow you to move backwards and forwards in your EOSM preset list :)

https://gist.github.com/pigeonhill/156ea0e55cd0a029bc447f8bf5593224

garry23

Latest EOSM Toggler tweek: https://gist.github.com/pigeonhill/156ea0e55cd0a029bc447f8bf5593224

This script is aimed at the still and timelapse photographer, but the Toggler framework is extensible for others, eg videographers who wish to quickly access ML use-states.

garry23

For those that are following the '(EOSM) Toggler' developments, here is the latest version: https://gist.github.com/pigeonhill/156ea0e55cd0a029bc447f8bf5593224

This one has the 'nice' feature of telling you what is set from the Toggler, ie in the ML top menu bar.

Enjoy :)

Cheers

Garry

garry23


DeafEyeJedi

and Thanks also to @Audionut for hints!
5D3.113 | 5D3.123 | EOSM.203 | 7D.203 | 70D.112 | 100D.101 | EOSM2.* | 50D.109