From cf4b51a297d2f3ed8b36e70027326664d1cec480 Mon Sep 17 00:00:00 2001 From: SpudGunMan Date: Sun, 6 Oct 2024 16:35:01 -0700 Subject: [PATCH] fixes --- logs/README.md | 2 +- mesh_bot.py | 2 +- modules/system.py | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/logs/README.md b/logs/README.md index ab6e669..82e0be6 100644 --- a/logs/README.md +++ b/logs/README.md @@ -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/ diff --git a/mesh_bot.py b/mesh_bot.py index a47442d..e73c141 100755 --- a/mesh_bot.py +++ b/mesh_bot.py @@ -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) diff --git a/modules/system.py b/modules/system.py index 70bf97c..aee91f9 100644 --- a/modules/system.py +++ b/modules/system.py @@ -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