variable rename for consistency
This commit is contained in:
parent
72766e2cff
commit
c1ebdd7b16
|
@ -38,13 +38,13 @@ logger.addHandler(ch) # add console log handler
|
||||||
# TODO: refactor this to support multiple net#s
|
# TODO: refactor this to support multiple net#s
|
||||||
config = configparser.ConfigParser(allow_no_value=True)
|
config = configparser.ConfigParser(allow_no_value=True)
|
||||||
config.read('server.cfg') # open config file
|
config.read('server.cfg') # open config file
|
||||||
hog4 = {} # init an empty dictionary
|
servers = {} # init an empty dictionary
|
||||||
server = config['hog4'] # section of config file
|
server = config['hog4'] # section of config file
|
||||||
net = server.getint("net", 1) # default to net #1
|
net = server.getint("net", 1) # default to net #1
|
||||||
logger.info("Adding Hog device at net# " + str(net))
|
logger.info("Adding Hog device at net# " + str(net))
|
||||||
# osc clients are added to the dictionary with the net # as the key
|
# osc clients are added to the dictionary with the net # as the key
|
||||||
hog4[net] = udp_client.SimpleUDPClient(server.get("ip", "10.0.0.1"),
|
servers[net] = udp_client.SimpleUDPClient(server.get("ip", "10.0.0.1"),
|
||||||
server.getint("port", 6600))
|
server.getint("port", 6600))
|
||||||
|
|
||||||
|
|
||||||
def comment(text):
|
def comment(text):
|
||||||
|
@ -53,7 +53,7 @@ def comment(text):
|
||||||
stream = antlr4.CommonTokenStream(lexer)
|
stream = antlr4.CommonTokenStream(lexer)
|
||||||
parser = CommentMacroParser(stream)
|
parser = CommentMacroParser(stream)
|
||||||
tree = parser.prog()
|
tree = parser.prog()
|
||||||
oscMacro = OscCommentMacroListener(hog4)
|
oscMacro = OscCommentMacroListener(servers)
|
||||||
walker = antlr4.ParseTreeWalker()
|
walker = antlr4.ParseTreeWalker()
|
||||||
walker.walk(oscMacro, tree)
|
walker.walk(oscMacro, tree)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue