mirror of
https://github.com/mikecarper/MeshCore.git
synced 2026-10-22 10:52:30 +00:00
Keep Companion get radio compatible with upstream CSV
This commit is contained in:
1 parent
31aa17b9e5
commit
cab781f9a4
4 files changed
+29
-3
No files matched your search
@@ -102,6 +102,12 @@ async def check_commands(client, args):
|
||||
raise RuntimeError("Unexpected firmware: " + reply)
|
||||
if "Unknown command" in reply or "Not Supported" in reply:
|
||||
raise RuntimeError(reply)
|
||||
if cmd == "get radio":
|
||||
fields = reply.removeprefix("> ").split(",")
|
||||
if len(fields) != 4:
|
||||
raise RuntimeError("Radio reply must have exactly four upstream fields: " + reply)
|
||||
# Reject annotations as well as extra CSV fields.
|
||||
float(fields[0]); float(fields[1]); int(fields[2]); int(fields[3])
|
||||
report("app_cli", command=cmd, trailing_nul=True, reply=reply)
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user