Ejemplo n.º 1
0
 def load_configs(self):
     try:
         with open(os.path.expanduser("~/.tikibot.yaml"), "r") as f:
             confs = yaml.safe_load(f)
     except FileNotFoundError:
         confs = yaml.load(self.get_resource("tikibot_configs.yaml"))
     self.passcode = confs.get('passcode', '8888')
     self.use_metric = confs.get('use_metric', False)
     SupplyFeed.fromDict(confs)
     Recipe.fromDict(confs)
Ejemplo n.º 2
0
 def load_configs(self):
     try:
         with open(os.path.expanduser("~/.tikibot.yaml"), "r") as f:
             confs = yaml.load(f)
     except FileNotFoundError:
         confs = yaml.load(self.get_resource("tikibot_configs.yaml"))
     self.passcode = confs.get('passcode', '8888')
     self.use_metric = confs.get('use_metric', True)
     self.stepsforml = confs.get('stepsforml', "113")
     self.serdevice = confs.get('serdevice', '/dev/ttyUSB0')
     self.bgcolor = confs.get('bgcolor', '#94F92F')
     SupplyFeed.fromDict(confs)
     Recipe.fromDict(confs)