Magic Lantern Forum

Developing Magic Lantern => General Development => Topic started by: Marsu42 on April 29, 2014, 12:26:47 PM

Title: [DONE] Where to hook code that should only execute once on boot?
Post by: Marsu42 on April 29, 2014, 12:26:47 PM
I'd like to add a small function that resets the af point to center if I turn on the camera. Where do I hook this function w/o executing it all the time in shoot task as I usually do? Thanks!
Title: Re: Where to hook code that should only execute once on boot?
Post by: dmilligan on April 29, 2014, 01:01:26 PM
module init only runs once, or you could make a task that doesn't loop and just exits, or put it in shoot task before the loop starts
Title: Re: Where to hook code that should only execute once on boot?
Post by: Marsu42 on April 29, 2014, 01:41:28 PM
module init only runs once, or you could make a task that doesn't loop and just exits, or put it in shoot task before the loop starts

Oh my, good point, I completely forgot I can put custom code there. Thanks!