From 9f9ab5c8cabcef0b395f39b14d788c0add604a8c Mon Sep 17 00:00:00 2001 From: Roberto Viola Date: Fri, 1 Mar 2024 12:46:14 +0100 Subject: [PATCH] Schwinn 590 Elliptical #2165 --- .../qdomyoszwift.xcodeproj/project.pbxproj | 12 ++++++------ src/devices/ypooelliptical/ypooelliptical.cpp | 9 +++++++++ src/devices/ypooelliptical/ypooelliptical.h | 1 + 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/build-qdomyos-zwift-Qt_5_15_2_for_iOS-Debug/qdomyoszwift.xcodeproj/project.pbxproj b/build-qdomyos-zwift-Qt_5_15_2_for_iOS-Debug/qdomyoszwift.xcodeproj/project.pbxproj index 58b69fcb0..001bb860b 100644 --- a/build-qdomyos-zwift-Qt_5_15_2_for_iOS-Debug/qdomyoszwift.xcodeproj/project.pbxproj +++ b/build-qdomyos-zwift-Qt_5_15_2_for_iOS-Debug/qdomyoszwift.xcodeproj/project.pbxproj @@ -3814,7 +3814,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_ENTITLEMENTS = "../src/ios/qdomyos-zwift.entitlements"; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 751; + CURRENT_PROJECT_VERSION = 752; DEVELOPMENT_TEAM = 6335M7T29D; ENABLE_BITCODE = NO; HEADER_SEARCH_PATHS = ( @@ -4003,7 +4003,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_ENTITLEMENTS = "../src/ios/qdomyos-zwift.entitlements"; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 751; + CURRENT_PROJECT_VERSION = 752; DEBUG_INFORMATION_FORMAT = dwarf; DEVELOPMENT_TEAM = 6335M7T29D; ENABLE_BITCODE = NO; @@ -4228,7 +4228,7 @@ CODE_SIGN_ENTITLEMENTS = "watchkit Extension/WatchKit Extension.entitlements"; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 751; + CURRENT_PROJECT_VERSION = 752; DEVELOPMENT_TEAM = 6335M7T29D; ENABLE_BITCODE = YES; ENABLE_STRICT_OBJC_MSGSEND = YES; @@ -4324,7 +4324,7 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_ENTITLEMENTS = "watchkit Extension/WatchKit Extension.entitlements"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 751; + CURRENT_PROJECT_VERSION = 752; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEVELOPMENT_TEAM = 6335M7T29D; ENABLE_BITCODE = YES; @@ -4416,7 +4416,7 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_ENTITLEMENTS = "watchkit Extension/WatchKit Extension.entitlements"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 751; + CURRENT_PROJECT_VERSION = 752; DEVELOPMENT_ASSET_PATHS = "\"watchkit Extension/Preview Content\""; ENABLE_BITCODE = YES; ENABLE_PREVIEWS = YES; @@ -4530,7 +4530,7 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_ENTITLEMENTS = "watchkit Extension/WatchKit Extension.entitlements"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 751; + CURRENT_PROJECT_VERSION = 752; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEVELOPMENT_ASSET_PATHS = "\"watchkit Extension/Preview Content\""; ENABLE_BITCODE = YES; diff --git a/src/devices/ypooelliptical/ypooelliptical.cpp b/src/devices/ypooelliptical/ypooelliptical.cpp index deadc8d24..598cd7bc3 100644 --- a/src/devices/ypooelliptical/ypooelliptical.cpp +++ b/src/devices/ypooelliptical/ypooelliptical.cpp @@ -474,10 +474,15 @@ void ypooelliptical::stateChanged(QLowEnergyService::ServiceState state) { for (QLowEnergyService *s : qAsConst(gattCommunicationChannelService)) { QBluetoothUuid _gattCustomService((quint16)0xFFF0); + QBluetoothUuid _gattFTMSService((quint16)0x1826); if (s->serviceUuid() != _gattCustomService && iconsole_elliptical) { qDebug() << "skipping service" << s->serviceUuid(); continue; } + else if(s->serviceUuid() != _gattFTMSService && SCH_590E) { + qDebug() << "skipping service" << s->serviceUuid(); + continue; + } if (s->state() == QLowEnergyService::ServiceDiscovered) { // establish hook into notifications @@ -670,6 +675,10 @@ void ypooelliptical::deviceDiscovered(const QBluetoothDeviceInfo &device) { device.address().toString() + ')'); { bluetoothDevice = device; + if(device.name().toUpper().startsWith(QStringLiteral("SCH_590E"))) { + SCH_590E = true; + qDebug() << "SCH_590E workaround ON!"; + } m_control = QLowEnergyController::createCentral(bluetoothDevice, this); connect(m_control, &QLowEnergyController::serviceDiscovered, this, &ypooelliptical::serviceDiscovered); diff --git a/src/devices/ypooelliptical/ypooelliptical.h b/src/devices/ypooelliptical/ypooelliptical.h index b58c21e51..bebe2bfeb 100644 --- a/src/devices/ypooelliptical/ypooelliptical.h +++ b/src/devices/ypooelliptical/ypooelliptical.h @@ -70,6 +70,7 @@ class ypooelliptical : public elliptical { bool noHeartService = false; uint8_t counterPoll = 0; + bool SCH_590E = false; #ifdef Q_OS_IOS lockscreen *h = 0;