def blocking_loop(self): log("{} Stage Start".format(self.name), "info") self.start_time = get_current_time() self.last_update = get_current_time() while not self.reached_stop_conditions(): self.loop() log("{} Stage End".format(self.name), "info")
def blocking_loop(self): log("Case Run Stage Start", "info") self.start_time = get_current_time() self.last_update = get_current_time() while not self.reached_stop_conditions(): self.loop() log("Case Run Stage End", "info")
def loop(self): log("Case Run Stage Loop", "debug") if exceeded_time(self.last_update, self.update_frequency): self.last_update = get_current_time() self.TIC_101.loop() self.GIC_101.loop() self.HIC_101.loop()
def delay_has_passed(self): return (get_current_time() - self.last_update) > self.delay
def update(self): self.last_update = get_current_time() self.step += 1 new_setpoint = round(self.controller.get_setpoint() + self.adjust) self.controller.set_setpoint(new_setpoint)
def loop(self): log("{} Stage Loop".format(self.name), "debug") if exceeded_time(self.last_update, self.update_frequency): self.last_update = get_current_time() for controller in self.controllers: controller.loop()
def blocking_loop(self): log("Crop Stage Start", "info") self.start_time = get_current_time() while not self.stop_conditions(): self.loop() log("Crop Stage End", "info")
def start(self): self.TIC_101.set_setpoint(23) self.GIC_101.set_setpoint(15000) self.HIC_101.set_setpoint(55) self.start_time = get_current_time() self.last_update = self.start_time