mirror of
https://github.com/meshcore-dev/meshcore_py.git
synced 2026-06-11 11:56:18 +00:00
Merge pull request #14 from Cisien/cisien/add-rx-airtime
Add support for reading the rx airtime field
This commit is contained in:
@@ -330,6 +330,7 @@ class MessageReader:
|
|||||||
res["last_snr"] = int.from_bytes(data[50:52], byteorder='little', signed=True) / 4
|
res["last_snr"] = int.from_bytes(data[50:52], byteorder='little', signed=True) / 4
|
||||||
res["direct_dups"] = int.from_bytes(data[52:54], byteorder='little')
|
res["direct_dups"] = int.from_bytes(data[52:54], byteorder='little')
|
||||||
res["flood_dups"] = int.from_bytes(data[54:56], byteorder='little')
|
res["flood_dups"] = int.from_bytes(data[54:56], byteorder='little')
|
||||||
|
res["rx_airtime"] = int.from_bytes(data[56:60], byteorder='little')
|
||||||
|
|
||||||
data_hex = data[8:].hex()
|
data_hex = data[8:].hex()
|
||||||
logger.debug(f"Status response: {data_hex}")
|
logger.debug(f"Status response: {data_hex}")
|
||||||
|
|||||||
Reference in New Issue
Block a user