fix: always scan WiFi and BT, filter controls display only

The filter checkboxes now only control whether devices are displayed
on the map, not whether they are scanned. Both WiFi and Bluetooth
are always scanned regardless of filter state.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
User
2026-02-01 16:48:52 +01:00
parent e27200c5b5
commit bc2e23c3ca

View File

@@ -644,8 +644,8 @@ async function triggerScan() {
location: 'web_scan',
lat: lat,
lon: lon,
scan_wifi: filters.wifi,
scan_bluetooth: filters.bluetooth
scan_wifi: true, // Always scan WiFi (filter controls display only)
scan_bluetooth: true // Always scan BT (filter controls display only)
})
});
@@ -1403,8 +1403,8 @@ async function startAutoScan() {
body: JSON.stringify({
interval_minutes: interval,
location_label: label,
scan_wifi: filters.wifi,
scan_bluetooth: filters.bluetooth,
scan_wifi: true, // Always scan both (filter controls display only)
scan_bluetooth: true,
save: false
})
});
@@ -1412,10 +1412,7 @@ async function startAutoScan() {
if (response.ok) {
const data = await response.json();
updateAutoScanUI(data);
const services = [];
if (filters.wifi) services.push('WiFi');
if (filters.bluetooth) services.push('BT');
document.getElementById('scan-status').textContent = `Auto-scan: ${services.join('+')} every ${interval} min`;
document.getElementById('scan-status').textContent = `Auto-scan: WiFi+BT every ${interval} min`;
}
} catch (error) {
console.error('Error starting auto-scan:', error);