mirror of
https://github.com/pdxlocations/contact.git
synced 2026-05-09 06:44:27 +02:00
enhance Log Display
This commit is contained in:
@@ -293,6 +293,7 @@ def update_packetlog_win():
|
||||
for i, packet in enumerate(reversed(packet_buffer)):
|
||||
if i < height - 2:
|
||||
logString = f"ID: {packet['id']} From: {get_name_from_number(packet['from'])} To: {get_name_from_number(packet['to'])} Port: {packet['decoded']['portnum']} Payload: {packet['decoded']['payload']}"
|
||||
logString = logString[:width - 5] + '-' if len(logString) > width - 5 else logString
|
||||
packetlog_win.addstr(i+1, 1, logString.replace('\n', '').replace('\r', '') .strip())
|
||||
packetlog_win.refresh()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user