diff --git a/README.md b/README.md index a724f44..65a2049 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,7 @@ Features: - Open source and free forever Supported devices: +- HUAWEI FreeBuds SE - HUAWEI FreeBuds 4i - HUAWEI FreeLace Pro - HONOR Earbuds 2 Lite diff --git a/docs/research.ods b/docs/research.ods new file mode 100644 index 0000000..ef0db39 Binary files /dev/null and b/docs/research.ods differ diff --git a/src/openfreebuds/device/huawei/__init__.py b/src/openfreebuds/device/huawei/__init__.py index c72ed58..64dfc05 100644 --- a/src/openfreebuds/device/huawei/__init__.py +++ b/src/openfreebuds/device/huawei/__init__.py @@ -1,8 +1,9 @@ -from openfreebuds.device.huawei.profiles import FreeLaceProDevice, FreeBuds4iDevice +from openfreebuds.device.huawei.profiles import FreeLaceProDevice, FreeBuds4iDevice, FreeBudsSEDevice profiles = { "HUAWEI FreeBuds 4i": FreeBuds4iDevice, "HUAWEI FreeLace Pro": FreeLaceProDevice, + "HUAWEI FreeBuds SE" : FreeBudsSEDevice } # (implementation_level, profile) @@ -10,6 +11,7 @@ "HUAWEI FreeBuds 4i": ("full", FreeBuds4iDevice), "HONOR Earbuds 2 Lite": ("full", FreeBuds4iDevice), "HUAWEI FreeLace Pro": ("full", FreeLaceProDevice), + "HUAWEI FreeBuds SE": ("full", FreeBudsSEDevice), "HUAWEI FreeBuds 5i": ("partial", FreeBuds4iDevice), "HUAWEI FreeBuds Pro 2": ("partial", FreeBuds4iDevice), diff --git a/src/openfreebuds/device/huawei/profiles.py b/src/openfreebuds/device/huawei/profiles.py index f201c1f..c450332 100644 --- a/src/openfreebuds/device/huawei/profiles.py +++ b/src/openfreebuds/device/huawei/profiles.py @@ -54,3 +54,15 @@ def __init__(self, address): TwsAutoPauseHandler(), VoiceLanguageHandler(), ] + + +class FreeBudsSEDevice(GenericHuaweiSppDevice): + def __init__(self, address): + super().__init__(address) + self.handlers = [ + DropLogsHandler(), + DeviceInfoHandler(), + BatteryHandler(), + DoubleTapConfigHandler(), + VoiceLanguageHandler(), + ] diff --git a/src/openfreebuds_applet/ui/menu_device.py b/src/openfreebuds_applet/ui/menu_device.py index 74206de..1a6f535 100644 --- a/src/openfreebuds_applet/ui/menu_device.py +++ b/src/openfreebuds_applet/ui/menu_device.py @@ -77,6 +77,8 @@ def __init__(self, manager: FreebudsManager): def on_build(self): device = self.manager.device current = device.find_property("anc", "mode", -1) + if current == -1: + return next_mode = (current + 1) % 3 for a in range(0, 3):