Skip to content

Commit

Permalink
Schwinn 590 Elliptical #2165
Browse files Browse the repository at this point in the history
  • Loading branch information
cagnulein committed Mar 1, 2024
1 parent a9be805 commit 9f9ab5c
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 = (
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
9 changes: 9 additions & 0 deletions src/devices/ypooelliptical/ypooelliptical.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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);
Expand Down
1 change: 1 addition & 0 deletions src/devices/ypooelliptical/ypooelliptical.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 9f9ab5c

Please sign in to comment.