Releases: F3NN3X/InfoPanel.BTData
Releases · F3NN3X/InfoPanel.BTData
[1.4.0] June 10 2025
FOR TESTING - BETA PURPOSE ONLY
Cleaned up, might or might not detect devices, it should... but it might not.
IOS devices most likely not supported
Full Changelog: 1.2.7...1.4.0
[1.2.7] - 2025-04-03
[1.2.7] - 2025-04-03
(Consolidates recent compiler warning fixes)
Fixed
- CS8602 Nullability Warning: Resolved remaining nullability warning in
ResetAllSensorsInternalrelated to accessing the_deviceSensorsdictionary during disposal by adding an explicit null check. - CS8600 Nullability Warning: Correctly applied null-coalescing operator (
??) during device name retrieval inGetPairedDevicesAsyncto handle potentially nulldeviceInfo.Name. - CS8602 Finalizer Warning: Removed the finalizer (
~BluetoothBatteryPlugin) as the class does not directly own unmanaged resources, resolving the associated compiler warning and relying on the standardIDisposablepattern.
Changed
- Enabled Nullable Context: Added
#nullable enabledirective to the source file for improved compile-time null checking. - Cancellation Handling: Improved propagation of
CancellationTokento WinRT async operations via.AsTask(cancellationToken)and added more checks usingcancellationToken.ThrowIfCancellationRequested()withinUpdateDeviceGattDataAsync. - Disposal Pattern: Added
_isDisposedflag to prevent double disposal.
[1.2.3] - 2025-04-03
Fixed
- WinRT Async Handling: Explicitly converted
IAsyncOperation<T>results toTask<T>using.AsTask()before applying.ConfigureAwait(false)to resolve CS1929 compiler errors related to WinRT async calls. - CS0165 Unassigned Variable: Corrected logic in
GetPairedDevicesAsyncto prevent potential use of unassigned variable when retrieving device names from properties.
Changed
- Success Tracking: Modified
UpdateDeviceGattDataAsyncto returnTask<bool>indicating success or failure, allowingUpdateAsyncloop to track counts more accurately.
Full Changelog: 1.2.1...1.2.7
[1.2.1] - 2025-04-03
[1.2.1] - 2025-04-03
Changed
- Optimized GATT Implementation: Removed the separate background monitoring task (
StartMonitoringAsync) and integrated update logic directly intoUpdateAsync, relying on InfoPanel's update cycle. - Connection Caching: Implemented caching for
BluetoothLEDeviceobjects. The plugin now only attempts to establish a new LE connection (using the device's Bluetooth Address) if the cached object is null or reports as disconnected, reducing overhead. - Improved Resource Management: Enhanced disposal logic for
BluetoothLEDeviceobjects during updates, resets, and plugin disposal usingIDisposableandusingstatements where appropriate. - Refined Status Reporting: Updated status messages to be more specific (e.g., "Connected (No Batt Svc)", "Device Unreachable", "LE Connect Error").
- Code Cleanup: Removed redundant methods and variables associated with the background task and previous PnP/PInvoke attempts. Standardized comments to
//. Corrected namespace toInfoPanel.BTData.
Fixed
- Addressed CS8600 nullable reference type warnings during configuration loading.
Notes
- This version focuses solely on the standard GATT Battery Service approach. Attempts to use Windows PnP properties (via UWP or P/Invoke) were unsuccessful due to API limitations or unreliability in retrieving the necessary data and have been removed.
- iOS devices remain unsupported due to iOS restrictions on exposing the GATT Battery Service to Windows.
[1.0.0 - BETA] - 2025-03-31
BETA VERSION FOR TESTING
Added
- Initial release of the Bluetooth Device Battery Plugin.
- Multi-device monitoring for all paired Bluetooth LE devices.
- Separate UI containers for each device with:
Name: Displays the device’s friendly name.Status: Shows "Connected", "Disconnected", or "Error".Battery Level: Reports battery percentage (0-100%) for connected devices with a battery service (UUID0x180F).
- Configurable refresh interval via
PluginInfo.ini(default: 5 minutes). - Event-driven detection with a 5-second polling loop to detect device changes.
- Robust retry logic (3 attempts, 1-second delay) for Bluetooth operations.
- Proper resource cleanup using
IDisposableand device disposal.