mirror of https://github.com/arendst/Tasmota.git
Change PID temperature update (#17636)
This commit is contained in:
parent
2e7496a052
commit
dad059737d
|
@ -230,6 +230,9 @@ void PIDEverySecond() {
|
||||||
// run the pid algorithm if Pid.run_pid_now is true or if the right number of seconds has passed or if too long has
|
// run the pid algorithm if Pid.run_pid_now is true or if the right number of seconds has passed or if too long has
|
||||||
// elapsed since last pv update. If too long has elapsed the the algorithm will deal with that.
|
// elapsed since last pv update. If too long has elapsed the the algorithm will deal with that.
|
||||||
if (Pid.run_pid_now || Pid.current_time_secs - Pid.last_pv_update_secs > Pid.max_interval || (Pid.update_secs != 0 && sec_counter++ % Pid.update_secs == 0)) {
|
if (Pid.run_pid_now || Pid.current_time_secs - Pid.last_pv_update_secs > Pid.max_interval || (Pid.update_secs != 0 && sec_counter++ % Pid.update_secs == 0)) {
|
||||||
|
if (!Pid.run_pid_now) {
|
||||||
|
PIDShowSensor(); // set actual process value
|
||||||
|
}
|
||||||
PIDRun();
|
PIDRun();
|
||||||
Pid.run_pid_now = false;
|
Pid.run_pid_now = false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue