brickpipe 0.3.2__tar.gz → 0.4.0__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: brickpipe
3
- Version: 0.3.2
3
+ Version: 0.4.0
4
4
  Summary: A json IPC interface for interacting with pybricks hubs
5
5
  License: GNU GENERAL PUBLIC LICENSE
6
6
  Version 3, 29 June 2007
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "brickpipe"
3
- version = "0.3.2"
3
+ version = "0.4.0"
4
4
  requires-python = ">=3.10"
5
5
  description = "A json IPC interface for interacting with pybricks hubs"
6
6
  readme = "README.md"
@@ -236,6 +236,7 @@ async def main_loop():
236
236
  hub = None
237
237
  hub_monitor_tasks = None
238
238
  ble_scan_stop_event = asyncio.Event()
239
+ ble_scanner_task = None
239
240
 
240
241
  while True:
241
242
  try:
@@ -250,6 +251,9 @@ async def main_loop():
250
251
  continue
251
252
 
252
253
  ble_scan_stop_event.set()
254
+ if ble_scanner_task:
255
+ await ble_scanner_task
256
+ ble_scanner_task = None
253
257
 
254
258
  match command.get('event_type'):
255
259
  case IncomingEventType.start_ble_scanning:
@@ -274,7 +278,7 @@ async def main_loop():
274
278
  except TimeoutError:
275
279
  pass
276
280
 
277
- asyncio.create_task(scan_ble(timeout))
281
+ ble_scanner_task = asyncio.create_task(scan_ble(timeout))
278
282
 
279
283
  case IncomingEventType.connect_to_hub:
280
284
  if hub:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: brickpipe
3
- Version: 0.3.2
3
+ Version: 0.4.0
4
4
  Summary: A json IPC interface for interacting with pybricks hubs
5
5
  License: GNU GENERAL PUBLIC LICENSE
6
6
  Version 3, 29 June 2007
File without changes
File without changes
File without changes