mirror of
https://github.com/meshcore-dev/meshcore-cli.git
synced 2026-04-20 22:13:48 +00:00
refresh infos when getting parameters
This commit is contained in:
parent
b53b31682d
commit
53f89c84c5
2 changed files with 6 additions and 1 deletions
|
|
@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|||
|
||||
[project]
|
||||
name = "meshcore-cli"
|
||||
version = "0.6.12"
|
||||
version = "0.6.13"
|
||||
authors = [
|
||||
{ name="Florent de Lamotte", email="florent@frizoncorrea.fr" },
|
||||
]
|
||||
|
|
|
|||
|
|
@ -661,21 +661,25 @@ async def next_cmd(mc, cmds, json_output=False):
|
|||
else:
|
||||
print(f"{'on' if process_event_message.print_snr else 'off'}")
|
||||
case "name":
|
||||
await mc.commands.send_appstart()
|
||||
if json_output :
|
||||
print(json.dumps(mc.self_info["name"]))
|
||||
else:
|
||||
print(mc.self_info["name"])
|
||||
case "tx":
|
||||
await mc.commands.send_appstart()
|
||||
if json_output :
|
||||
print(json.dumps(mc.self_info["tx_power"]))
|
||||
else:
|
||||
print(mc.self_info["tx_power"])
|
||||
case "coords":
|
||||
await mc.commands.send_appstart()
|
||||
if json_output :
|
||||
print(json.dumps({"lat": mc.self_info["adv_lat"], "lon":mc.self_info["adv_lon"]}))
|
||||
else:
|
||||
print(f"{mc.self_info['adv_lat']},{mc.self_info['adv_lon']}")
|
||||
case "radio":
|
||||
await mc.commands.send_appstart()
|
||||
if json_output :
|
||||
print(json.dumps(
|
||||
{"radio_freq": mc.self_info["radio_freq"],
|
||||
|
|
@ -1001,6 +1005,7 @@ async def next_cmd(mc, cmds, json_output=False):
|
|||
print("]")
|
||||
|
||||
case "infos" | "i" :
|
||||
await mc.commands.send_appstart()
|
||||
print(json.dumps(mc.self_info,indent=4))
|
||||
|
||||
case "advert" | "a":
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue