mirror of
https://github.com/SpudGunMan/meshing-around.git
synced 2026-06-29 22:41:27 +02:00
hunting
This commit is contained in:
+3
-2
@@ -902,7 +902,7 @@ def onDisconnect(interface):
|
||||
elif interface2_enabled and interface2_type == 'ble':
|
||||
retry_int2 = True
|
||||
|
||||
numPacketsTx, numPacketsRx, numPacketsTxErr, numPacketsRxErr = [0,0], [0,0], [0,0], [0,0]
|
||||
numPacketsTx, numPacketsRx, numPacketsTxErr, numPacketsRxErr = ([-1, -1],) * 4
|
||||
def onReceive(packet, interface):
|
||||
# Priocess the incoming packet, handles the responses to the packet with auto_response()
|
||||
# Sends the packet to the correct handler for processing
|
||||
@@ -956,7 +956,8 @@ def onReceive(packet, interface):
|
||||
if telemetry_packet.get('localStats'):
|
||||
localStats = telemetry_packet['localStats']
|
||||
if localStats.get('numPacketsTx') and localStats.get('numPacketsRx') != 0:
|
||||
#print(f"numPacketsTx, numPacketsRx, numPacketsTxErr, numPacketsRxErr: {numPacketsTx}, {numPacketsRx}, {numPacketsTxErr}, {numPacketsRxErr}")
|
||||
if numPacketsRx != 0:
|
||||
print(f"numPacketsTx, numPacketsRx, numPacketsTxErr, numPacketsRxErr: {numPacketsTx}, {numPacketsRx}, {numPacketsTxErr}, {numPacketsRxErr}")
|
||||
# Assign the values and include rxNode
|
||||
numPacketsTx = (localStats['numPacketsTx'], rxNode)
|
||||
numPacketsRx = (localStats['numPacketsRx'], rxNode)
|
||||
|
||||
+1
-1
@@ -700,7 +700,7 @@ def getNodeTelemetry(nodeID=0, rxNode=1):
|
||||
|
||||
# packet telemetry
|
||||
if numPacketsRx != 0:
|
||||
print(f"sys numPacketsTx, numPacketsRx, numPacketsTxErr, numPacketsRxErr: {numPacketsTx}, {numPacketsRx}, {numPacketsTxErr}, {numPacketsRxErr}")
|
||||
print(f"set new value numPacketsTx, numPacketsRx, numPacketsTxErr, numPacketsRxErr: {numPacketsTx}, {numPacketsRx}, {numPacketsTxErr}, {numPacketsRxErr}")
|
||||
if numPacketsTx[1] == 1:
|
||||
dataResponse += f"Telemetry:{rxNode} numPacketsTx:{numPacketsTx[0]} numPacketsRx:{numPacketsRx[0]} numPacketsTxErr:{numPacketsTxErr[0]} numPacketsRxErr:{numPacketsRxErr[0]}"
|
||||
elif numPacketsTx[1] == 2:
|
||||
|
||||
Reference in New Issue
Block a user