mirror of
https://github.com/SpudGunMan/meshing-around.git
synced 2026-06-23 19:41:34 +02:00
Telemetry
new telemetry line
This commit is contained in:
@@ -27,7 +27,6 @@ scheduler_enabled = False # enable the scheduler currently config via code only
|
||||
wiki_return_limit = 3 # limit the number of sentences returned off the first paragraph first hit
|
||||
playingGame = False
|
||||
GAMEDELAY = 28800 # 8 hours in seconds for game mode holdoff
|
||||
multiPingList = [{'message_from_id': 0, 'count': 0, 'type': '', 'deviceID': 0}]
|
||||
|
||||
# Read the config file, if it does not exist, create basic config file
|
||||
config = configparser.ConfigParser()
|
||||
|
||||
+13
-5
@@ -15,6 +15,7 @@ trap_list = ("cmd","cmd?") # default trap list
|
||||
help_message = "CMD?:"
|
||||
asyncLoop = asyncio.new_event_loop()
|
||||
games_enabled = False
|
||||
multiPingList = [{'message_from_id': 0, 'count': 0, 'type': '', 'deviceID': 0}]
|
||||
|
||||
# Ping Configuration
|
||||
if ping_enabled:
|
||||
@@ -868,7 +869,8 @@ async def handleSentinel(deviceID=1, loop=0):
|
||||
sentry_loop += 1
|
||||
|
||||
async def watchdog():
|
||||
global retry_int1, retry_int2, int1Data, int2Data
|
||||
global retry_int1, retry_int2
|
||||
int1Data, int2Data = "", ""
|
||||
while True:
|
||||
await asyncio.sleep(20)
|
||||
#print(f"MeshBot System: watchdog running\r", end="")
|
||||
@@ -889,8 +891,11 @@ async def watchdog():
|
||||
# multiPing handler
|
||||
handleMultiPing(0,1)
|
||||
|
||||
# status data
|
||||
int1Data = f" int1:{firmware}, Nodes:{len(interface1.nodes)}, Telemetry:{getNodeTelemetry(0, 1)}"
|
||||
# Telemetry data
|
||||
tmp = int1Data
|
||||
int1Data = f"int1:{firmware}, Nodes:{len(interface1.nodes)}, Telemetry:{getNodeTelemetry(0, 1)}"
|
||||
if tmp[:-4] != int1Data[:-4]:
|
||||
logger.debug(f"System: {int1Data}")
|
||||
|
||||
if retry_int1:
|
||||
try:
|
||||
@@ -915,8 +920,11 @@ async def watchdog():
|
||||
# multiPing handler
|
||||
handleMultiPing(0,2)
|
||||
|
||||
# status data
|
||||
int2Data = f" int2:{firmware2}, Nodes:{len(interface2.nodes)}, Telemetry:{getNodeTelemetry(0, 2)}"
|
||||
# Telemetry data
|
||||
tmp = int2Data[:-4]
|
||||
int2Data = f"int2:{firmware2}, Nodes:{len(interface2.nodes)}, Telemetry:{getNodeTelemetry(0, 2)}"
|
||||
if tmp[:-4] != int2Data[:-4]:
|
||||
logger.debug(f"System: {int2Data}")
|
||||
|
||||
if retry_int2:
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user