Added versioning to robot project

This commit is contained in:
gac-S_Changer
2017-02-22 14:03:49 +01:00
parent 9c28433723
commit 95ab530bdc

View File

@@ -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)