meshcore 0.3__tar.gz → 0.3.2__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
3
- Version: 0.3
3
+ Version: 0.3.2
4
4
  Summary: Base classes for communicating with meshcore companion radios
5
5
  Project-URL: Homepage, https://github.com/fdlamotte/meshcore_py
6
6
  Project-URL: Issues, https://github.com/fdlamotte/meshcore_py/issues
@@ -18,5 +18,5 @@ Description-Content-Type: text/markdown
18
18
 
19
19
  Bindings to access your [MeshCore](https://meshcore.co.uk) companion radio nodes in python.
20
20
 
21
- Used by [mccli](https//github.com/fdlamotte/mccli).
21
+ Used by [mccli](https://github.com/fdlamotte/mccli).
22
22
 
@@ -2,5 +2,5 @@
2
2
 
3
3
  Bindings to access your [MeshCore](https://meshcore.co.uk) companion radio nodes in python.
4
4
 
5
- Used by [mccli](https//github.com/fdlamotte/mccli).
5
+ Used by [mccli](https://github.com/fdlamotte/mccli).
6
6
 
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "meshcore"
7
- version = "0.3"
7
+ version = "0.3.2"
8
8
  authors = [
9
9
  { name="Florent de Lamotte", email="florent@frizoncorrea.fr" },
10
10
  ]
@@ -376,6 +376,10 @@ class MeshCore:
376
376
  res["model"] = data[20:60].decode().replace("\0","")
377
377
  res["ver"] = data[60:80].decode().replace("\0","")
378
378
  self.result.set_result(res)
379
+ case 50: # cli response
380
+ res = {}
381
+ res["response"] = data[1:].decode()
382
+ self.result.set_result(res)
379
383
  # push notifications
380
384
  case 0x80:
381
385
  printerr ("Advertisment received")
@@ -624,3 +628,7 @@ class MeshCore:
624
628
  except TimeoutError :
625
629
  printerr("Timeout waiting ack")
626
630
  return False
631
+
632
+ async def send_cli(self, cmd):
633
+ data = b"\x32" + cmd.encode('ascii')
634
+ return await self.send(data)
File without changes