Update system.py

This commit is contained in:
SpudGunMan
2024-10-06 18:34:46 -07:00
parent 775c54566c
commit c18d56dac5
+2 -2
View File
@@ -671,10 +671,10 @@ def getNodeFirmware(nodeID=0, nodeInt=1):
def getNodeTelemetry(nodeID=0, rxNode=0):
global lastTelemetryRequest, numPacketsTx, numPacketsRx, numPacketsTxErr, numPacketsRxErr
if numPacketsRx != [-1, -1]:
print(f"watchDog numPacketsTx, numPacketsRx, numPacketsTxErr, numPacketsRxErr: {numPacketsTx}, {numPacketsRx}, {numPacketsTxErr}, {numPacketsRxErr}")
# throttle the telemetry requests to prevent spamming the device
if time.time() - lastTelemetryRequest < 1200:
if numPacketsRx[1] != -1:
print(f"watchDog numPacketsTx, numPacketsRx, numPacketsTxErr, numPacketsRxErr: {numPacketsTx}, {numPacketsRx}, {numPacketsTxErr}, {numPacketsRxErr}")
return -1
lastTelemetryRequest = time.time()
# get the telemetry data for a node