diff options
author | Javier <dev.git@javispedro.com> | 2015-12-13 04:15:19 +0100 |
---|---|---|
committer | Javier <dev.git@javispedro.com> | 2015-12-13 04:15:19 +0100 |
commit | aebbb506b01d29d7e963c4d63aa52a21094dac4e (patch) | |
tree | bf002728e244b3170bd79168d99af1a3c3d33f9a | |
parent | 581756f0e1ea9aea6cfafd4f33af4a2f7690f3dc (diff) | |
download | btgpsd-master.tar.gz btgpsd-master.zip |
-rw-r--r-- | bluetoothgpsserver.cpp | 2 | ||||
-rw-r--r-- | bluetoothgpsserver.h | 6 | ||||
-rw-r--r-- | nmeasource.cpp | 2 |
3 files changed, 4 insertions, 6 deletions
diff --git a/bluetoothgpsserver.cpp b/bluetoothgpsserver.cpp index efbddf0..fb46e91 100644 --- a/bluetoothgpsserver.cpp +++ b/bluetoothgpsserver.cpp @@ -20,7 +20,7 @@ void BluetoothGpsServer::start() return; } - m_server = new QRfcommServer(this); + m_server = new QBluetoothServer(QBluetoothServiceInfo::RfcommProtocol, this); connect(m_server, SIGNAL(newConnection()), this, SLOT(acceptConnection())); if (!m_server->listen(QBluetoothAddress(), m_port)) { qWarning() << "Failed to start Bluetooth listener socket"; diff --git a/bluetoothgpsserver.h b/bluetoothgpsserver.h index db5c25b..50ee1de 100644 --- a/bluetoothgpsserver.h +++ b/bluetoothgpsserver.h @@ -6,9 +6,7 @@ #include <QtBluetooth/QBluetoothSocket> #include <QtBluetooth/QBluetoothServiceInfo> -#include <QtBluetooth/QRfcommServer> - -QT_USE_NAMESPACE_BLUETOOTH +#include <QtBluetooth/QBluetoothServer> class NmeaSource; @@ -34,7 +32,7 @@ private: uint m_port; NmeaSource* m_source; QBluetoothServiceInfo m_service; - QRfcommServer* m_server; + QBluetoothServer* m_server; QList<QBluetoothSocket*> m_clients; }; diff --git a/nmeasource.cpp b/nmeasource.cpp index e9bb222..e9e93ef 100644 --- a/nmeasource.cpp +++ b/nmeasource.cpp @@ -565,7 +565,7 @@ void NmeaSource::generateGPGSV(const QGeoPositionInfo& pos, const QList<QGeoSate // 1 = Number of sentences for full data .arg(nmsgs) // 2 = Sentence number - .arg(i) + .arg(i + 1) // 3 = Total number of satellites in view .arg(nsats) // 4 - 14 = IDs of SVs used in position fix |