diff options
author | Alex Blasche <alexander.blasche@digia.com> | 2014-05-09 11:46:01 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-05-22 09:07:49 +0200 |
commit | 291a62a8150164c8b848b8dd5c6f26ef19a51246 (patch) | |
tree | 99873d7f38f1ef44353fd480e913e186f25e37ff /src/bluetooth/qbluetoothdevicediscoveryagent.cpp | |
parent | 26e9cf5bc608c7b50fc27a73442966b3880f0825 (diff) |
Bluez5: Ensure device discovery returns meaningfull RSSI data
If the discovery process was started by QBluetoothDeviceDiscoveryAgent
and Bluez wasn't already in discovery mode then the RSSI values
are 0. The retrieval of RSSI data takes a bit more time.
To find a compromise between speedy return of device scan information
and the delayed RSSI information we continue to monitor the device scan
and update RSSI information as the values are propagated by Bluez.
However the deviceDiscovered() signal is not emitted again after an
update. Only re-calling discoveredDevices() will return the most
up-to-date RSSI values.
Task-number: QTBUG-32085
Change-Id: Icb6566d51503a6004fa3f25c499fc7f941bd7fee
Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com>
Diffstat (limited to 'src/bluetooth/qbluetoothdevicediscoveryagent.cpp')
-rw-r--r-- | src/bluetooth/qbluetoothdevicediscoveryagent.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/bluetooth/qbluetoothdevicediscoveryagent.cpp b/src/bluetooth/qbluetoothdevicediscoveryagent.cpp index d8c93054..ab0643d6 100644 --- a/src/bluetooth/qbluetoothdevicediscoveryagent.cpp +++ b/src/bluetooth/qbluetoothdevicediscoveryagent.cpp @@ -99,6 +99,16 @@ QT_BEGIN_NAMESPACE \fn void QBluetoothDeviceDiscoveryAgent::deviceDiscovered(const QBluetoothDeviceInfo &info) This signal is emitted when the Bluetooth device described by \a info is discovered. + + The signal is emitted as soon as the most important device information + has been collected. However, as long as the \l finished() signal has not + been emitted the information collection continues even for already discovered + devices. This is particularly true for signal strength information (RSSI). If + signal strength information is required it is advisable to retrieve the device + information via \l discoveredDevices() once the discovery has finished. This + will yield the most recent RSSI information. + + \sa QBluetoothDeviceInfo::rssi() */ /*! |