int16 decode test
This commit is contained in:
parent
fec99b0fe8
commit
5db75db8cb
1 changed files with 4 additions and 0 deletions
|
@ -9,6 +9,10 @@ class TestDataTypes(unittest.TestCase):
|
|||
int16_buffer = froniusreg.int16.encode_to_buffer(1024)
|
||||
assert int16_buffer == [b"\x04\x00"]
|
||||
|
||||
def test_int16_decode(self):
|
||||
int16_register = [0x0, 0x1, 0x0, 0x0, 0x0, 0x5, 0x1, 0x3, 0x2, 0x0, 0x0]
|
||||
output = froniusreg.int16.decode_from_register(int16_register)
|
||||
assert output == 0
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
|
Loading…
Reference in a new issue