version() returns an empty list
3110 opened this issue · comments
Describe the bug
version()
returns an empty list.
To Reproduce
$ ipython
Python 3.10.1 (tags/v3.10.1:2cd268a, Dec 6 2021, 19:10:37) [MSC v.1929 64 bit (AMD64)]
Type 'copyright', 'credits' or 'license' for more information
IPython 7.30.1 -- An enhanced Interactive Python. Type '?' for help.
In [1]: from pymycobot import MyCobot
In [2]: mc = MyCobot("COM13", debug=True)
In [3]: mc.version()
03:03:51.402 DEBU [pymycobot.generate] _write: [254, 254, 2, 0, 250]
03:03:51.473 DEBU [pymycobot.generate] _read: no data can be read
Out[3]: []
Expected behavior
The VERSION
in common.py
should be 0x01
, not 0x00
. If you change VERSION
to 0x01
, version()
returns the wrong reply [1]
for myCobot. It should be 1
for myCobot.
In [1]: from pymycobot import MyCobot
In [2]: mc = MyCobot("COM13", debug=True)
In [3]: mc.version()
03:19:13.736 DEBU [pymycobot.generate] _write: [254, 254, 2, 1, 250]
03:19:13.798 DEBU [pymycobot.generate] _read: b'\xfe\xfe\x03\x01\x01\xfa'
Out[3]: 1
Desktop (please complete the following information):
- OS: Windows 11
- Python: 3.10.1
- pymycobot: 2.7.4
- myCobot: myCobot 280 M5
- AtomMain: 4.1
- minirobot: 1.0
Confirmed to merge #31