mirror of
https://github.com/meshcore-dev/meshcore-cli.git
synced 2026-04-20 22:13:48 +00:00
follow binary commands refactor
This commit is contained in:
parent
d01cdfb73a
commit
8657ac7a96
2 changed files with 6 additions and 6 deletions
|
|
@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|||
|
||||
[project]
|
||||
name = "meshcore-cli"
|
||||
version = "1.1.11"
|
||||
version = "1.2.0"
|
||||
authors = [
|
||||
{ name="Florent de Lamotte", email="florent@frizoncorrea.fr" },
|
||||
]
|
||||
|
|
@ -17,7 +17,7 @@ classifiers = [
|
|||
]
|
||||
license = "MIT"
|
||||
license-files = ["LICEN[CS]E*"]
|
||||
dependencies = [ "meshcore >= 2.0.4", "prompt_toolkit >= 3.0.50", "requests >= 2.28.0" ]
|
||||
dependencies = [ "meshcore >= 2.1.0", "prompt_toolkit >= 3.0.50", "requests >= 2.28.0" ]
|
||||
|
||||
[project.urls]
|
||||
Homepage = "https://github.com/fdlamotte/meshcore-cli"
|
||||
|
|
|
|||
|
|
@ -1565,7 +1565,7 @@ async def next_cmd(mc, cmds, json_output=False):
|
|||
await mc.ensure_contacts()
|
||||
contact = mc.get_contact_by_name(cmds[1])
|
||||
timeout = 0 if not "timeout" in contact else contact["timeout"]
|
||||
res = await mc.commands.binary.req_telemetry(contact, timeout)
|
||||
res = await mc.commands.req_telemetry(contact, timeout)
|
||||
if res is None :
|
||||
if json_output :
|
||||
print(json.dumps({"error" : "Getting data"}))
|
||||
|
|
@ -1595,7 +1595,7 @@ async def next_cmd(mc, cmds, json_output=False):
|
|||
else :
|
||||
to_secs = int(cmds[3]) * 60
|
||||
timeout = 0 if not "timeout" in contact else contact["timeout"]
|
||||
res = await mc.commands.binary.req_mma(contact, from_secs, to_secs, timeout)
|
||||
res = await mc.commands.req_mma(contact, from_secs, to_secs, timeout)
|
||||
if res is None :
|
||||
if json_output :
|
||||
print(json.dumps({"error" : "Getting data"}))
|
||||
|
|
@ -1609,7 +1609,7 @@ async def next_cmd(mc, cmds, json_output=False):
|
|||
await mc.ensure_contacts()
|
||||
contact = mc.get_contact_by_name(cmds[1])
|
||||
timeout = 0 if not "timeout" in contact else contact["timeout"]
|
||||
res = await mc.commands.binary.req_acl(contact, timeout)
|
||||
res = await mc.commands.req_acl(contact, timeout)
|
||||
if res is None :
|
||||
if json_output :
|
||||
print(json.dumps({"error" : "Getting data"}))
|
||||
|
|
@ -1634,7 +1634,7 @@ async def next_cmd(mc, cmds, json_output=False):
|
|||
await mc.ensure_contacts()
|
||||
contact = mc.get_contact_by_name(cmds[1])
|
||||
timeout = 0 if not "timeout" in contact else contact["timeout"]
|
||||
res = await mc.commands.binary.req_binary(contact, bytes.fromhex(cmds[2]), timeout)
|
||||
res = await mc.commands.req_binary(contact, bytes.fromhex(cmds[2]), timeout)
|
||||
if res is None :
|
||||
if json_output :
|
||||
print(json.dumps({"error" : "Getting binary data"}))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue