Closedown

This commit is contained in:
gac-S_Changer
2017-01-26 16:53:05 +01:00
parent a45da5b8fd
commit 0460d0bb5b
2 changed files with 6 additions and 4 deletions

View File

@@ -41,12 +41,14 @@ class RobotModbus(DeviceBase):
if robot_ack.read() != 0:
raise Exception("Robot is not ready")
robot_cmd.write(command)
args = [0,0,0,0,0,0]
args = [0] * robot_args.size
index = 0
for arg in argv:
args[index] = arg
index = index + 1
robot_args.write(to_array(args, 'i'))
if index == robot_args.size:
raise Exception("Invalid number of arguments")
robot.write(to_array(args, 'i'))
try:
self.request()
err = robot_ack.take()