From 2aaffd8ba1ad4c2a534b5bf92f9909187906b7e4 Mon Sep 17 00:00:00 2001 From: Tempest Date: Mon, 4 Aug 2025 17:48:14 +0700 Subject: [PATCH] Re-sorted service list to ensure correct processing order --- src/controllerSoftware/run.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/controllerSoftware/run.py b/src/controllerSoftware/run.py index 36f22fb..3e4393f 100644 --- a/src/controllerSoftware/run.py +++ b/src/controllerSoftware/run.py @@ -75,7 +75,7 @@ async def connect_to_ble_device(device_name): else: print(f"Failed to connect to {target_device.name}") exit(1) - services = client.services + services = sorted(client.services, key=lambda serv: serv.handle) print("\n--- Services and Characteristics ---") for service in services: print(f"\nService: {service.uuid} (Handle: {service.handle}) - {service.description}")