@a1ex
I've reached a point where I believe there may (sic) be a Lua issue, ie rather than my bad programing ;-)
Here is the code:
--[[
Cycler
Version 0.1
Garry George April 2019
http://photography.grayheron.net/
--]]
config = 1
max_config = 5
-- Change the Cycler button to your choice, for example
-- B1 = PLAY and B2 = INFO on an 5D3, and B1 = INFO and B2 = PLAY on a EOSM
button_1 = KEY.INFO -- imode switch and set
button_2 = KEY.PLAY -- used to go forwards in imode
button_3 = KEY.MENU -- used to go backwards in imode
cycled = true
timer = dryos.ms_clock
timer_running = false
menu.set("Expo","Auto ETTR",0)
menu.set("Shoot","Advanced Bracket",0)
menu.set("Overlay","Waveform",0)
menu.set("Overlay","Magic Zoom",0)
function reset(k)
if cycled then
if config == 1 then
-- normal play function, so reset everything
menu.set("Expo","Auto ETTR",0)
menu.set("Shoot","Advanced Bracket",0)
menu.set("Overlay","Waveform",0)
menu.set("Overlay","Magic Zoom",0)
elseif config == 2 then -- switch on ETTR
menu.set("Expo","Auto ETTR",1)
elseif config == 3 then -- switch on bracketing
menu.set("Expo","Auto ETTR",0)
menu.set("Shoot","Advanced Bracket",1)
elseif config == 4 then -- switch on Magic Zoom
menu.set("Shoot","Advanced Bracket",0)
menu.set("Overlay","Magic Zoom",1)
elseif config == 5 then -- switch on Waveform
menu.set("Shoot","Advanced Bracket",0)
menu.set("Overlay","Waveform",1)
end
cycled = false
else
-- do nothing
end
end
function test4reset(k)
if k == button_2 then
if timer_running then
if dryos.ms_clock - timer < 500 then -- normal button action
timer_running = false
cycled = true
return true
else
config = config + 1
if config > max_config then config = 1 end
cycled = true
timer_running = false
return false
end
else
timer = dryos.ms_clock
timer_running = true
cycled = false
return false
end
end
cycled = false
return true
end
event.shoot_task = reset
event.keypress = test4reset
lv.info
{
name = "Cycler State",
value = "",
priority = 100,
update = function(this)
this.background = COLOR.WHITE
this.foreground = COLOR.BLACK
if config == 1 then
this.value = "PLAY"
elseif config == 2 then
this.value = "ETTR"
elseif config == 3 then
this.value = "Auto"
elseif config == 4 then
this.value = "Zoom"
elseif config == 5 then
this.value = "Wave"
end
end
}
The problem occurs when you cycle through the options and reach the waveform option.
All this state does is switch off the previous ML state, ie Magic Zoom, and switch on waveform.
All other state changes work fine.
At the waveform state change, the cam (EOSM) freezes.
As I say, it may be my programing, but I don't believe so.
Cheers
Garry