-
Notifications
You must be signed in to change notification settings - Fork 71
Closed
Description
Describe the bug
Return type of sync_send_angles is int, should not use method chaining.
See demo/sync.py at line 20-24.
To Reproduce
Steps to reproduce the behavior:
- Clone the repository (Commit
3506655). - Run
python .\demo\sync.py. - Input
3,Enter,Enter.
Expected behavior
The test case should be passed without any exceptions.
Screenshots
--------------------------------------------
| This file will test basic option method: |
| sync_send_angles() |
--------------------------------------------
1 : COM4 - 蓝牙链接上的标准串行 (COM4)
2 : COM3 - 蓝牙链接上的标准串行 (COM3)
3 : COM5 - USB-Enhanced-SERIAL CH9102 (COM5)
Please input 1 - 3 to choice:3
COM5
Please input baud(default:115200):
115200
Wether DEBUG mode[Y/n]:
Start check basic options
Traceback (most recent call last):
File "...\pymycobot\demo\sync.py", line 46, in <module>
test(mycobot)
File "...\pymycobot\demo\sync.py", line 20, in test
mycobot.sync_send_angles([0, 0, 0, 0, 0, 0], 100).sync_send_angles(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'int' object has no attribute 'sync_send_angles'
Desktop:
- OS: Windows 11
- Hardware: myCobot 280 M5 2023
Additional context
I fixed it by decomposing the method chaining:
mycobot.sync_send_angles([0, 0, 0, 0, 0, 0], 100)
mycobot.sync_send_angles([100, 50, 0, 0, 70, 160], 100)
mycobot.sync_send_angles([-100,-50, 0, 0, -70,-160], 100)
mycobot.set_free_mode(1)
I created a PR here but I do not know if it is a proper solution.
Metadata
Metadata
Assignees
Labels
No labels