コード例 #1
0
 def run(self):
     self.reading_thread = ThreadLooping(
         target=self.read, wait_time=self.min_result_freq_time)
     self.reading_thread.start()
     self.checking_thread = ThreadLooping(
         target=self.check, wait_time=self.min_result_freq_time)
     self.checking_thread.start()
コード例 #2
0
  def __init__(self, plant_lib_path='./assets/plant_lib.json'):
    self.cfg = ConfigManager('Gardener')
    self.plant_lib = PlantLibrary(plant_lib_path)
    self.station_mgr = StationManager(self.plant_lib)

    self.logger = Logger()
    self.logging_interval_time = 300 # second = 5 minutes
    self.logging_thread = ThreadLooping(self._logging_handle, self.logging_interval_time)
 def __init__(self, name, info_in_lib=None):
     self.name = name
     self.is_ensure_living_environment = False
     self.ensure_thread = ThreadLooping(
         target=self._ensure_living_environment, wait_time=2)