Skip to content

Commit 08472a6

Browse files
Luke OglesbyLuke Oglesby
authored andcommitted
fixed bug with missing global 'reply' error
1 parent 4a8ecc7 commit 08472a6

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

tmcl/motor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def __init__ (self, bus, address, motor = 0):
1313

1414

1515
def send (self, cmd, type, motorbank, value):
16-
self.bus.send(self.address, cmd, type, motorbank, value)
16+
return self.bus.send(self.address, cmd, type, motorbank, value)
1717

1818
def stop (self):
1919
self.send( Command.MST, 0, self.motor, 0 )

tmcl/reply.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ def __init__ (self, reply):
99

1010
class Reply (object):
1111
def __init__(self, reply_struct):
12-
self.reply_address = reply[0]
13-
self.module_address = reply[1]
14-
self.status = reply[2]
15-
self.command = reply[3]
16-
self.value = reply[4]
17-
self.checksum = reply[5]
12+
self.reply_address = reply_struct[0]
13+
self.module_address = reply_struct[1]
14+
self.status = reply_struct[2]
15+
self.command = reply_struct[3]
16+
self.value = reply_struct[4]
17+
self.checksum = reply_struct[5]
1818

1919
class Status (object):
2020
SUCCESS = 100

0 commit comments

Comments
 (0)