mirror of
https://github.com/markqvist/Sideband.git
synced 2025-07-22 06:29:14 -04:00
Implemented advanced telemetry configuration
This commit is contained in:
parent
a78a773886
commit
ab15093ec8
7 changed files with 331 additions and 168 deletions
|
@ -193,13 +193,18 @@ class Messages():
|
|||
pass
|
||||
|
||||
if "lxm" in m and m["lxm"] != None and m["lxm"].fields != None and LXMF.FIELD_COMMANDS in m["lxm"].fields:
|
||||
commands = m["lxm"].fields[LXMF.FIELD_COMMANDS]
|
||||
for command in commands:
|
||||
if Commands.ECHO in command:
|
||||
extra_content = "[font=RobotoMono-Regular]> echo "+command[Commands.ECHO].decode("utf-8")+"[/font]\n"
|
||||
if Commands.SIGNAL_REPORT in command:
|
||||
extra_content = "[font=RobotoMono-Regular]> sig[/font]\n"
|
||||
extra_content = extra_content[:-1]
|
||||
try:
|
||||
commands = m["lxm"].fields[LXMF.FIELD_COMMANDS]
|
||||
for command in commands:
|
||||
if Commands.ECHO in command:
|
||||
extra_content = "[font=RobotoMono-Regular]> echo "+command[Commands.ECHO].decode("utf-8")+"[/font]\n"
|
||||
if Commands.PING in command:
|
||||
extra_content = "[font=RobotoMono-Regular]> ping[/font]\n"
|
||||
if Commands.SIGNAL_REPORT in command:
|
||||
extra_content = "[font=RobotoMono-Regular]> sig[/font]\n"
|
||||
extra_content = extra_content[:-1]
|
||||
except Exception as e:
|
||||
RNS.log("Error while generating command display: "+str(e), RNS.LOG_ERROR)
|
||||
|
||||
if telemeter == None and "lxm" in m and m["lxm"] and m["lxm"].fields != None and LXMF.FIELD_TELEMETRY in m["lxm"].fields:
|
||||
try:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue