Closedown
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user