Author Topic: [DONE] Where to hook code that should only execute once on boot?  (Read 3260 times)

Marsu42

  • Contributor
  • Hero Member
  • *****
  • Posts: 1557
  • 66d + flashes
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!

dmilligan

  • Developer
  • Hero Member
  • *****
  • Posts: 3218
  • 60Da / 1100D / EOSM
Re: Where to hook code that should only execute once on boot?
« Reply #1 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

Marsu42

  • Contributor
  • Hero Member
  • *****
  • Posts: 1557
  • 66d + flashes
Re: Where to hook code that should only execute once on boot?
« Reply #2 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!