meshcore-cli 1.1.38__tar.gz → 1.1.40__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: meshcore-cli
3
- Version: 1.1.38
3
+ Version: 1.1.40
4
4
  Summary: Command line interface to meshcore companion radios
5
5
  Project-URL: Homepage, https://github.com/fdlamotte/meshcore-cli
6
6
  Project-URL: Issues, https://github.com/fdlamotte/meshcore-cli/issues
@@ -10,7 +10,7 @@ License-File: LICENSE
10
10
  Classifier: Operating System :: OS Independent
11
11
  Classifier: Programming Language :: Python :: 3
12
12
  Requires-Python: >=3.10
13
- Requires-Dist: meshcore>=2.1.17
13
+ Requires-Dist: meshcore>=2.1.19
14
14
  Requires-Dist: prompt-toolkit>=3.0.50
15
15
  Requires-Dist: requests>=2.28.0
16
16
  Description-Content-Type: text/markdown
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "meshcore-cli"
7
- version = "1.1.38"
7
+ version = "1.1.40"
8
8
  authors = [
9
9
  { name="Florent de Lamotte", email="florent@frizoncorrea.fr" },
10
10
  ]
@@ -17,7 +17,7 @@ classifiers = [
17
17
  ]
18
18
  license = "MIT"
19
19
  license-files = ["LICEN[CS]E*"]
20
- dependencies = [ "meshcore >= 2.1.17", "prompt_toolkit >= 3.0.50", "requests >= 2.28.0" ]
20
+ dependencies = [ "meshcore >= 2.1.19", "prompt_toolkit >= 3.0.50", "requests >= 2.28.0" ]
21
21
 
22
22
  [project.urls]
23
23
  Homepage = "https://github.com/fdlamotte/meshcore-cli"
@@ -23,7 +23,7 @@ from prompt_toolkit.shortcuts import radiolist_dialog
23
23
  from meshcore import MeshCore, EventType, logger
24
24
 
25
25
  # Version
26
- VERSION = "v1.1.38"
26
+ VERSION = "v1.1.40"
27
27
 
28
28
  # default ble address is stored in a config file
29
29
  MCCLI_CONFIG_DIR = str(Path.home()) + "/.config/meshcore/"
@@ -398,6 +398,7 @@ def make_completion_dict(contacts, pending={}, to=None, channels=None):
398
398
  "telemetry_mode_env" : {"always" : None, "device":None, "never":None},
399
399
  "advert_loc_policy" : {"none" : None, "share" : None},
400
400
  "auto_update_contacts" : {"on":None, "off":None},
401
+ "multi_acks" : {"on": None, "off":None},
401
402
  "max_attempts" : None,
402
403
  "max_flood_attempts" : None,
403
404
  "flood_after" : None,
@@ -424,6 +425,7 @@ def make_completion_dict(contacts, pending={}, to=None, channels=None):
424
425
  "telemetry_mode_env":None,
425
426
  "advert_loc_policy":None,
426
427
  "auto_update_contacts":None,
428
+ "multi_acks":None,
427
429
  "max_attempts":None,
428
430
  "max_flood_attempts":None,
429
431
  "flood_after":None,
@@ -1135,7 +1137,12 @@ async def print_disc_trace_to (mc, contact):
1135
1137
 
1136
1138
  for i in range(0, inp_l):
1137
1139
  elem = inp[2*i:2*(i+1)]
1138
- trace = elem if trace == "" else f"{trace},{elem}"
1140
+ if trace == "":
1141
+ trace = elem
1142
+ elif trace[-2:] != elem:
1143
+ trace = f"{trace},{elem}"
1144
+
1145
+ logger.info(f"Trying {trace}")
1139
1146
 
1140
1147
  await next_cmd(mc, ["trace", trace])
1141
1148
 
@@ -1384,6 +1391,13 @@ async def next_cmd(mc, cmds, json_output=False):
1384
1391
  print(f"Error : {res}")
1385
1392
  else :
1386
1393
  print(f"manual add contact: {mac}")
1394
+ case "multi_acks":
1395
+ ma = (cmds[2] == "on") or (cmds[2] == "true") or (cmds[2] == "yes") or (cmds[2] == "1")
1396
+ res = await mc.commands.set_multi_acks(ma)
1397
+ if res.type == EventType.ERROR:
1398
+ print(f"Error : {res}")
1399
+ else :
1400
+ print(f"multi_acks: {ma}")
1387
1401
  case "auto_update_contacts":
1388
1402
  auc = (cmds[2] == "on") or (cmds[2] == "true") or (cmds[2] == "yes") or (cmds[2] == "1")
1389
1403
  mc.auto_update_contacts=auc
@@ -1574,6 +1588,12 @@ async def next_cmd(mc, cmds, json_output=False):
1574
1588
  print(json.dumps(res.payload, indent=4))
1575
1589
  else:
1576
1590
  print(f"Using {res.payload['used_kb']}kB of {res.payload['total_kb']}kB")
1591
+ case "multi_acks" :
1592
+ await mc.commands.send_appstart()
1593
+ if json_output :
1594
+ print(json.dumps({"multi_acks" : mc.self_info["multi_acks"]}))
1595
+ else :
1596
+ print(f"multi_acks: {mc.self_info['multi_acks']}")
1577
1597
  case "manual_add_contacts" :
1578
1598
  await mc.commands.send_appstart()
1579
1599
  if json_output :
File without changes
File without changes
File without changes
File without changes
File without changes