Korving-F / ublox

Python library for the UBX protocol
MIT License
37 stars 14 forks source link

Bug in a read function #1

Closed nisarg09 closed 4 years ago

nisarg09 commented 6 years ago

read function compares bytes with string data type for "0xb5" == 'b5' and causes issue in functioning. Please check.

Korving-F commented 6 years ago

python2 vs. python3 problem? I'll try to look into it soon; sorry for the delay!

Korving-F commented 5 years ago

Looking at the code it seems indeed a little volatile being both dependent on specific python and pyserial versions. However I tried to reproduce errors concerning this part of the code and could not do so immediately. Both v2.7.12 and v3.5.2 work in my environment, and correct environment variables get set to accommodate different behavior of pyserial read() function across old/new versions.

I'm sure I'm missing something concerning the old pyserial behavior (which is not recommended to be used anymore anyways) or something else obvious. No time to debug it though at the moment; sorry. But if you have more information please post it here and I'll look at it when I can. ^_^

P.s. I did just patch it for python3 though (See #3 ).