- removed setReceipe()
git-svn-id: http://moon:8086/svn/projects/HendiControl@375 fda53097-d464-4ada-af97-ba876c37ca34
This commit is contained in:
@@ -15,7 +15,7 @@ commands = Enum('controllerCommands', 'RUN PAUSE ABORT STIRR_OFF STIRR_ON')
|
||||
|
||||
class Controller(TimerListener):
|
||||
|
||||
def __init__(self, params, plant, stirrer):
|
||||
def __init__(self, params, plant, stirrer, recipe):
|
||||
print(json.dumps({'Controller': params}, indent=4, sort_keys=True))
|
||||
self.sim_warp_factor = params['sim_warp_factor']
|
||||
self.ovenState = ovenStates.IDLE
|
||||
@@ -41,7 +41,9 @@ class Controller(TimerListener):
|
||||
self.report_interval = 1.0
|
||||
self.thread = None
|
||||
self.receipe_sema = threading.Semaphore(0)
|
||||
self.receipe = None
|
||||
self.receipe = recipe
|
||||
self.rasten = recipe['Rasten']
|
||||
self.rasten.append(None)
|
||||
self.theta_sm = Smoother(1.0)
|
||||
self.heatrate_sm = Smoother(0.01)
|
||||
self.theta_err_sm = Smoother(1.0)
|
||||
@@ -69,6 +71,14 @@ class Controller(TimerListener):
|
||||
self.thread.start()
|
||||
self.fp_log = None
|
||||
|
||||
# Stirrer
|
||||
self.stirrSpeedHeat = recipe['stirrSpeedHeat']
|
||||
self.stirrSpeedRast = recipe['stirrSpeedRast']
|
||||
self.stirrDutyRast = recipe['stirrDutyRast']
|
||||
self.stirrCycleTime = recipe['stirrCycleTime']
|
||||
|
||||
print(json.dumps({recipe['Name'] : recipe}, indent=4, sort_keys=True))
|
||||
|
||||
def command(self, cmd):
|
||||
self.queue.put_nowait(cmd)
|
||||
|
||||
@@ -143,19 +153,6 @@ class Controller(TimerListener):
|
||||
if self.rastTimer.isActive:
|
||||
self.log("Rast remaining : {:0.1f} min.".format(self.rastTimer.elapseDuration / 60))
|
||||
|
||||
|
||||
def setRecipe(self, recipe):
|
||||
print(json.dumps({recipe['Name'] : recipe}, indent=4, sort_keys=True))
|
||||
self.receipe = recipe
|
||||
self.rasten = recipe['Rasten']
|
||||
self.rasten.append(None)
|
||||
|
||||
# Stirrer
|
||||
self.stirrSpeedHeat = recipe['stirrSpeedHeat']
|
||||
self.stirrSpeedRast = recipe['stirrSpeedRast']
|
||||
self.stirrDutyRast = recipe['stirrDutyRast']
|
||||
self.stirrCycleTime = recipe['stirrCycleTime']
|
||||
|
||||
def wait_finished(self):
|
||||
self.receipe_sema.acquire()
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user