Code: Select all
currentOffDelay4 = Scaled3;//On time after off time
if (RPMTimeavg > 125000){
Scaled3 = 0; //Fuel off if RPM below minimum = 20RPM
}
Yes, those visible typos were fixed after copying back to IDE.
Then added the "UL" markers on this constraint.
Code: Select all
RPMTimeavg = constrain(RPMTimeavg, 261UL, 125000UL);
Haven't tested yet, but it compiled.
Don't know if it has a 64 bit timer for micros(), so it may be a had idea without extra work.