diff --git a/idle.h b/idle.h index 5096cf9..e948a68 100644 --- a/idle.h +++ b/idle.h @@ -23,6 +23,7 @@ struct table2D iacCrankDutyTable; struct StepperIdle idleStepper; bool idleOn; //Simply tracks whether idle was on last time around +byte idleInitComplete = 99; //TRacks which idle method was initialised. 99 is a method that will never exist unsigned int iacStepTime; unsigned int completedHomeSteps; diff --git a/idle.ino b/idle.ino index f0907b9..2045fa3 100644 --- a/idle.ino +++ b/idle.ino @@ -110,11 +110,13 @@ void initialiseIdle() idleStepper.stepperStatus = SOFF; break; } - + idleInitComplete = configPage4.iacAlgorithm; //Sets which idle method was initialised } void idleControl() { + if(idleInitComplete != configPage4.iacAlgorithm) { initialiseIdle(); } + switch(configPage4.iacAlgorithm) { case 0: //Case 0 is no idle control ('None') diff --git a/reference/speeduino.ini b/reference/speeduino.ini index 17bae30..ead363f 100644 --- a/reference/speeduino.ini +++ b/reference/speeduino.ini @@ -518,7 +518,6 @@ page = 9 requiresPowerCycle = injOpen requiresPowerCycle = IgInv requiresPowerCycle = fanInv - requiresPowerCycle = iacAlgorithm requiresPowerCycle = boostEnabled requiresPowerCycle = vvtEnabled ; requiresPowerCycle = vvtChannels