Esempio n. 1
0
 def blocking_loop(self):
     log("Spawn stage start", "info")
     if self.is_first_run():
         self.start()
     while not self.reached_stop_conditions():
         self.loop()
     log("Spawn Stage End", "info")
Esempio n. 2
0
 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")
Esempio n. 3
0
 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")
Esempio n. 4
0
 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()
Esempio n. 5
0
 def loop(self):
     log("Spawn Stage Loop", "debug")
     if self.is_first_run():
         self.start()
     if exceeded_time(self.last_update, self.update_frequency):
         self.TIC_101.loop()
         self.GIC_101.loop()
         self.HIC_101.loop()
Esempio n. 6
0
 def set_setpoint(self, setpoint):
     log("[{}] Setpoint = {}".format(self.name, setpoint), "info")
     self.PID.SetPoint = setpoint
Esempio n. 7
0
 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()
Esempio n. 8
0
 def loop(self):
     log("Crop Stage Loop", "debug")
     self.GIC_adjuster.loop()
     self.TIC_adjuster.loop()
     self.HIC_adjuster.loop()
Esempio n. 9
0
 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")
Esempio n. 10
0
 def run(self):
     log("Master program started", "info")
     self.spawn_stage.blocking_loop()
     self.case_run_stage.blocking_loop()
     self.crop_stage.blocking_loop()
     log("Master program ended", "info")