feat: Refactor binary commands and apply BLE fixes

Refactored the BinaryCommandHandler to align with the other command handlers, inheriting from CommandHandlerBase. This resolves an AttributeError and simplifies the command structure. Moved binary_commands.py into the commands module. Applied fixes to the BLE connection handler based on feedback, improving reliability on macOS and ensuring the device address is correctly handled.
This commit is contained in:
Ventz Petkov 2025-08-05 15:31:54 -04:00
parent c19fd166f8
commit 36727f4ea3
22 changed files with 1603 additions and 1206 deletions

View file

@ -1,5 +1,6 @@
from enum import Enum
# Packet prefixes for the protocol
class PacketType(Enum):
OK = 0
@ -26,7 +27,7 @@ class PacketType(Enum):
CUSTOM_VARS = 21
BINARY_REQ = 50
FACTORY_RESET = 51
# Push notifications
ADVERTISEMENT = 0x80
PATH_UPDATE = 0x81