Reedyuk / blue-falcon

A Bluetooth kotlin multiplatform "Cross-Platform" library for iOS and Android
https://bluefalcon.dev
Apache License 2.0
328 stars 43 forks source link

peripherals set now have only one entry per uuid #134

Closed gitbiagio closed 1 month ago

gitbiagio commented 1 month ago

Collecting peripherals used to accumulate newly received advertisements, resulting in a costantly growing set. My modification filters the old set before adding new devices, so if a device already exists in the set it is filtered out and then re-appended. This behaviour is necessary to update the rssi field into BluetoothPeripheral object, while avoiding duplicate entries with same UUID.