Magic Lantern Forum

Developing Magic Lantern => Scripting Corner => Scripting Q&A => Topic started by: garry23 on September 07, 2020, 08:48:36 AM

Title: Advanced Bracketing (AB) problem
Post by: garry23 on September 07, 2020, 08:48:36 AM
I've given up trying to fix the following, but someone else may see the error of my ways.

I switch off ML AB, so I can use camera.shoot().

When I've finished, I switch it back on.

The problem is, AB then starts taking pictures :-(

Here is a slice of the code:

local ab_state = menu.get("Shoot","Advanced Bracket","")
menu.set("Shoot","Advanced Bracket",0) -- switch off ML AB

camera.shoot()
camera.wait()

sleep(5) -- this doesn't effect the problem

menu.set("Shoot","Advanced Bracket",ab_state) -- AB starts taking pictures!!!!


Can someone suggest why?
Title: Re: Advanced Bracketing (AB) problem
Post by: garry23 on September 07, 2020, 02:42:37 PM
I thought this might help, ie resetting the key 'buffer', but it doesn't.

local ab_state = menu.get("Shoot","Advanced Bracket","")
menu.set("Shoot","Advanced Bracket",0) -- switch off ML AB

camera.shoot()
camera.wait()

sleep(5) -- this doesn't effect the problem

key.press(KEY.SET)

menu.set("Shoot","Advanced Bracket",ab_state) -- AB starts taking pictures!!!!


Advanced bracketing still starts when I use menu.set.