Fix BT/WiFi run-state health and BT Locate tracking continuity

This commit is contained in:
Smittix
2026-02-19 21:39:09 +00:00
parent 5c47e9f10a
commit 37ba12daaa
6 changed files with 256 additions and 144 deletions

View File

@@ -1618,22 +1618,23 @@ const BluetoothMode = (function() {
function doLocateHandoff(device) {
console.log('[BT] doLocateHandoff, BtLocate defined:', typeof BtLocate !== 'undefined');
if (typeof BtLocate !== 'undefined') {
BtLocate.handoff({
device_id: device.device_id,
mac_address: device.address,
address_type: device.address_type || null,
irk_hex: device.irk_hex || null,
known_name: device.name || null,
known_manufacturer: device.manufacturer_name || null,
last_known_rssi: device.rssi_current,
tx_power: device.tx_power || null,
appearance_name: device.appearance_name || null,
fingerprint_id: device.fingerprint_id || null,
mac_cluster_count: device.mac_cluster_count || 0
});
}
}
if (typeof BtLocate !== 'undefined') {
BtLocate.handoff({
device_id: device.device_id,
device_key: device.device_key || null,
mac_address: device.address,
address_type: device.address_type || null,
irk_hex: device.irk_hex || null,
known_name: device.name || null,
known_manufacturer: device.manufacturer_name || null,
last_known_rssi: device.rssi_current,
tx_power: device.tx_power || null,
appearance_name: device.appearance_name || null,
fingerprint_id: device.fingerprint_id || device.fingerprint?.id || null,
mac_cluster_count: device.mac_cluster_count || 0
});
}
}
// Public API
return {