mirror of
https://github.com/SpudGunMan/meshing-around.git
synced 2026-07-03 08:21:40 +02:00
Update mesh_bot.py
This commit is contained in:
+1
-2
@@ -848,12 +848,11 @@ def onReceive(packet, interface):
|
||||
# deviceMetrics = telemetry_packet['deviceMetrics']
|
||||
# #print(f"DEBUG deviceMetrics: {deviceMetrics}")
|
||||
if telemetry_packet.get('localStats'):
|
||||
print(f"DEBUG localStats: {telemetry_packet}")
|
||||
#print(f"DEBUG localStats: {telemetry_packet}")
|
||||
localStats = telemetry_packet['localStats']
|
||||
# Check if 'numPacketsTx' and 'numPacketsRx' exist and are not zero
|
||||
if localStats.get('numPacketsTx') is not None and localStats.get('numPacketsRx') is not None and localStats['numPacketsTx'] != -1:
|
||||
# Assign the values to the telemetry dictionary
|
||||
print(f"DEBUG match: {localStats}")
|
||||
if localStats.get('numPacketsTx') is not None:
|
||||
telemetryData[rxNode]['numPacketsTx'] = localStats.get('numPacketsTx')
|
||||
if localStats.get('numPacketsRx') is not None:
|
||||
|
||||
Reference in New Issue
Block a user