mirror of
https://github.com/meshcore-dev/meshcore_py.git
synced 2026-04-20 22:13:49 +00:00
correct SNR values in messages
This commit is contained in:
parent
d6cfc26689
commit
6a3da79af2
2 changed files with 3 additions and 3 deletions
|
|
@ -114,7 +114,7 @@ class MessageReader:
|
|||
elif packet_type_value == 16: # A reply to CMD_SYNC_NEXT_MESSAGE (ver >= 3)
|
||||
res = {}
|
||||
res["type"] = "PRIV"
|
||||
res["SNR"] = int.from_bytes(data[1:2], byteorder='little', signed=True) * 4
|
||||
res["SNR"] = int.from_bytes(data[1:2], byteorder='little', signed=True) / 4
|
||||
res["pubkey_prefix"] = data[4:10].hex()
|
||||
res["path_len"] = data[10]
|
||||
res["txt_type"] = data[11]
|
||||
|
|
@ -151,7 +151,7 @@ class MessageReader:
|
|||
elif packet_type_value == 17: # A reply to CMD_SYNC_NEXT_MESSAGE (ver >= 3)
|
||||
res = {}
|
||||
res["type"] = "CHAN"
|
||||
res["SNR"] = int.from_bytes(data[1:2], byteorder='little', signed=True) * 4
|
||||
res["SNR"] = int.from_bytes(data[1:2], byteorder='little', signed=True) / 4
|
||||
res["channel_idx"] = data[4]
|
||||
res["path_len"] = data[5]
|
||||
res["txt_type"] = data[6]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue