This commit is contained in:
SpudGunMan
2024-10-06 16:35:01 -07:00
parent 124d5af2f2
commit cf4b51a297
3 changed files with 3 additions and 4 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
Logs will collect here. Give a day of logs or a bunch of messages to have good reports.
Reporting is via [../etc/report_generator5.py](../etc/report_generator5.py), run it from the etc/ working directory. The report_generator5 has newer feel and HTML5 coding. The index.html output is published in [../etc/www](../etc/www) there is a .cfg file created on first run for configuring values as needed.
Reporting is via [../etc/report_generator5.py](../etc/report_generator5.py). The report_generator5 has newer feel and HTML5 coding. The index.html output is published in [../etc/www](../etc/www) there is a .cfg file created on first run for configuring values as needed.
- `multi_log_reader = True` on by default will read all logs (or set to false to return daily logs)
- Make sure to have `SyslogToFile = True` and default of DEBUG log level to fully enable reporting! ‼️
- provided serviceTimer templates in etc/
+1 -1
View File
@@ -957,7 +957,7 @@ def onReceive(packet, interface):
localStats = telemetry_packet['localStats']
if localStats.get('numPacketsTx') and localStats.get('numPacketsRx') != 0:
if numPacketsRx != 0:
print(f"numPacketsTx, numPacketsRx, numPacketsTxErr, numPacketsRxErr: {numPacketsTx}, {numPacketsRx}, {numPacketsTxErr}, {numPacketsRxErr}")
print(f"injest numPacketsTx, numPacketsRx, numPacketsTxErr, numPacketsRxErr: {numPacketsTx}, {numPacketsRx}, {numPacketsTxErr}, {numPacketsRxErr}")
# Assign the values and include rxNode
numPacketsTx = (localStats['numPacketsTx'], rxNode)
numPacketsRx = (localStats['numPacketsRx'], rxNode)
+1 -2
View File
@@ -17,7 +17,6 @@ asyncLoop = asyncio.new_event_loop()
games_enabled = False
multiPingList = [{'message_from_id': 0, 'count': 0, 'type': '', 'deviceID': 0}]
lastTelemetryRequest = 0
numPacketsTx, numPacketsRx, numPacketsTxErr, numPacketsRxErr = 0, 0, 0, 0
# Ping Configuration
if ping_enabled:
@@ -672,7 +671,7 @@ def getNodeTelemetry(nodeID=0, rxNode=1):
global lastTelemetryRequest, numPacketsTx, numPacketsRx, numPacketsTxErr, numPacketsRxErr
# throttle the telemetry requests to prevent spamming the device
if time.time() - lastTelemetryRequest < 1200:
print(f"numPacketsTx, numPacketsRx, numPacketsTxErr, numPacketsRxErr: {numPacketsTx}, {numPacketsRx}, {numPacketsTxErr}, {numPacketsRxErr}")
print(f"watchDog numPacketsTx, numPacketsRx, numPacketsTxErr, numPacketsRxErr: {numPacketsTx}, {numPacketsRx}, {numPacketsTxErr}, {numPacketsRxErr}")
return -1
lastTelemetryRequest = time.time()
# get the telemetry data for a node