mirror of
https://github.com/SpudGunMan/meshing-around.git
synced 2026-08-07 09:22:44 +02:00
sysinfo
returns telemetry info
This commit is contained in:
@@ -28,6 +28,8 @@ retry_int2 = False
|
||||
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
|
||||
cmdHistory = [] # list to hold the last commands
|
||||
seenNodes = [] # list to hold the last seen nodes
|
||||
|
||||
# Read the config file, if it does not exist, create basic config file
|
||||
config = configparser.ConfigParser()
|
||||
|
||||
+14
-4
@@ -18,7 +18,6 @@ asyncLoop = asyncio.new_event_loop()
|
||||
games_enabled = False
|
||||
multiPingList = [{'message_from_id': 0, 'count': 0, 'type': '', 'deviceID': 0, 'channel_number': 0, 'startCount': 0}]
|
||||
|
||||
|
||||
# Ping Configuration
|
||||
if ping_enabled:
|
||||
# ping, pinging, ack, testing, test, pong
|
||||
@@ -28,9 +27,9 @@ if ping_enabled:
|
||||
|
||||
# Sitrep Configuration
|
||||
if sitrep_enabled:
|
||||
trap_list_sitrep = ("sitrep", "lheard")
|
||||
trap_list_sitrep = ("sitrep", "lheard", "sysinfo")
|
||||
trap_list = trap_list + trap_list_sitrep
|
||||
help_message = help_message + ", sitrep"
|
||||
help_message = help_message + ", sitrep, sysinfo"
|
||||
|
||||
# MOTD Configuration
|
||||
if motd_enabled:
|
||||
@@ -901,7 +900,18 @@ def consumeMetadata(packet, rxNode=0):
|
||||
if debugMetadata: print(f"DEBUG REMOTE_HARDWARE_APP: {packet}\n\n")
|
||||
# get the remote hardware data
|
||||
remote_hardware_data = packet['decoded']['remoteHardware']
|
||||
|
||||
|
||||
def get_sysinfo(nodeID=0, deviceID=1):
|
||||
# Get the system telemetry data for return on the sysinfo command
|
||||
sysinfo = ''
|
||||
stats = displayNodeTelemetry(nodeID, deviceID) + " 🤖👀" + str(len(seenNodes))
|
||||
# replace Telemetry with Int in string
|
||||
stats = stats.replace("Telemetry", "Int")
|
||||
sysinfo += f"📊{stats}"
|
||||
if interface2_enabled:
|
||||
sysinfo += f"📊{stats}"
|
||||
|
||||
return sysinfo
|
||||
|
||||
async def BroadcastScheduler():
|
||||
# handle schedule checks for the broadcast of messages
|
||||
|
||||
Reference in New Issue
Block a user