Closed caldweln closed 4 years ago
replacing pull request #14
Hey @caldweln,
This looks good now! Thanks for the fix. May I ask you for a favor? In order to speedup pushing these fixes on the PyPI would you mind doing any of the following things:
Send pull request on branch bugfix-v1.0.1
Writing test in https://github.com/iicsys/pypmu/blob/master/tests/validate_frames.py You will need to prepare ConfigFrame and DataFrame where the frequency is in floating-point format. Try to get the hex representation of the data frame and unpack it using the config frame. Then, convert the data frame object to a hex string and make sure that you get the same hex representation that you started with. You can get an initial hex string using Wireshark, just make sure it is a valid data frame.
We have one more simple issue #7. Not sure if this is resolved on bugfix-v1.0.1
but it is worth checking.
Thanks one more time for fixing the issue. Please note that it is enough to create pull request on bugfix-v1.0.1
and I will accept it immediately. Trying to find some time to push these fixes on master
that is why writing tests would help me a lot as well.
Cheers,
@sstevan moving to bugfix branch.
IEEE Std C37.118.2-2011 Table 6 states FREQ is the frequency deviation, unless 32bit floating pt. In the case of 16bit float it's the deviation and we unpack and restore nominal offset. In the case of 32bit float it's the actual value and we unpack without adjustment. Also not necessary to restrict to +/- 32.767Hz as it is with 16bit integer.