kopia lustrzana https://github.com/jamesgao/kiln_controller
Only re-ignite if temperature at least 20 degrees below setpoint
rodzic
67e53d1981
commit
3328cad4b7
|
@ -161,12 +161,10 @@ class Profile(threading.Thread):
|
||||||
elif temp - setpoint > 50:
|
elif temp - setpoint > 50:
|
||||||
self.regulator.off()
|
self.regulator.off()
|
||||||
self.duty_cycle = True
|
self.duty_cycle = True
|
||||||
|
elif self.duty_cycle and temp - setpoint < -20:
|
||||||
else:
|
|
||||||
if self.duty_cycle:
|
|
||||||
self.regulator.ignite()
|
self.regulator.ignite()
|
||||||
self.duty_cycle = False
|
self.duty_cycle = False
|
||||||
|
else:
|
||||||
pid_out = self.pid.update(temp)
|
pid_out = self.pid.update(temp)
|
||||||
if pid_out < 0: pid_out = 0
|
if pid_out < 0: pid_out = 0
|
||||||
if pid_out > 1: pid_out = 1
|
if pid_out > 1: pid_out = 1
|
||||||
|
|
Ładowanie…
Reference in New Issue