diff --git a/script/local.py b/script/local.py index 4d2cd31..e6ca0ac 100644 --- a/script/local.py +++ b/script/local.py @@ -14,7 +14,8 @@ class RobotTCP(TcpDevice): self.retries = retries self.header = None self.trailer = "\n" - self.array_separator = ',' + self.array_separator = '|' + self.cmd_separator = ' ' self.msg_id = 0 self.setPolling(1000) @@ -46,8 +47,8 @@ class RobotTCP(TcpDevice): msg = str(command) if len(argv)>10: raise Exception("Exceeded maximum number of parameters") - for arg in argv: - msg = msg + "," + str(arg) + for i in range(len(argv)): + msg += (self.cmd_separator if (i==0) else self.array_separator) + str(argv[i]) rx = self.call(msg) if rx.count(self.array_separator)>0: return rx.split(self.array_separator)