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]
|
[project]
|
||||||
name = "meshcore-cli"
|
name = "meshcore-cli"
|
||||||
version = "0.6.12"
|
version = "0.6.13"
|
||||||
authors = [
|
authors = [
|
||||||
{ name="Florent de Lamotte", email="florent@frizoncorrea.fr" },
|
{ name="Florent de Lamotte", email="florent@frizoncorrea.fr" },
|
||||||
]
|
]
|
||||||
|
|
|
||||||
|
|
@ -661,21 +661,25 @@ async def next_cmd(mc, cmds, json_output=False):
|
||||||
else:
|
else:
|
||||||
print(f"{'on' if process_event_message.print_snr else 'off'}")
|
print(f"{'on' if process_event_message.print_snr else 'off'}")
|
||||||
case "name":
|
case "name":
|
||||||
|
await mc.commands.send_appstart()
|
||||||
if json_output :
|
if json_output :
|
||||||
print(json.dumps(mc.self_info["name"]))
|
print(json.dumps(mc.self_info["name"]))
|
||||||
else:
|
else:
|
||||||
print(mc.self_info["name"])
|
print(mc.self_info["name"])
|
||||||
case "tx":
|
case "tx":
|
||||||
|
await mc.commands.send_appstart()
|
||||||
if json_output :
|
if json_output :
|
||||||
print(json.dumps(mc.self_info["tx_power"]))
|
print(json.dumps(mc.self_info["tx_power"]))
|
||||||
else:
|
else:
|
||||||
print(mc.self_info["tx_power"])
|
print(mc.self_info["tx_power"])
|
||||||
case "coords":
|
case "coords":
|
||||||
|
await mc.commands.send_appstart()
|
||||||
if json_output :
|
if json_output :
|
||||||
print(json.dumps({"lat": mc.self_info["adv_lat"], "lon":mc.self_info["adv_lon"]}))
|
print(json.dumps({"lat": mc.self_info["adv_lat"], "lon":mc.self_info["adv_lon"]}))
|
||||||
else:
|
else:
|
||||||
print(f"{mc.self_info['adv_lat']},{mc.self_info['adv_lon']}")
|
print(f"{mc.self_info['adv_lat']},{mc.self_info['adv_lon']}")
|
||||||
case "radio":
|
case "radio":
|
||||||
|
await mc.commands.send_appstart()
|
||||||
if json_output :
|
if json_output :
|
||||||
print(json.dumps(
|
print(json.dumps(
|
||||||
{"radio_freq": mc.self_info["radio_freq"],
|
{"radio_freq": mc.self_info["radio_freq"],
|
||||||
|
|
@ -1001,6 +1005,7 @@ async def next_cmd(mc, cmds, json_output=False):
|
||||||
print("]")
|
print("]")
|
||||||
|
|
||||||
case "infos" | "i" :
|
case "infos" | "i" :
|
||||||
|
await mc.commands.send_appstart()
|
||||||
print(json.dumps(mc.self_info,indent=4))
|
print(json.dumps(mc.self_info,indent=4))
|
||||||
|
|
||||||
case "advert" | "a":
|
case "advert" | "a":
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue