diff options
-rw-r--r-- | core/qt-ble.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/core/qt-ble.cpp b/core/qt-ble.cpp index 06adce63a..bed5f5feb 100644 --- a/core/qt-ble.cpp +++ b/core/qt-ble.cpp @@ -42,13 +42,14 @@ void BLEObject::writeCompleted(const QLowEnergyDescriptor &d, const QByteArray & void BLEObject::addService(const QBluetoothUuid &newService) { - const char *uuid = newService.toString().toUtf8().data(); - - qDebug() << "Found service" << uuid; - if (uuid[1] == '0') { - qDebug () << " .. ignoring since first digit is '0'"; + qDebug() << "Found service" << newService; + bool isStandardUuid = false; + newService.toUInt16(&isStandardUuid); + if (isStandardUuid) { + qDebug () << " .. ignoring standard service"; return; } + service = controller->createServiceObject(newService, this); qDebug() << " .. created service object" << service; if (service) { |