Closed alihamdan closed 1 year ago
The commit type checking with mypy introduced a regression where Float payloads with function code 16 no longer accept integer values. This behavior is caused by this assert statement https://github.com/pyhys/minimalmodbus/blob/185afffd2d65b585f69bc5e3f640270d2bd27444/minimalmodbus.py#L1619-L1621
I believe this should allow int values as the underlying struct.pack handles the conversion.
struct.pack
Fixed in the latest release. Thanks for the report!
The commit type checking with mypy introduced a regression where Float payloads with function code 16 no longer accept integer values. This behavior is caused by this assert statement https://github.com/pyhys/minimalmodbus/blob/185afffd2d65b585f69bc5e3f640270d2bd27444/minimalmodbus.py#L1619-L1621
I believe this should allow int values as the underlying
struct.pack
handles the conversion.