File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -1257,14 +1257,22 @@ bool BleRcuAdapterBluez::addDevice(const BleAddress &address)
12571257/* !
12581258 \internal
12591259
1260- Sends a request to bluez to reconnect all devices stored in our internal map
1260+ Sends a request to bluez to reconnect all devices stored in our internal map if paired
12611261
12621262 */
12631263void BleRcuAdapterBluez::reconnectAllDevices ()
12641264{
12651265 for (auto const &device : m_devices) {
1266- XLOGD_INFO (" reconnecting to %s" , device.first .toString ().c_str ());
1267- device.second ->connect ();
1266+ bool isPaired = false ;
1267+ if (device.second ->m_deviceProxy ) {
1268+ device.second ->m_deviceProxy ->paired (isPaired);
1269+ }
1270+ if (isPaired) {
1271+ XLOGD_INFO (" reconnecting to %s" , device.first .toString ().c_str ());
1272+ device.second ->connect ();
1273+ } else {
1274+ XLOGD_INFO (" not paired, skipping reconnecting to %s" , device.first .toString ().c_str ());
1275+ }
12681276 }
12691277}
12701278
You can’t perform that action at this time.
0 commit comments