mirror of
https://github.com/Ralim/IronOS.git
synced 2025-02-26 07:53:55 +00:00
@@ -880,12 +880,18 @@ void startPIDTask(void const * argument) {
|
|||||||
output = 0;
|
output = 0;
|
||||||
} else
|
} else
|
||||||
backoffOverflow = 0;
|
backoffOverflow = 0;
|
||||||
|
if (currentlyActiveTemperatureTarget < rawTemp) {
|
||||||
|
output = 0;
|
||||||
|
integralCount = 0;
|
||||||
|
backoffOverflow = 0;
|
||||||
|
derivativeLastValue = 0;
|
||||||
|
}
|
||||||
setTipPWM(output);
|
setTipPWM(output);
|
||||||
} else {
|
} else {
|
||||||
setTipPWM(0); //disable the output driver if the output is set to be off elsewhere
|
setTipPWM(0); //disable the output driver if the output is set to be off elsewhere
|
||||||
integralCount = 0;
|
integralCount = 0;
|
||||||
backoffOverflow = 0;
|
backoffOverflow = 0;
|
||||||
|
derivativeLastValue = 0;
|
||||||
}
|
}
|
||||||
derivativeLastValue = rawTemp; //store for next loop
|
derivativeLastValue = rawTemp; //store for next loop
|
||||||
HAL_IWDG_Refresh(&hiwdg);
|
HAL_IWDG_Refresh(&hiwdg);
|
||||||
|
|||||||
Reference in New Issue
Block a user