Include SNR and RSSI in logline

This commit is contained in:
Alec K2XAP 2026-01-07 12:45:28 -05:00
parent 75f92bf24d
commit 0141f9853d

View file

@ -21,6 +21,24 @@ type SpreadFactor = Literal[5,6,7,8,9,10,11,12]
type CodingRate = Literal[5,6,7,8] type CodingRate = Literal[5,6,7,8]
type Station = Literal['A','B','C','D'] type Station = Literal['A','B','C','D']
class TextMessageApp(TypedDict):
portnum: Literal['TEXT_MESSAGE_APP']
payload: bytes
bitfield: Literal[0,1]
text: str
Packet = TypedDict('Packet', {
'from': int,
'to': int,
'decoded': TextMessageApp,
'id': int,
'rxSnr': float,
'rxRssi': int,
'raw': object,
'fromId': str | None,
'toId': str,
})
class Config(TypedDict): class Config(TypedDict):
test_case_duration : int test_case_duration : int
test_case_padding : int test_case_padding : int
@ -238,6 +256,8 @@ def onReceiveText (packet, interface):
event = 'received', event = 'received',
packet_id = packet['id'], packet_id = packet['id'],
text = packet['decoded']['payload'].decode('utf-8'), text = packet['decoded']['payload'].decode('utf-8'),
rx_snr = packet['rxSnr'],
rx_rssi = packet['rxRssi'],
) )