update design bl
This commit is contained in:
parent
a82fcb39e2
commit
5a420b5031
@ -13,7 +13,7 @@ DEFAULT_SOUND_VOLUME = 100
|
|||||||
DEFAULT_PREMUTE_VOLUME = 10
|
DEFAULT_PREMUTE_VOLUME = 10
|
||||||
DEFAULT_DUCKING_VOLUME = 35
|
DEFAULT_DUCKING_VOLUME = 35
|
||||||
DEV_MODE_ENABLE = (Path(__file__).resolve().parent / "dev_mode_enable").exists()
|
DEV_MODE_ENABLE = (Path(__file__).resolve().parent / "dev_mode_enable").exists()
|
||||||
BLUETOOTH_MAX_PAIRED_DEVICES = 2
|
BLUETOOTH_MAX_PAIRED_DEVICES = 5
|
||||||
|
|
||||||
|
|
||||||
def get_device_model() -> str:
|
def get_device_model() -> str:
|
||||||
|
|||||||
@ -11,6 +11,8 @@ from PySide6.QtCore import QObject, Signal
|
|||||||
|
|
||||||
import build_info
|
import build_info
|
||||||
|
|
||||||
|
MOCK_PAIRED_DEVICED = True
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
class BluetoothDevice:
|
class BluetoothDevice:
|
||||||
@ -46,6 +48,18 @@ class BluetoothService(QObject):
|
|||||||
mac = parts[1]
|
mac = parts[1]
|
||||||
name = " ".join(parts[2:]) if len(parts) > 2 else ""
|
name = " ".join(parts[2:]) if len(parts) > 2 else ""
|
||||||
devices.append(BluetoothDevice(mac=mac, name=name))
|
devices.append(BluetoothDevice(mac=mac, name=name))
|
||||||
|
|
||||||
|
# DEBUG: мок устройств для тестирования лимита
|
||||||
|
if MOCK_PAIRED_DEVICED:
|
||||||
|
real_count = len(devices)
|
||||||
|
missing = build_info.BLUETOOTH_MAX_PAIRED_DEVICES - real_count
|
||||||
|
for i in range(missing):
|
||||||
|
idx = real_count + i + 1
|
||||||
|
devices.append(BluetoothDevice(
|
||||||
|
mac=f"00:11:22:33:44:{idx:02X}",
|
||||||
|
name=f"Test Device {idx}"
|
||||||
|
))
|
||||||
|
|
||||||
return devices
|
return devices
|
||||||
|
|
||||||
def get_device_info(self, mac: str) -> dict[str, str]:
|
def get_device_info(self, mac: str) -> dict[str, str]:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user