Also another way to calculate it would be for the 3/4 to 1 second interrupt time to just set a variable like
{
calculate = 1;
}
then on the next injector close operation it could have this on the end of the function
if (calculate == 1){
mileage= (vsscount * vsscorr) / (period * injcorr) // the counts * the corr
// factors for each of them to get them to miles and gallons. time isn't really
//important. just distance and gallons so calibration could be just drive 1 mile
//using highway markers and use that for calculating the corr factor.
period = 0;
calculate = 0;
vss = 0; // clear everything for the next round of calculations in one second.
}
the gallons corr factor could be a routine to just count total injector open time continuously for a full tank of gas. Then figure out how much is squirted per unit time by that fill up information.
