Skip to content

Commit

Permalink
Xiaomi treadmill x21 new type cagnulein#2649
Browse files Browse the repository at this point in the history
  • Loading branch information
cagnulein committed Oct 11, 2024
1 parent b12a3d3 commit 88ba956
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4066,7 +4066,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_ENTITLEMENTS = "../src/ios/qdomyos-zwift.entitlements";
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 899;
CURRENT_PROJECT_VERSION = 900;
DEVELOPMENT_TEAM = 6335M7T29D;
ENABLE_BITCODE = NO;
GCC_PREPROCESSOR_DEFINITIONS = "ADB_HOST=1";
Expand Down Expand Up @@ -4257,7 +4257,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_ENTITLEMENTS = "../src/ios/qdomyos-zwift.entitlements";
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 899;
CURRENT_PROJECT_VERSION = 900;
DEBUG_INFORMATION_FORMAT = dwarf;
DEVELOPMENT_TEAM = 6335M7T29D;
ENABLE_BITCODE = NO;
Expand Down Expand Up @@ -4484,7 +4484,7 @@
CODE_SIGN_ENTITLEMENTS = "watchkit Extension/WatchKit Extension.entitlements";
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 899;
CURRENT_PROJECT_VERSION = 900;
DEVELOPMENT_TEAM = 6335M7T29D;
ENABLE_BITCODE = YES;
ENABLE_STRICT_OBJC_MSGSEND = YES;
Expand Down Expand Up @@ -4580,7 +4580,7 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_ENTITLEMENTS = "watchkit Extension/WatchKit Extension.entitlements";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 899;
CURRENT_PROJECT_VERSION = 900;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_TEAM = 6335M7T29D;
ENABLE_BITCODE = YES;
Expand Down Expand Up @@ -4672,7 +4672,7 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_ENTITLEMENTS = "watchkit Extension/WatchKit Extension.entitlements";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 899;
CURRENT_PROJECT_VERSION = 900;
DEVELOPMENT_ASSET_PATHS = "\"watchkit Extension/Preview Content\"";
ENABLE_BITCODE = YES;
ENABLE_PREVIEWS = YES;
Expand Down Expand Up @@ -4786,7 +4786,7 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_ENTITLEMENTS = "watchkit Extension/WatchKit Extension.entitlements";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 899;
CURRENT_PROJECT_VERSION = 900;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_ASSET_PATHS = "\"watchkit Extension/Preview Content\"";
ENABLE_BITCODE = YES;
Expand Down
4 changes: 3 additions & 1 deletion src/devices/kingsmithr2treadmill/kingsmithr2treadmill.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ void kingsmithr2treadmill::stateChanged(QLowEnergyService::ServiceState state) {
if (KS_NACH_X21C) {
_gattWriteCharacteristicId = QBluetoothUuid(QStringLiteral("0002FED7-0000-1000-8000-00805f9b34fb"));
_gattNotifyCharacteristicId = QBluetoothUuid(QStringLiteral("0002FED8-0000-1000-8000-00805f9b34fb"));
} else if (KS_NGCH_G1C || KS_NACH_MXG) {
} else if (KS_NGCH_G1C || KS_NACH_MXG || KS_NACH_X21C_2) {
_gattWriteCharacteristicId = QBluetoothUuid(QStringLiteral("0001FED7-0000-1000-8000-00805f9b34fb"));
_gattNotifyCharacteristicId = QBluetoothUuid(QStringLiteral("0001FED8-0000-1000-8000-00805f9b34fb"));
}
Expand Down Expand Up @@ -476,6 +476,8 @@ void kingsmithr2treadmill::serviceScanDone(void) {

gattCommunicationChannelService = m_control->createServiceObject(_gattCommunicationChannelServiceId);
if(gattCommunicationChannelService == nullptr && KS_NACH_X21C) {
KS_NACH_X21C_2 = true;
KS_NACH_X21C = false;
qDebug() << "KS_NACH_X21C default service id not found";
_gattCommunicationChannelServiceId = QBluetoothUuid(QStringLiteral("00011234-0000-1000-8000-00805f9b34fb"));
gattCommunicationChannelService = m_control->createServiceObject(_gattCommunicationChannelServiceId);
Expand Down
1 change: 1 addition & 0 deletions src/devices/kingsmithr2treadmill/kingsmithr2treadmill.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ class kingsmithr2treadmill : public treadmill {
bool initRequest = false;

bool KS_NACH_X21C = false;
bool KS_NACH_X21C_2 = false;
bool KS_NGCH_G1C = false;
bool KS_NACH_MXG = false;

Expand Down

0 comments on commit 88ba956

Please sign in to comment.