How To Do Custom Init Without Affecting The Main Code Base

Official FreeEMS vanilla firmware development, the heart and soul of the system!
Post Reply
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

How To Do Custom Init Without Affecting The Main Code Base

Post by Fred »

Code: Select all

        if(!PAInitialized){
                LT1PAInit();
                PAInitialized = 1;
        }
One of these things is a variable, the other is a custom init function. The first time the ISR fires, the init flag is zero and as such the init routine runs, and sets the flag. Subsequent times the init doesn't run!

So, if experimenting with a new setup before I get around to implementing the decoder init interface aspect, do this hack, it's clever, and works well, and is all SeanK's idea! Great work, Sean :-)

Fred.
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
Post Reply