From 7a36e28b1e4b4dde775dc3069a7c5c8c7b0891ec Mon Sep 17 00:00:00 2001 From: Josh Stewart Date: Sat, 26 Mar 2016 09:11:30 +1100 Subject: [PATCH] Fix the hard limit option for launch control --- speeduino.ino | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/speeduino.ino b/speeduino.ino index 8af4fdf..1e02597 100644 --- a/speeduino.ino +++ b/speeduino.ino @@ -1013,7 +1013,10 @@ void loop() //Perform an initial check to see if the ignition is turned on (Ignition only turns on after a preset number of cranking revolutions and: //Check for hard cut rev limit (If we're above the hardcut limit, we simply don't set a spark schedule) //crankAngle = getCrankAngle(timePerDegree); //Refresh with the latest crank angle - if(ignitionOn && (currentStatus.RPM < ((unsigned int)(configPage2.HardRevLim) * 100) )) + bool hardLimitOff = (currentStatus.RPM < ((unsigned int)(configPage2.HardRevLim) * 100) ); + if (configPage3.launchEnabled && currentStatus.launching) { hardLimitOff = hardLimitOff && (currentStatus.RPM < ((unsigned int)(configPage3.lnchHardLim) * 100)); } + + if(ignitionOn && hardLimitOff) { //if ( (ignition1StartAngle > crankAngle))// && ign1LastRev != startRevolutions) //if ((ignition1StartAngle > crankAngle) == 0)