From cb04065d6a84bb54b485d0ad8715f09a76191412 Mon Sep 17 00:00:00 2001 From: "Javier S. Pedro" Date: Thu, 28 Mar 2013 13:02:18 +0100 Subject: disable connection timer when bluetooth is off --- metawatch/metawatchscanner.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'metawatch/metawatchscanner.cpp') diff --git a/metawatch/metawatchscanner.cpp b/metawatch/metawatchscanner.cpp index 6a65419..1e43115 100644 --- a/metawatch/metawatchscanner.cpp +++ b/metawatch/metawatchscanner.cpp @@ -30,17 +30,23 @@ void MetaWatchScanner::handleDiscoveredService(const QBluetoothServiceInfo &info { const QBluetoothDeviceInfo dev = info.device(); QString deviceName = dev.name(); - if (deviceName.contains("MetaWatch", Qt::CaseInsensitive)) { + if (deviceName.startsWith("MetaWatch", Qt::CaseInsensitive)) { QVariantMap foundInfo; foundInfo["address"] = dev.address().toString(); foundInfo["name"] = deviceName; qDebug() << "metawatch bluetooth scan found:" << deviceName; + // "MetaWatch Digital" was AU2000 with preSTRATA firmware + // "MetaWatch SW12" seems to be STRATA + // "MetaWatch 99" seems to be AU2000 with STRATA firmware if (deviceName.contains("Digital", Qt::CaseInsensitive) || - deviceName.contains("SW12", Qt::CaseInsensitive)) { + deviceName.contains("SW12") || deviceName.contains("99")) { foundInfo["driver"] = QString("metawatch-digital"); foundInfo["next-watchlet-button"] = QString("A"); emit watchFound(foundInfo); - } else if (deviceName.contains("Analog", Qt::CaseInsensitive)) { + // "MetaWatch Analog" is the only analog watch released so far, preSTRATA fw + // "MetaWatch WDS111" (seems) analog watch with STRATA fw + } else if (deviceName.contains("Analog", Qt::CaseInsensitive) || + deviceName.contains("WDS111", Qt::CaseInsensitive)) { foundInfo["driver"] = QString("metawatch-analog"); foundInfo["next-watchlet-button"] = QString("A"); emit watchFound(foundInfo); -- cgit v1.2.3