boolignitionOn=false;//The current state of the ignition system
boolfuelOn=false;//The current state of the ignition system
bytecltCalibrationTable[CALIBRATION_TABLE_SIZE];
byteiatCalibrationTable[CALIBRATION_TABLE_SIZE];
byteo2CalibrationTable[CALIBRATION_TABLE_SIZE];
unsignedlongcounter;
unsignedlongcurrentLoopTime;//The time the current loop started (uS)
unsignedlongpreviousLoopTime;//The time the previous loop started (uS)
bytemaxIgnOutputs=1;//Used for rolling rev limiter
bytecurRollingCut=0;//Rolling rev limiter, current ignition channel being cut
byterollingCutCounter=0;//how many times (revolutions) the ignition has been cut in a row
uint32_trollingCutLastRev=0;//Tracks whether we're on the same or a different rev for the rolling cut
unsignedlongsecCounter;//The next time to incremen 'runSecs' counter.
intchannel1IgnDegrees;//The number of crank degrees until cylinder 1 is at TDC (This is obviously 0 for virtually ALL engines, but there's some weird ones)
intchannel2IgnDegrees;//The number of crank degrees until cylinder 2 (and 5/6/7/8) is at TDC
intchannel3IgnDegrees;//The number of crank degrees until cylinder 3 (and 5/6/7/8) is at TDC
intchannel4IgnDegrees;//The number of crank degrees until cylinder 4 (and 5/6/7/8) is at TDC
intchannel5IgnDegrees;//The number of crank degrees until cylinder 5 is at TDC
intchannel6IgnDegrees;//The number of crank degrees until cylinder 6 is at TDC
intchannel7IgnDegrees;//The number of crank degrees until cylinder 7 is at TDC
intchannel8IgnDegrees;//The number of crank degrees until cylinder 8 is at TDC
intchannel1InjDegrees;//The number of crank degrees until cylinder 1 is at TDC (This is obviously 0 for virtually ALL engines, but there's some weird ones)
intchannel2InjDegrees;//The number of crank degrees until cylinder 2 (and 5/6/7/8) is at TDC
intchannel3InjDegrees;//The number of crank degrees until cylinder 3 (and 5/6/7/8) is at TDC
intchannel4InjDegrees;//The number of crank degrees until cylinder 4 (and 5/6/7/8) is at TDC
intchannel5InjDegrees;//The number of crank degrees until cylinder 5 is at TDC
intchannel6InjDegrees;//The number of crank degrees until cylinder 6 is at TDC
intchannel7InjDegrees;//The number of crank degrees until cylinder 7 is at TDC
intchannel8InjDegrees;//The number of crank degrees until cylinder 8 is at TDC
//These are the functions the get called to begin and end the ignition coil charging. They are required for the various spark output modes