Closed mycroes closed 1 year ago
Hi @mycroes!
Thank you for reporting this, it indeed seems to be a bug! Also by looking at ADS_DATA_TYPE_FLAGS
we can see that these values go over 16 bits.
I will merge your pull request, thanks.
Your library looks nice, keep up the good work!
You're welcome! It's actually not my library, as in, I'm not the original author. However, I've recently acquired ownership of the GitHub repository and am in the process of expanding and refactoring the library to make it well-suited and performant for professional use.
I fixed at least one issue by using your code as reference and I'm making use of a lot of the other code to implement (or extend) things like retrieving symbols and datatypes. I still have to tackle updates to symbols though, but I guess your library provides enough information to handle that as well. So again, a big thanks for the detailed implementation, I'll put it to good use!
Sounds good! Let me know if you have any issues by email, for example. It's always interesting to help.
In the following excerpt from
_parseDataType
:The offsets in the comments are off by one starting at Flags (should have been
28..31
) and flags is parsed usingreadUInt16LE
, whileADS_DATA_TYPE_FLAGS
actually contains values > 16 bits.pos
is incremented by 4, so it's mostly comments that are messed up.Noticed this while expanding the AdsClient library, so big thank you for the detailed implementation.