Skip to content

Commit c7bd017

Browse files
committed
Fix up example to use correct object
Currently the example fails with: python3 pydexarm/example.py pydexarm: /dev/ttyACM0 open Traceback (most recent call last): File "/home/michele/Devel/DexArm_API/pydexarm/example.py", line 9, in <module> dexarm.go_home() NameError: name 'dexarm' is not defined Let's point it to the proper class so things start working again. Renaming 'dexarm' instead of 'device' in order to make it less confusing. Signed-off-by: Michele Baldessari <michele@acksyn.org>
1 parent 34f4bd4 commit c7bd017

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

pydexarm/example.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@
55
'''mac & linux'''
66
# device = Dexarm(port="/dev/tty.usbmodem3086337A34381")
77

8-
dexarm.go_home()
8+
device.go_home()
99

10-
dexarm.move_to(50, 300, 0)
11-
dexarm.move_to(50, 300, -50)
12-
dexarm.air_picker_pick()
13-
dexarm.move_to(50, 300, 0)
14-
dexarm.move_to(-50, 300, 0)
15-
dexarm.move_to(-50, 300, -50)
16-
dexarm.air_picker_place()
10+
device.move_to(50, 300, 0)
11+
device.move_to(50, 300, -50)
12+
device.air_picker_pick()
13+
device.move_to(50, 300, 0)
14+
device.move_to(-50, 300, 0)
15+
device.move_to(-50, 300, -50)
16+
device.air_picker_place()
1717

18-
dexarm.go_home()
19-
dexarm.close()
18+
device.go_home()
19+
device.close()

0 commit comments

Comments
 (0)