mirror of
https://github.com/kavishdevar/librepods.git
synced 2026-03-02 20:53:38 +00:00
Receive adaptive anc notifications
This commit is contained in:
@@ -1,7 +1,4 @@
|
||||
from .Notifications import Notifications
|
||||
from .Capabilites import Capabilites
|
||||
from .enums import enums
|
||||
|
||||
import bluetooth
|
||||
import logging
|
||||
|
||||
@@ -25,6 +22,7 @@ class Connection:
|
||||
self.notifications = Notifications(self.socket, callback)
|
||||
self.notificationListener = self.notifications.notificationListener
|
||||
self.BatteryNotification = self.notifications.BatteryNotification
|
||||
self.ANCNotification = self.notifications.ANCNotification
|
||||
self.notifications.initialize()
|
||||
|
||||
def send(self, data: bytes):
|
||||
@@ -46,6 +44,10 @@ class Connection:
|
||||
logging = logging.getLogger("In-Ear Status")
|
||||
logging.debug(f'{self.notificationListener.EarDetectionNotification.getEarDetection()}')
|
||||
pass
|
||||
elif notification_type == Notifications.ANC_UPDATED:
|
||||
logging = logging.getLogger("ANC Status")
|
||||
logging.debug(f'{self.notificationListener.ANCNotification.getANC()}')
|
||||
pass
|
||||
elif notification_type == Notifications.UNKNOWN:
|
||||
logging = logging.getLogger("Unknown Notification")
|
||||
hex_data = ' '.join(f'{byte:02x}' for byte in data)
|
||||
|
||||
Reference in New Issue
Block a user