kopia lustrzana https://github.com/jamesgao/kiln_controller
typos
rodzic
6f927fd34a
commit
1e938ec083
|
@ -177,6 +177,6 @@ class Profile(threading.Thread):
|
||||||
self.callback(temp, setpoint, pid_out)
|
self.callback(temp, setpoint, pid_out)
|
||||||
|
|
||||||
sleep = _next - time.time()
|
sleep = _next - time.time()
|
||||||
if (sleep > 0)
|
if sleep > 0:
|
||||||
time.sleep(sleep)
|
time.sleep(sleep)
|
||||||
_next += self.interval
|
_next += self.interval
|
||||||
|
|
|
@ -244,7 +244,7 @@ class Regulator(threading.Thread):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
class Breakout(object):
|
class Breakout(object):
|
||||||
def __init__(self, addr, maxsteps=6500, minsteps=((2700, 0), (2400, 15)) ):
|
def __init__(self, addr, maxsteps=6500, minsteps=((2600, 0), (2300, 15)) ):
|
||||||
import breakout
|
import breakout
|
||||||
self.device = breakout.Breakout(addr)
|
self.device = breakout.Breakout(addr)
|
||||||
self.min_interp = minsteps
|
self.min_interp = minsteps
|
||||||
|
@ -268,9 +268,8 @@ class Breakout(object):
|
||||||
mix = (temp - self.min_interp[0][1]) / float(trange)
|
mix = (temp - self.min_interp[0][1]) / float(trange)
|
||||||
return mrange * mix + self.min_interp[1][0]
|
return mrange * mix + self.min_interp[1][0]
|
||||||
|
|
||||||
def ignite(self, start=2550, delay=5):
|
def ignite(self, start=2400):
|
||||||
logger.info("Igniting system")
|
logger.info("Igniting system")
|
||||||
time.sleep(delay)
|
|
||||||
self.device.motor = start
|
self.device.motor = start
|
||||||
while self.device.motor != start:
|
while self.device.motor != start:
|
||||||
time.sleep(.1)
|
time.sleep(.1)
|
||||||
|
|
Ładowanie…
Reference in New Issue