meshcore 0.4__tar.gz → 0.4.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.4
3
+ Version: 0.4.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
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "meshcore"
7
- version = "0.4"
7
+ version = "0.4.2"
8
8
  authors = [
9
9
  { name="Florent de Lamotte", email="florent@frizoncorrea.fr" },
10
10
  ]
@@ -233,9 +233,12 @@ class MeshCore:
233
233
  async def send_device_qeury(self):
234
234
  return await self.send(b"\x16\x03");
235
235
 
236
- async def send_advert(self):
236
+ async def send_advert(self, flood=False):
237
237
  """ Make the node send an advertisement """
238
- return await self.send(b"\x07")
238
+ if flood :
239
+ return await self.send(b"\x07\x01")
240
+ else :
241
+ return await self.send(b"\x07")
239
242
 
240
243
  async def set_name(self, name):
241
244
  """ Changes the name of the node """
@@ -345,6 +348,11 @@ class MeshCore:
345
348
  printerr ("Timeout ...")
346
349
  return False
347
350
 
351
+ async def send_logout(self, dst):
352
+ self.login_resp = asyncio.Future()
353
+ data = b"\x1d" + dst
354
+ return await self.send(data)
355
+
348
356
  async def send_statusreq(self, dst):
349
357
  self.status_resp = asyncio.Future()
350
358
  data = b"\x1b" + dst
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes