mnl100: fix checksum
This commit is contained in:
parent
6e2b094d43
commit
694daf4822
@ -6,7 +6,7 @@ def main():
|
||||
with serial.Serial("/dev/cuaU0", timeout=1., exclusive=True) as port:
|
||||
def transact(rdu):
|
||||
telegram = b"#!@" + rdu
|
||||
telegram += bytes("{:02X}".format(sum(telegram)), "ascii")
|
||||
telegram += bytes("{:02X}".format(sum(telegram) & 0xff), "ascii")
|
||||
telegram += b"\r"
|
||||
port.write(telegram)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user