diff --git a/Control/brewpi/plant.py b/Control/brewpi/plant.py index 7b22746..78da918 100644 --- a/Control/brewpi/plant.py +++ b/Control/brewpi/plant.py @@ -10,14 +10,21 @@ class Plant(APlant): self.heater = HendiCtrl('/dev/ttyUSB0', 115200) self.tempsensor = Max31865() self.P = 0 - pass + + def activate(self, enable): + if enable: + self.heater.remoteEnable(enable) + self.heater.setSwitch(enable) + else: + self.heater.setSwitch(enable) + self.heater.remoteEnable(enable) def process(self): pass def setPower(self, power_w): self.P = power_w - self.heater.setPowerWatts() + self.heater.setPowerWatts(power_w) def getPower(self): return self.heater.getPowerWatts()