summaryrefslogtreecommitdiffstats
path: root/examples/bluetooth/heartlistener/heartrate.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/bluetooth/heartlistener/heartrate.cpp')
-rw-r--r--examples/bluetooth/heartlistener/heartrate.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/bluetooth/heartlistener/heartrate.cpp b/examples/bluetooth/heartlistener/heartrate.cpp
index 7077bf1c..c206b69e 100644
--- a/examples/bluetooth/heartlistener/heartrate.cpp
+++ b/examples/bluetooth/heartlistener/heartrate.cpp
@@ -50,6 +50,7 @@ HeartRate::HeartRate():
{
//! [devicediscovery-1]
m_deviceDiscoveryAgent = new QBluetoothDeviceDiscoveryAgent(this);
+ m_deviceDiscoveryAgent->setLowEnergyDiscoveryTimeout(5000);
connect(m_deviceDiscoveryAgent, SIGNAL(deviceDiscovered(const QBluetoothDeviceInfo&)),
this, SLOT(addDevice(const QBluetoothDeviceInfo&)));
@@ -73,7 +74,7 @@ void HeartRate::deviceSearch()
qDeleteAll(m_devices);
m_devices.clear();
//! [devicediscovery-2]
- m_deviceDiscoveryAgent->start();
+ m_deviceDiscoveryAgent->start(QBluetoothDeviceDiscoveryAgent::LowEnergyMethod);
//! [devicediscovery-2]
setMessage("Scanning for devices...");
}