Commit 4f3aa7d5 authored by Holger Witsch's avatar Holger Witsch

Read wago object only once from config.

parent b72e7428
Pipeline #17722 failed with stages
......@@ -11,9 +11,10 @@ def gantry(command="help", cmdelement="pump"):
"""
# get the wagoname from config
global __WAGO__
config = get_config()
wagoname = config.get('gantry').to_dict()['wagoname']
__WAGO__ = config.get(wagoname)
if not __WAGO__:
config = get_config()
wagoname = config.get('gantry').to_dict()['wagoname']
__WAGO__ = config.get(wagoname)
if command == "start":
if cmdelement == "pump":
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment