Skip to content
This repository was archived by the owner on Oct 29, 2019. It is now read-only.

Commit 44f45e0

Browse files
committed
fized bug with get_revision()
1 parent b876ea7 commit 44f45e0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

libs/piconzero.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,17 +32,17 @@ def get_revision():
3232
"""
3333
Get version and revision info
3434
35-
:return: the version of the board
35+
:return: the version of the board and the board type in a list
3636
"""
3737
for i in range(RETRIES):
3838
try:
3939
rval = bus.read_word_data(pzaddr, 0)
40-
return [rval / 256, rval % 256]
40+
return [rval / 256, rval % 256] # firmware is first, board type is second
4141
except Exception as e:
4242
if DEBUG:
4343
print("error in get_revision(), retrying", file=sys.stderr)
4444
print(e, file=sys.stderr)
45-
revision = get_revision() # store the firmware revision
45+
revision = get_revision()[0] # store the firmware revision
4646

4747
def set_motor(motor, value):
4848
"""

0 commit comments

Comments
 (0)