Skip to content

Commit

Permalink
Update p1meter_sym.py
Browse files Browse the repository at this point in the history
use utf-8 as pointed out in #5
  • Loading branch information
Josverl authored Jan 12, 2024
1 parent 83e52e8 commit 60309a9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/p1meter_sym.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def fake_message():

u = random.randint(-1000, 1000) /100
msg = msg.format(0, max(u, 0), -1*min(u, 0))
buf = bytearray(msg)
buf = bytearray(msg, 'utf8')
crc_computed = "{0:04X}".format(crc16(buf))
# log.debug("TX CRC16 buf : {}".format(buf))
log.debug("TX computed CRC {0}".format(crc_computed))
Expand Down

0 comments on commit 60309a9

Please sign in to comment.