From a1f8377dd4a7d73894a09d026524dc51e9204d0a Mon Sep 17 00:00:00 2001 From: Smittix Date: Wed, 21 Jan 2026 20:36:28 +0000 Subject: [PATCH] Fix TSCM Bluetooth scanner function signature mismatch The unified get_tscm_bluetooth_snapshot() no longer accepts a bt_interface parameter as it handles interface selection internally. Co-Authored-By: Claude Opus 4.5 --- routes/tscm.py | 2 +- tests/test_bluetooth_api.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/routes/tscm.py b/routes/tscm.py index 2e8319d..7b9f4e3 100644 --- a/routes/tscm.py +++ b/routes/tscm.py @@ -1331,7 +1331,7 @@ def _run_sweep( try: # Use unified Bluetooth scanner if available if _USE_UNIFIED_BT_SCANNER: - bt_devices = get_tscm_bluetooth_snapshot(bt_interface, duration=8) + bt_devices = get_tscm_bluetooth_snapshot(duration=8) else: bt_devices = _scan_bluetooth_devices(bt_interface, duration=8) for device in bt_devices: diff --git a/tests/test_bluetooth_api.py b/tests/test_bluetooth_api.py index 34603ba..213e623 100644 --- a/tests/test_bluetooth_api.py +++ b/tests/test_bluetooth_api.py @@ -346,7 +346,7 @@ class TestTSCMIntegration: mock_scanner.get_devices.return_value = [sample_device] with patch('routes.bluetooth_v2.get_bluetooth_scanner', return_value=mock_scanner): - devices = get_tscm_bluetooth_snapshot('hci0', duration=8) + devices = get_tscm_bluetooth_snapshot(duration=8) assert len(devices) == 1 device = devices[0] @@ -361,7 +361,7 @@ class TestTSCMIntegration: mock_scanner.get_devices.return_value = [] with patch('routes.bluetooth_v2.get_bluetooth_scanner', return_value=mock_scanner): - devices = get_tscm_bluetooth_snapshot('hci0') + devices = get_tscm_bluetooth_snapshot() assert devices == []