Parse Bluetooth RSSI from bluetoothctl output

- Capture RSSI from [CHG] Device XX:XX RSSI: -XX lines
- Update device RSSI in real-time as bluetoothctl reports changes
- Auto-refresh selected device panel when RSSI updates
- Preserve RSSI when merging device updates

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Smittix
2026-01-08 12:40:49 +00:00
parent 0c310ab068
commit b60f2cdf81
2 changed files with 29 additions and 0 deletions

View File

@@ -5957,6 +5957,10 @@
device.tracker = device.tracker || { name: findMyInfo.type };
}
// Merge with existing device data to preserve RSSI if not in update
if (btDevices[device.mac] && !device.rssi && btDevices[device.mac].rssi) {
device.rssi = btDevices[device.mac].rssi;
}
btDevices[device.mac] = device;
// Track signal history for graphs
@@ -5971,6 +5975,11 @@
pulseSignal();
}
// Update selected device panel if this device is selected
if (selectedBtDevice === device.mac) {
updateBtSelectedDevice(device);
}
// Check for tracker following
checkTrackerFollowing(device);