Added the packer methods to keep simple the data reading and writing, as requested in the issue #61 , i've created three functions in the utils.py in order to simplify the data packing and unpacking while reading/writing some different data types like Float, Double, etc... (Data Types Here)
In everyday use, you can simply use those methods importing the utils.py module and read (for example) a float value like shown below:
f = data_unpacker(response, '>', 'f')
instead of:
f = struct.unpack('>f', struct.pack('>H', high_byte) + struct.pack('>H', low_byte)[0]
Coverage decreased (-1.3%) to 95.039% when pulling fd08bd9cbf51e0e184d6b017b299abfc91dd8a65 on Simonefardella:master into 0560a42308003f4072d988f28042b8d55b694ad4 on AdvancedClimateSystems:master.
Coverage decreased (-0.4%) to 95.921% when pulling dc1d82c160c0fcc649a995ca3299d6334f618779 on Simonefardella:master into 0560a42308003f4072d988f28042b8d55b694ad4 on AdvancedClimateSystems:master.
Added the packer methods to keep simple the data reading and writing, as requested in the issue #61 , i've created three functions in the utils.py in order to simplify the data packing and unpacking while reading/writing some different data types like Float, Double, etc... (Data Types Here)
In everyday use, you can simply use those methods importing the utils.py module and read (for example) a float value like shown below:
instead of: