mirror of
https://github.com/cagnulein/qdomyos-zwift.git
synced 2026-02-18 00:17:41 +01:00
Compare commits
4 Commits
ant-remote
...
disconnect
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d87539e4fd | ||
|
|
44a435a2f4 | ||
|
|
6e46029356 | ||
|
|
7f0b582845 |
@@ -606,6 +606,7 @@ void activiotreadmill::serviceScanDone(void) {
|
||||
gattCommunicationChannelService->discoverDetails();
|
||||
} else {
|
||||
emit debug(QStringLiteral("error on find Service"));
|
||||
m_control->disconnectFromDevice();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -540,9 +540,13 @@ void bhfitnesselliptical::serviceScanDone(void) {
|
||||
auto services_list = m_control->services();
|
||||
for (const QBluetoothUuid &s : qAsConst(services_list)) {
|
||||
gattCommunicationChannelService.append(m_control->createServiceObject(s));
|
||||
connect(gattCommunicationChannelService.constLast(), &QLowEnergyService::stateChanged, this,
|
||||
&bhfitnesselliptical::stateChanged);
|
||||
gattCommunicationChannelService.constLast()->discoverDetails();
|
||||
if (gattCommunicationChannelService.constLast()) {
|
||||
connect(gattCommunicationChannelService.constLast(), &QLowEnergyService::stateChanged, this,
|
||||
&bhfitnesselliptical::stateChanged);
|
||||
gattCommunicationChannelService.constLast()->discoverDetails();
|
||||
} else {
|
||||
m_control->disconnectFromDevice();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -394,6 +394,7 @@ void bowflext216treadmill::serviceScanDone(void) {
|
||||
gattCommunicationChannelService = m_control->createServiceObject(_gattCommunicationChannelServiceId);
|
||||
if (gattCommunicationChannelService == nullptr) {
|
||||
qDebug() << "WRONG SERVICE";
|
||||
m_control->disconnectFromDevice();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -350,8 +350,13 @@ void bowflextreadmill::serviceScanDone(void) {
|
||||
|
||||
QBluetoothUuid _gattCommunicationChannelServiceId(QStringLiteral("edff9e80-cad7-11e5-ab63-0002a5d5c51b"));
|
||||
gattCommunicationChannelService = m_control->createServiceObject(_gattCommunicationChannelServiceId);
|
||||
connect(gattCommunicationChannelService, &QLowEnergyService::stateChanged, this, &bowflextreadmill::stateChanged);
|
||||
gattCommunicationChannelService->discoverDetails();
|
||||
if (gattCommunicationChannelService) {
|
||||
connect(gattCommunicationChannelService, &QLowEnergyService::stateChanged, this,
|
||||
&bowflextreadmill::stateChanged);
|
||||
gattCommunicationChannelService->discoverDetails();
|
||||
} else {
|
||||
m_control->disconnectFromDevice();
|
||||
}
|
||||
}
|
||||
|
||||
void bowflextreadmill::errorService(QLowEnergyService::ServiceError err) {
|
||||
|
||||
@@ -314,8 +314,12 @@ void chronobike::serviceScanDone(void) {
|
||||
QBluetoothUuid _gattCommunicationChannelServiceId(QStringLiteral("a026ee07-0a7d-4ab3-97fa-f1500f9feb8b"));
|
||||
|
||||
gattCommunicationChannelService = m_control->createServiceObject(_gattCommunicationChannelServiceId);
|
||||
connect(gattCommunicationChannelService, &QLowEnergyService::stateChanged, this, &chronobike::stateChanged);
|
||||
gattCommunicationChannelService->discoverDetails();
|
||||
if (gattCommunicationChannelService) {
|
||||
connect(gattCommunicationChannelService, &QLowEnergyService::stateChanged, this, &chronobike::stateChanged);
|
||||
gattCommunicationChannelService->discoverDetails();
|
||||
} else {
|
||||
m_control->disconnectFromDevice();
|
||||
}
|
||||
}
|
||||
|
||||
void chronobike::errorService(QLowEnergyService::ServiceError err) {
|
||||
|
||||
@@ -471,9 +471,14 @@ void cscbike::serviceScanDone(void) {
|
||||
#endif
|
||||
{
|
||||
gattCommunicationChannelService.append(m_control->createServiceObject(s));
|
||||
connect(gattCommunicationChannelService.constLast(), &QLowEnergyService::stateChanged, this,
|
||||
&cscbike::stateChanged);
|
||||
gattCommunicationChannelService.constLast()->discoverDetails();
|
||||
if (gattCommunicationChannelService.constLast()) {
|
||||
connect(gattCommunicationChannelService.constLast(), &QLowEnergyService::stateChanged, this,
|
||||
&cscbike::stateChanged);
|
||||
gattCommunicationChannelService.constLast()->discoverDetails();
|
||||
} else {
|
||||
m_control->disconnectFromDevice();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -575,8 +575,12 @@ void domyosbike::serviceScanDone(void) {
|
||||
QBluetoothUuid _gattCommunicationChannelServiceId(QStringLiteral("49535343-fe7d-4ae5-8fa9-9fafd205e455"));
|
||||
|
||||
gattCommunicationChannelService = m_control->createServiceObject(_gattCommunicationChannelServiceId);
|
||||
connect(gattCommunicationChannelService, &QLowEnergyService::stateChanged, this, &domyosbike::stateChanged);
|
||||
gattCommunicationChannelService->discoverDetails();
|
||||
if (gattCommunicationChannelService) {
|
||||
connect(gattCommunicationChannelService, &QLowEnergyService::stateChanged, this, &domyosbike::stateChanged);
|
||||
gattCommunicationChannelService->discoverDetails();
|
||||
} else {
|
||||
m_control->disconnectFromDevice();
|
||||
}
|
||||
}
|
||||
|
||||
void domyosbike::errorService(QLowEnergyService::ServiceError err) {
|
||||
|
||||
@@ -512,8 +512,13 @@ void domyoselliptical::serviceScanDone(void) {
|
||||
QBluetoothUuid _gattCommunicationChannelServiceId(QStringLiteral("49535343-fe7d-4ae5-8fa9-9fafd205e455"));
|
||||
|
||||
gattCommunicationChannelService = m_control->createServiceObject(_gattCommunicationChannelServiceId);
|
||||
connect(gattCommunicationChannelService, &QLowEnergyService::stateChanged, this, &domyoselliptical::stateChanged);
|
||||
gattCommunicationChannelService->discoverDetails();
|
||||
if (gattCommunicationChannelService) {
|
||||
connect(gattCommunicationChannelService, &QLowEnergyService::stateChanged, this,
|
||||
&domyoselliptical::stateChanged);
|
||||
gattCommunicationChannelService->discoverDetails();
|
||||
} else {
|
||||
m_control->disconnectFromDevice();
|
||||
}
|
||||
}
|
||||
|
||||
void domyoselliptical::errorService(QLowEnergyService::ServiceError err) {
|
||||
|
||||
@@ -511,8 +511,12 @@ void domyosrower::serviceScanDone(void) {
|
||||
QBluetoothUuid _gattCommunicationChannelServiceId(QStringLiteral("49535343-fe7d-4ae5-8fa9-9fafd205e455"));
|
||||
|
||||
gattCommunicationChannelService = m_control->createServiceObject(_gattCommunicationChannelServiceId);
|
||||
connect(gattCommunicationChannelService, &QLowEnergyService::stateChanged, this, &domyosrower::stateChanged);
|
||||
gattCommunicationChannelService->discoverDetails();
|
||||
if (gattCommunicationChannelService) {
|
||||
connect(gattCommunicationChannelService, &QLowEnergyService::stateChanged, this, &domyosrower::stateChanged);
|
||||
gattCommunicationChannelService->discoverDetails();
|
||||
} else {
|
||||
m_control->disconnectFromDevice();
|
||||
}
|
||||
}
|
||||
|
||||
void domyosrower::errorService(QLowEnergyService::ServiceError err) {
|
||||
|
||||
@@ -736,8 +736,13 @@ void domyostreadmill::serviceScanDone(void) {
|
||||
emit debug(QStringLiteral("serviceScanDone"));
|
||||
|
||||
gattCommunicationChannelService = m_control->createServiceObject(_gattCommunicationChannelServiceId);
|
||||
connect(gattCommunicationChannelService, &QLowEnergyService::stateChanged, this, &domyostreadmill::stateChanged);
|
||||
gattCommunicationChannelService->discoverDetails();
|
||||
if (gattCommunicationChannelService) {
|
||||
connect(gattCommunicationChannelService, &QLowEnergyService::stateChanged, this,
|
||||
&domyostreadmill::stateChanged);
|
||||
gattCommunicationChannelService->discoverDetails();
|
||||
} else {
|
||||
m_control->disconnectFromDevice();
|
||||
}
|
||||
}
|
||||
|
||||
void domyostreadmill::errorService(QLowEnergyService::ServiceError err) {
|
||||
|
||||
@@ -467,9 +467,13 @@ void echelonconnectsport::serviceScanDone(void) {
|
||||
QBluetoothUuid _gattCommunicationChannelServiceId(QStringLiteral("0bf669f1-45f2-11e7-9598-0800200c9a66"));
|
||||
|
||||
gattCommunicationChannelService = m_control->createServiceObject(_gattCommunicationChannelServiceId);
|
||||
connect(gattCommunicationChannelService, &QLowEnergyService::stateChanged, this,
|
||||
&echelonconnectsport::stateChanged);
|
||||
gattCommunicationChannelService->discoverDetails();
|
||||
if (gattCommunicationChannelService) {
|
||||
connect(gattCommunicationChannelService, &QLowEnergyService::stateChanged, this,
|
||||
&echelonconnectsport::stateChanged);
|
||||
gattCommunicationChannelService->discoverDetails();
|
||||
} else {
|
||||
m_control->disconnectFromDevice();
|
||||
}
|
||||
}
|
||||
|
||||
void echelonconnectsport::errorService(QLowEnergyService::ServiceError err) {
|
||||
|
||||
@@ -444,8 +444,12 @@ void echelonrower::serviceScanDone(void) {
|
||||
QBluetoothUuid _gattCommunicationChannelServiceId(QStringLiteral("0bf669f1-45f2-11e7-9598-0800200c9a66"));
|
||||
|
||||
gattCommunicationChannelService = m_control->createServiceObject(_gattCommunicationChannelServiceId);
|
||||
connect(gattCommunicationChannelService, &QLowEnergyService::stateChanged, this, &echelonrower::stateChanged);
|
||||
gattCommunicationChannelService->discoverDetails();
|
||||
if (gattCommunicationChannelService) {
|
||||
connect(gattCommunicationChannelService, &QLowEnergyService::stateChanged, this, &echelonrower::stateChanged);
|
||||
gattCommunicationChannelService->discoverDetails();
|
||||
} else {
|
||||
m_control->disconnectFromDevice();
|
||||
}
|
||||
}
|
||||
|
||||
void echelonrower::errorService(QLowEnergyService::ServiceError err) {
|
||||
|
||||
@@ -412,8 +412,12 @@ void echelonstride::serviceScanDone(void) {
|
||||
QBluetoothUuid _gattCommunicationChannelServiceId(QStringLiteral("0bf669f1-45f2-11e7-9598-0800200c9a66"));
|
||||
|
||||
gattCommunicationChannelService = m_control->createServiceObject(_gattCommunicationChannelServiceId);
|
||||
connect(gattCommunicationChannelService, &QLowEnergyService::stateChanged, this, &echelonstride::stateChanged);
|
||||
gattCommunicationChannelService->discoverDetails();
|
||||
if (gattCommunicationChannelService) {
|
||||
connect(gattCommunicationChannelService, &QLowEnergyService::stateChanged, this, &echelonstride::stateChanged);
|
||||
gattCommunicationChannelService->discoverDetails();
|
||||
} else {
|
||||
m_control->disconnectFromDevice();
|
||||
}
|
||||
}
|
||||
|
||||
void echelonstride::errorService(QLowEnergyService::ServiceError err) {
|
||||
|
||||
@@ -579,8 +579,13 @@ void eslinkertreadmill::serviceScanDone(void) {
|
||||
|
||||
QBluetoothUuid _gattCommunicationChannelServiceId((quint16)0xfff0);
|
||||
gattCommunicationChannelService = m_control->createServiceObject(_gattCommunicationChannelServiceId);
|
||||
connect(gattCommunicationChannelService, &QLowEnergyService::stateChanged, this, &eslinkertreadmill::stateChanged);
|
||||
gattCommunicationChannelService->discoverDetails();
|
||||
if (gattCommunicationChannelService) {
|
||||
connect(gattCommunicationChannelService, &QLowEnergyService::stateChanged, this,
|
||||
&eslinkertreadmill::stateChanged);
|
||||
gattCommunicationChannelService->discoverDetails();
|
||||
} else {
|
||||
m_control->disconnectFromDevice();
|
||||
}
|
||||
}
|
||||
|
||||
void eslinkertreadmill::errorService(QLowEnergyService::ServiceError err) {
|
||||
|
||||
@@ -886,18 +886,22 @@ void fitplusbike::serviceScanDone(void) {
|
||||
QBluetoothUuid _gattCommunicationChannelServiceId((quint16)0xfff0);
|
||||
|
||||
gattCommunicationChannelService = m_control->createServiceObject(_gattCommunicationChannelServiceId);
|
||||
connect(gattCommunicationChannelService, &QLowEnergyService::stateChanged, this, &fitplusbike::stateChanged);
|
||||
gattCommunicationChannelService->discoverDetails();
|
||||
if (gattCommunicationChannelService) {
|
||||
connect(gattCommunicationChannelService, &QLowEnergyService::stateChanged, this, &fitplusbike::stateChanged);
|
||||
gattCommunicationChannelService->discoverDetails();
|
||||
|
||||
if (sportstech_sx600) {
|
||||
gattCommunicationChannelServiceFTMS = m_control->createServiceObject(QBluetoothUuid((quint16)0x1826));
|
||||
if (gattCommunicationChannelServiceFTMS) {
|
||||
qDebug() << "FTMS found!";
|
||||
connect(gattCommunicationChannelServiceFTMS, &QLowEnergyService::stateChanged, this,
|
||||
&fitplusbike::stateChanged);
|
||||
gattCommunicationChannelServiceFTMS->discoverDetails();
|
||||
}
|
||||
}
|
||||
if (sportstech_sx600) {
|
||||
gattCommunicationChannelServiceFTMS = m_control->createServiceObject(QBluetoothUuid((quint16)0x1826));
|
||||
if (gattCommunicationChannelServiceFTMS) {
|
||||
qDebug() << "FTMS found!";
|
||||
connect(gattCommunicationChannelServiceFTMS, &QLowEnergyService::stateChanged, this,
|
||||
&fitplusbike::stateChanged);
|
||||
gattCommunicationChannelServiceFTMS->discoverDetails();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
m_control->disconnectFromDevice();
|
||||
}
|
||||
}
|
||||
|
||||
void fitplusbike::errorService(QLowEnergyService::ServiceError err) {
|
||||
|
||||
@@ -736,6 +736,7 @@ void fitshowtreadmill::serviceScanDone(void) {
|
||||
gattCommunicationChannelService = m_control->createServiceObject(serviceId);
|
||||
if (!gattCommunicationChannelService) {
|
||||
qDebug() << "service not valid";
|
||||
m_control->disconnectFromDevice();
|
||||
return;
|
||||
}
|
||||
connect(gattCommunicationChannelService, &QLowEnergyService::stateChanged, this, &fitshowtreadmill::stateChanged);
|
||||
|
||||
@@ -421,8 +421,12 @@ void flywheelbike::serviceScanDone(void) {
|
||||
QBluetoothUuid _gattCommunicationChannelServiceId(QStringLiteral("6E400001-B5A3-F393-E0A9-E50E24DCCA9E"));
|
||||
|
||||
gattCommunicationChannelService = m_control->createServiceObject(_gattCommunicationChannelServiceId);
|
||||
connect(gattCommunicationChannelService, &QLowEnergyService::stateChanged, this, &flywheelbike::stateChanged);
|
||||
gattCommunicationChannelService->discoverDetails();
|
||||
if (gattCommunicationChannelService) {
|
||||
connect(gattCommunicationChannelService, &QLowEnergyService::stateChanged, this, &flywheelbike::stateChanged);
|
||||
gattCommunicationChannelService->discoverDetails();
|
||||
} else {
|
||||
m_control->disconnectFromDevice();
|
||||
}
|
||||
}
|
||||
|
||||
void flywheelbike::errorService(QLowEnergyService::ServiceError err) {
|
||||
|
||||
@@ -829,9 +829,14 @@ void ftmsbike::serviceScanDone(void) {
|
||||
for (const QBluetoothUuid &s : qAsConst(services_list)) {
|
||||
if ((JK_fitness_577 && s == ftmsService) || !JK_fitness_577) {
|
||||
gattCommunicationChannelService.append(m_control->createServiceObject(s));
|
||||
connect(gattCommunicationChannelService.constLast(), &QLowEnergyService::stateChanged, this,
|
||||
&ftmsbike::stateChanged);
|
||||
gattCommunicationChannelService.constLast()->discoverDetails();
|
||||
if (gattCommunicationChannelService.constLast()) {
|
||||
connect(gattCommunicationChannelService.constLast(), &QLowEnergyService::stateChanged, this,
|
||||
&ftmsbike::stateChanged);
|
||||
gattCommunicationChannelService.constLast()->discoverDetails();
|
||||
} else {
|
||||
m_control->disconnectFromDevice();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -543,9 +543,14 @@ void ftmsrower::serviceScanDone(void) {
|
||||
auto services_list = m_control->services();
|
||||
for (const QBluetoothUuid &s : qAsConst(services_list)) {
|
||||
gattCommunicationChannelService.append(m_control->createServiceObject(s));
|
||||
connect(gattCommunicationChannelService.constLast(), &QLowEnergyService::stateChanged, this,
|
||||
&ftmsrower::stateChanged);
|
||||
gattCommunicationChannelService.constLast()->discoverDetails();
|
||||
if (gattCommunicationChannelService.constLast()) {
|
||||
connect(gattCommunicationChannelService.constLast(), &QLowEnergyService::stateChanged, this,
|
||||
&ftmsrower::stateChanged);
|
||||
gattCommunicationChannelService.constLast()->discoverDetails();
|
||||
} else {
|
||||
m_control->disconnectFromDevice();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -592,9 +592,13 @@ void horizongr7bike::serviceScanDone(void) {
|
||||
auto services_list = m_control->services();
|
||||
for (const QBluetoothUuid &s : qAsConst(services_list)) {
|
||||
gattCommunicationChannelService.append(m_control->createServiceObject(s));
|
||||
connect(gattCommunicationChannelService.constLast(), &QLowEnergyService::stateChanged, this,
|
||||
&horizongr7bike::stateChanged);
|
||||
gattCommunicationChannelService.constLast()->discoverDetails();
|
||||
if (gattCommunicationChannelService.constLast()) {
|
||||
connect(gattCommunicationChannelService.constLast(), &QLowEnergyService::stateChanged, this,
|
||||
&horizongr7bike::stateChanged);
|
||||
gattCommunicationChannelService.constLast()->discoverDetails();
|
||||
} else {
|
||||
m_control->disconnectFromDevice();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1928,9 +1928,13 @@ void horizontreadmill::serviceScanDone(void) {
|
||||
{
|
||||
qDebug() << s << "discovering...";
|
||||
gattCommunicationChannelService.append(m_control->createServiceObject(s));
|
||||
connect(gattCommunicationChannelService.constLast(), &QLowEnergyService::stateChanged, this,
|
||||
&horizontreadmill::stateChanged);
|
||||
gattCommunicationChannelService.constLast()->discoverDetails();
|
||||
if (gattCommunicationChannelService.constLast()) {
|
||||
connect(gattCommunicationChannelService.constLast(), &QLowEnergyService::stateChanged, this,
|
||||
&horizontreadmill::stateChanged);
|
||||
gattCommunicationChannelService.constLast()->discoverDetails();
|
||||
} else {
|
||||
m_control->disconnectFromDevice();
|
||||
}
|
||||
}
|
||||
#ifdef Q_OS_WIN
|
||||
else {
|
||||
|
||||
@@ -309,8 +309,12 @@ void inspirebike::serviceScanDone(void) {
|
||||
QBluetoothUuid _gattCommunicationChannelServiceId(QStringLiteral("7ee7e1fa-6fd8-4cbd-b648-a2cdcfa4e7f4"));
|
||||
|
||||
gattCommunicationChannelService = m_control->createServiceObject(_gattCommunicationChannelServiceId);
|
||||
connect(gattCommunicationChannelService, &QLowEnergyService::stateChanged, this, &inspirebike::stateChanged);
|
||||
gattCommunicationChannelService->discoverDetails();
|
||||
if (gattCommunicationChannelService) {
|
||||
connect(gattCommunicationChannelService, &QLowEnergyService::stateChanged, this, &inspirebike::stateChanged);
|
||||
gattCommunicationChannelService->discoverDetails();
|
||||
} else {
|
||||
m_control->disconnectFromDevice();
|
||||
}
|
||||
}
|
||||
|
||||
void inspirebike::errorService(QLowEnergyService::ServiceError err) {
|
||||
|
||||
@@ -430,8 +430,12 @@ void keepbike::serviceScanDone(void) {
|
||||
QBluetoothUuid _gattCommunicationChannelServiceId((quint16)0x00ff);
|
||||
|
||||
gattCommunicationChannelService = m_control->createServiceObject(_gattCommunicationChannelServiceId);
|
||||
connect(gattCommunicationChannelService, &QLowEnergyService::stateChanged, this, &keepbike::stateChanged);
|
||||
gattCommunicationChannelService->discoverDetails();
|
||||
if (gattCommunicationChannelService) {
|
||||
connect(gattCommunicationChannelService, &QLowEnergyService::stateChanged, this, &keepbike::stateChanged);
|
||||
gattCommunicationChannelService->discoverDetails();
|
||||
} else {
|
||||
m_control->disconnectFromDevice();
|
||||
}
|
||||
}
|
||||
|
||||
void keepbike::errorService(QLowEnergyService::ServiceError err) {
|
||||
|
||||
@@ -457,9 +457,13 @@ void kingsmithr1protreadmill::serviceScanDone(void) {
|
||||
ignoreFirstPackage = true;
|
||||
|
||||
gattCommunicationChannelService = m_control->createServiceObject(_gattCommunicationChannelServiceId);
|
||||
connect(gattCommunicationChannelService, &QLowEnergyService::stateChanged, this,
|
||||
&kingsmithr1protreadmill::stateChanged);
|
||||
gattCommunicationChannelService->discoverDetails();
|
||||
if (gattCommunicationChannelService) {
|
||||
connect(gattCommunicationChannelService, &QLowEnergyService::stateChanged, this,
|
||||
&kingsmithr1protreadmill::stateChanged);
|
||||
gattCommunicationChannelService->discoverDetails();
|
||||
} else {
|
||||
m_control->disconnectFromDevice();
|
||||
}
|
||||
}
|
||||
|
||||
void kingsmithr1protreadmill::errorService(QLowEnergyService::ServiceError err) {
|
||||
|
||||
@@ -462,9 +462,13 @@ void kingsmithr2treadmill::serviceScanDone(void) {
|
||||
_gattCommunicationChannelServiceId = QBluetoothUuid(QStringLiteral("00021234-0000-1000-8000-00805f9b34fb"));
|
||||
|
||||
gattCommunicationChannelService = m_control->createServiceObject(_gattCommunicationChannelServiceId);
|
||||
connect(gattCommunicationChannelService, &QLowEnergyService::stateChanged, this,
|
||||
&kingsmithr2treadmill::stateChanged);
|
||||
gattCommunicationChannelService->discoverDetails();
|
||||
if (gattCommunicationChannelService) {
|
||||
connect(gattCommunicationChannelService, &QLowEnergyService::stateChanged, this,
|
||||
&kingsmithr2treadmill::stateChanged);
|
||||
gattCommunicationChannelService->discoverDetails();
|
||||
} else {
|
||||
m_control->disconnectFromDevice();
|
||||
}
|
||||
}
|
||||
|
||||
void kingsmithr2treadmill::errorService(QLowEnergyService::ServiceError err) {
|
||||
|
||||
@@ -769,9 +769,13 @@ void lifefitnesstreadmill::serviceScanDone(void) {
|
||||
auto services_list = m_control->services();
|
||||
for (const QBluetoothUuid &s : qAsConst(services_list)) {
|
||||
gattCommunicationChannelService.append(m_control->createServiceObject(s));
|
||||
connect(gattCommunicationChannelService.constLast(), &QLowEnergyService::stateChanged, this,
|
||||
&lifefitnesstreadmill::stateChanged);
|
||||
gattCommunicationChannelService.constLast()->discoverDetails();
|
||||
if(gattCommunicationChannelService.constLast()) {
|
||||
connect(gattCommunicationChannelService.constLast(), &QLowEnergyService::stateChanged, this,
|
||||
&lifefitnesstreadmill::stateChanged);
|
||||
gattCommunicationChannelService.constLast()->discoverDetails();
|
||||
} else {
|
||||
m_control->disconnectFromDevice();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -395,8 +395,12 @@ void mcfbike::serviceScanDone(void) {
|
||||
QBluetoothUuid _gattCommunicationChannelServiceId(QStringLiteral("6E400001-B5A3-F393-E0A9-E50E24DCCA9E"));
|
||||
|
||||
gattCommunicationChannelService = m_control->createServiceObject(_gattCommunicationChannelServiceId);
|
||||
connect(gattCommunicationChannelService, &QLowEnergyService::stateChanged, this, &mcfbike::stateChanged);
|
||||
gattCommunicationChannelService->discoverDetails();
|
||||
if (gattCommunicationChannelService) {
|
||||
connect(gattCommunicationChannelService, &QLowEnergyService::stateChanged, this, &mcfbike::stateChanged);
|
||||
gattCommunicationChannelService->discoverDetails();
|
||||
} else {
|
||||
m_control->disconnectFromDevice();
|
||||
}
|
||||
}
|
||||
|
||||
void mcfbike::errorService(QLowEnergyService::ServiceError err) {
|
||||
|
||||
@@ -390,8 +390,12 @@ void mepanelbike::serviceScanDone(void) {
|
||||
QBluetoothUuid _gattCommunicationChannelServiceId(QStringLiteral("0000fff0-0000-1000-8000-00805f9b34fb"));
|
||||
|
||||
gattCommunicationChannelService = m_control->createServiceObject(_gattCommunicationChannelServiceId);
|
||||
connect(gattCommunicationChannelService, &QLowEnergyService::stateChanged, this, &mepanelbike::stateChanged);
|
||||
gattCommunicationChannelService->discoverDetails();
|
||||
if(gattCommunicationChannelService) {
|
||||
connect(gattCommunicationChannelService, &QLowEnergyService::stateChanged, this, &mepanelbike::stateChanged);
|
||||
gattCommunicationChannelService->discoverDetails();
|
||||
} else {
|
||||
m_control->disconnectFromDevice();
|
||||
}
|
||||
}
|
||||
|
||||
void mepanelbike::errorService(QLowEnergyService::ServiceError err) {
|
||||
|
||||
@@ -421,6 +421,7 @@ void nautiluselliptical::serviceScanDone(void) {
|
||||
gattCommunicationChannelService = m_control->createServiceObject(_gattCommunicationChannelServiceId);
|
||||
if (gattCommunicationChannelService == nullptr) {
|
||||
qDebug() << QStringLiteral("neither the fallback worked, exiting...");
|
||||
m_control->disconnectFromDevice();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -335,6 +335,7 @@ void nautilustreadmill::serviceScanDone(void) {
|
||||
|
||||
gattCommunicationChannelService = m_control->createServiceObject(_gattCommunicationChannelServiceId);
|
||||
if (!gattCommunicationChannelService) {
|
||||
m_control->disconnectFromDevice();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1405,9 +1405,13 @@ void nordictrackelliptical::serviceScanDone(void) {
|
||||
QBluetoothUuid _gattCommunicationChannelServiceId(QStringLiteral("00001533-1412-efde-1523-785feabcd123"));
|
||||
|
||||
gattCommunicationChannelService = m_control->createServiceObject(_gattCommunicationChannelServiceId);
|
||||
connect(gattCommunicationChannelService, &QLowEnergyService::stateChanged, this,
|
||||
&nordictrackelliptical::stateChanged);
|
||||
gattCommunicationChannelService->discoverDetails();
|
||||
if (gattCommunicationChannelService) {
|
||||
connect(gattCommunicationChannelService, &QLowEnergyService::stateChanged, this,
|
||||
&nordictrackelliptical::stateChanged);
|
||||
gattCommunicationChannelService->discoverDetails();
|
||||
} else {
|
||||
m_control->disconnectFromDevice();
|
||||
}
|
||||
}
|
||||
|
||||
void nordictrackelliptical::errorService(QLowEnergyService::ServiceError err) {
|
||||
|
||||
@@ -574,9 +574,14 @@ void npecablebike::serviceScanDone(void) {
|
||||
|
||||
for (const QBluetoothUuid &s : qAsConst(services_list)) {
|
||||
gattCommunicationChannelService.append(m_control->createServiceObject(s));
|
||||
connect(gattCommunicationChannelService.constLast(), &QLowEnergyService::stateChanged, this,
|
||||
&npecablebike::stateChanged);
|
||||
gattCommunicationChannelService.constLast()->discoverDetails();
|
||||
if (gattCommunicationChannelService.constLast()) {
|
||||
connect(gattCommunicationChannelService.constLast(), &QLowEnergyService::stateChanged, this,
|
||||
&npecablebike::stateChanged);
|
||||
gattCommunicationChannelService.constLast()->discoverDetails();
|
||||
} else {
|
||||
m_control->disconnectFromDevice();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -469,8 +469,12 @@ void octaneelliptical::serviceScanDone(void) {
|
||||
|
||||
QBluetoothUuid _gattCommunicationChannelServiceId(QStringLiteral("96dc867d-7a83-4c22-b6be-6381d727aeda"));
|
||||
gattCommunicationChannelService = m_control->createServiceObject(_gattCommunicationChannelServiceId);
|
||||
connect(gattCommunicationChannelService, &QLowEnergyService::stateChanged, this, &octaneelliptical::stateChanged);
|
||||
gattCommunicationChannelService->discoverDetails();
|
||||
if(gattCommunicationChannelService) {
|
||||
connect(gattCommunicationChannelService, &QLowEnergyService::stateChanged, this, &octaneelliptical::stateChanged);
|
||||
gattCommunicationChannelService->discoverDetails();
|
||||
} else {
|
||||
m_control->disconnectFromDevice();
|
||||
}
|
||||
}
|
||||
|
||||
void octaneelliptical::errorService(QLowEnergyService::ServiceError err) {
|
||||
|
||||
@@ -507,8 +507,13 @@ void octanetreadmill::serviceScanDone(void) {
|
||||
|
||||
QBluetoothUuid _gattCommunicationChannelServiceId(QStringLiteral("96dc867d-7a83-4c22-b6be-6381d727aeda"));
|
||||
gattCommunicationChannelService = m_control->createServiceObject(_gattCommunicationChannelServiceId);
|
||||
connect(gattCommunicationChannelService, &QLowEnergyService::stateChanged, this, &octanetreadmill::stateChanged);
|
||||
gattCommunicationChannelService->discoverDetails();
|
||||
if (gattCommunicationChannelService) {
|
||||
connect(gattCommunicationChannelService, &QLowEnergyService::stateChanged, this,
|
||||
&octanetreadmill::stateChanged);
|
||||
gattCommunicationChannelService->discoverDetails();
|
||||
} else {
|
||||
m_control->disconnectFromDevice();
|
||||
}
|
||||
}
|
||||
|
||||
void octanetreadmill::errorService(QLowEnergyService::ServiceError err) {
|
||||
|
||||
@@ -386,8 +386,12 @@ void pafersbike::serviceScanDone(void) {
|
||||
QBluetoothUuid _gattCommunicationChannelServiceId(QStringLiteral("72d70001-501f-46f7-95f9-23846ee1aba3"));
|
||||
|
||||
gattCommunicationChannelService = m_control->createServiceObject(_gattCommunicationChannelServiceId);
|
||||
connect(gattCommunicationChannelService, &QLowEnergyService::stateChanged, this, &pafersbike::stateChanged);
|
||||
gattCommunicationChannelService->discoverDetails();
|
||||
if (gattCommunicationChannelService) {
|
||||
connect(gattCommunicationChannelService, &QLowEnergyService::stateChanged, this, &pafersbike::stateChanged);
|
||||
gattCommunicationChannelService->discoverDetails();
|
||||
} else {
|
||||
m_control->disconnectFromDevice();
|
||||
}
|
||||
}
|
||||
|
||||
void pafersbike::errorService(QLowEnergyService::ServiceError err) {
|
||||
|
||||
@@ -371,8 +371,13 @@ void paferstreadmill::serviceScanDone(void) {
|
||||
|
||||
QBluetoothUuid _gattCommunicationChannelServiceId(QStringLiteral("72d70001-501f-46f7-95f9-23846ee1aba3"));
|
||||
gattCommunicationChannelService = m_control->createServiceObject(_gattCommunicationChannelServiceId);
|
||||
connect(gattCommunicationChannelService, &QLowEnergyService::stateChanged, this, &paferstreadmill::stateChanged);
|
||||
gattCommunicationChannelService->discoverDetails();
|
||||
if (gattCommunicationChannelService) {
|
||||
connect(gattCommunicationChannelService, &QLowEnergyService::stateChanged, this,
|
||||
&paferstreadmill::stateChanged);
|
||||
gattCommunicationChannelService->discoverDetails();
|
||||
} else {
|
||||
m_control->disconnectFromDevice();
|
||||
}
|
||||
}
|
||||
|
||||
void paferstreadmill::errorService(QLowEnergyService::ServiceError err) {
|
||||
|
||||
@@ -1647,8 +1647,12 @@ void proformbike::serviceScanDone(void) {
|
||||
QBluetoothUuid _gattCommunicationChannelServiceId(QStringLiteral("00001533-1412-efde-1523-785feabcd123"));
|
||||
|
||||
gattCommunicationChannelService = m_control->createServiceObject(_gattCommunicationChannelServiceId);
|
||||
connect(gattCommunicationChannelService, &QLowEnergyService::stateChanged, this, &proformbike::stateChanged);
|
||||
gattCommunicationChannelService->discoverDetails();
|
||||
if (gattCommunicationChannelService) {
|
||||
connect(gattCommunicationChannelService, &QLowEnergyService::stateChanged, this, &proformbike::stateChanged);
|
||||
gattCommunicationChannelService->discoverDetails();
|
||||
} else {
|
||||
m_control->disconnectFromDevice();
|
||||
}
|
||||
}
|
||||
|
||||
void proformbike::errorService(QLowEnergyService::ServiceError err) {
|
||||
|
||||
@@ -450,8 +450,13 @@ void proformelliptical::serviceScanDone(void) {
|
||||
QBluetoothUuid _gattCommunicationChannelServiceId(QStringLiteral("00001533-1412-efde-1523-785feabcd123"));
|
||||
|
||||
gattCommunicationChannelService = m_control->createServiceObject(_gattCommunicationChannelServiceId);
|
||||
connect(gattCommunicationChannelService, &QLowEnergyService::stateChanged, this, &proformelliptical::stateChanged);
|
||||
gattCommunicationChannelService->discoverDetails();
|
||||
if (gattCommunicationChannelService) {
|
||||
connect(gattCommunicationChannelService, &QLowEnergyService::stateChanged, this,
|
||||
&proformelliptical::stateChanged);
|
||||
gattCommunicationChannelService->discoverDetails();
|
||||
} else {
|
||||
m_control->disconnectFromDevice();
|
||||
}
|
||||
}
|
||||
|
||||
void proformelliptical::errorService(QLowEnergyService::ServiceError err) {
|
||||
|
||||
@@ -619,9 +619,13 @@ void proformellipticaltrainer::serviceScanDone(void) {
|
||||
QBluetoothUuid _gattCommunicationChannelServiceId(QStringLiteral("00001533-1412-efde-1523-785feabcd123"));
|
||||
|
||||
gattCommunicationChannelService = m_control->createServiceObject(_gattCommunicationChannelServiceId);
|
||||
connect(gattCommunicationChannelService, &QLowEnergyService::stateChanged, this,
|
||||
&proformellipticaltrainer::stateChanged);
|
||||
gattCommunicationChannelService->discoverDetails();
|
||||
if (gattCommunicationChannelService) {
|
||||
connect(gattCommunicationChannelService, &QLowEnergyService::stateChanged, this,
|
||||
&proformellipticaltrainer::stateChanged);
|
||||
gattCommunicationChannelService->discoverDetails();
|
||||
} else {
|
||||
m_control->disconnectFromDevice();
|
||||
}
|
||||
}
|
||||
|
||||
void proformellipticaltrainer::errorService(QLowEnergyService::ServiceError err) {
|
||||
|
||||
@@ -773,8 +773,12 @@ void proformrower::serviceScanDone(void) {
|
||||
QBluetoothUuid _gattCommunicationChannelServiceId(QStringLiteral("00001533-1412-efde-1523-785feabcd123"));
|
||||
|
||||
gattCommunicationChannelService = m_control->createServiceObject(_gattCommunicationChannelServiceId);
|
||||
connect(gattCommunicationChannelService, &QLowEnergyService::stateChanged, this, &proformrower::stateChanged);
|
||||
gattCommunicationChannelService->discoverDetails();
|
||||
if (gattCommunicationChannelService) {
|
||||
connect(gattCommunicationChannelService, &QLowEnergyService::stateChanged, this, &proformrower::stateChanged);
|
||||
gattCommunicationChannelService->discoverDetails();
|
||||
} else {
|
||||
m_control->disconnectFromDevice();
|
||||
}
|
||||
}
|
||||
|
||||
void proformrower::errorService(QLowEnergyService::ServiceError err) {
|
||||
|
||||
@@ -2496,8 +2496,13 @@ void proformtreadmill::serviceScanDone(void) {
|
||||
QBluetoothUuid _gattCommunicationChannelServiceId(QStringLiteral("00001533-1412-efde-1523-785feabcd123"));
|
||||
|
||||
gattCommunicationChannelService = m_control->createServiceObject(_gattCommunicationChannelServiceId);
|
||||
connect(gattCommunicationChannelService, &QLowEnergyService::stateChanged, this, &proformtreadmill::stateChanged);
|
||||
gattCommunicationChannelService->discoverDetails();
|
||||
if (gattCommunicationChannelService) {
|
||||
connect(gattCommunicationChannelService, &QLowEnergyService::stateChanged, this,
|
||||
&proformtreadmill::stateChanged);
|
||||
gattCommunicationChannelService->discoverDetails();
|
||||
} else {
|
||||
m_control->disconnectFromDevice();
|
||||
}
|
||||
}
|
||||
|
||||
void proformtreadmill::errorService(QLowEnergyService::ServiceError err) {
|
||||
|
||||
@@ -631,9 +631,14 @@ void renphobike::serviceScanDone(void) {
|
||||
#endif
|
||||
{
|
||||
gattCommunicationChannelService.append(m_control->createServiceObject(s));
|
||||
connect(gattCommunicationChannelService.last(), SIGNAL(stateChanged(QLowEnergyService::ServiceState)), this,
|
||||
if (gattCommunicationChannelService.constLast()) {
|
||||
connect(gattCommunicationChannelService.last(), SIGNAL(stateChanged(QLowEnergyService::ServiceState)), this,
|
||||
SLOT(stateChanged(QLowEnergyService::ServiceState)));
|
||||
gattCommunicationChannelService.last()->discoverDetails();
|
||||
gattCommunicationChannelService.last()->discoverDetails();
|
||||
} else {
|
||||
m_control->disconnectFromDevice();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -405,9 +405,13 @@ void schwinn170bike::serviceScanDone(void) {
|
||||
auto services_list = m_control->services();
|
||||
for (const QBluetoothUuid &s : qAsConst(services_list)) {
|
||||
gattCommunicationChannelService.append(m_control->createServiceObject(s));
|
||||
connect(gattCommunicationChannelService.constLast(), &QLowEnergyService::stateChanged, this,
|
||||
&schwinn170bike::stateChanged);
|
||||
gattCommunicationChannelService.constLast()->discoverDetails();
|
||||
if(gattCommunicationChannelService.constLast()) {
|
||||
connect(gattCommunicationChannelService.constLast(), &QLowEnergyService::stateChanged, this,
|
||||
&schwinn170bike::stateChanged);
|
||||
gattCommunicationChannelService.constLast()->discoverDetails();
|
||||
} else {
|
||||
m_control->disconnectFromDevice();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -478,8 +478,12 @@ void schwinnic4bike::serviceScanDone(void) {
|
||||
emit debug(QStringLiteral("serviceScanDone"));
|
||||
|
||||
gattCommunicationChannelService = m_control->createServiceObject(QBluetoothUuid((quint16)0x1826));
|
||||
connect(gattCommunicationChannelService, &QLowEnergyService::stateChanged, this, &schwinnic4bike::stateChanged);
|
||||
gattCommunicationChannelService->discoverDetails();
|
||||
if (gattCommunicationChannelService) {
|
||||
connect(gattCommunicationChannelService, &QLowEnergyService::stateChanged, this, &schwinnic4bike::stateChanged);
|
||||
gattCommunicationChannelService->discoverDetails();
|
||||
} else {
|
||||
m_control->disconnectFromDevice();
|
||||
}
|
||||
}
|
||||
|
||||
void schwinnic4bike::errorService(QLowEnergyService::ServiceError err) {
|
||||
|
||||
@@ -494,9 +494,14 @@ void shuaa5treadmill::serviceScanDone(void) {
|
||||
auto services_list = m_control->services();
|
||||
for (const QBluetoothUuid &s : qAsConst(services_list)) {
|
||||
gattCommunicationChannelService.append(m_control->createServiceObject(s));
|
||||
connect(gattCommunicationChannelService.constLast(), &QLowEnergyService::stateChanged, this,
|
||||
&shuaa5treadmill::stateChanged);
|
||||
gattCommunicationChannelService.constLast()->discoverDetails();
|
||||
if (gattCommunicationChannelService.constLast()) {
|
||||
connect(gattCommunicationChannelService.constLast(), &QLowEnergyService::stateChanged, this,
|
||||
&shuaa5treadmill::stateChanged);
|
||||
gattCommunicationChannelService.constLast()->discoverDetails();
|
||||
} else {
|
||||
m_control->disconnectFromDevice();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -405,8 +405,13 @@ void skandikawiribike::serviceScanDone(void) {
|
||||
QBluetoothUuid _gattCommunicationChannelServiceId((quint16)0xfff0);
|
||||
|
||||
gattCommunicationChannelService = m_control->createServiceObject(_gattCommunicationChannelServiceId);
|
||||
connect(gattCommunicationChannelService, &QLowEnergyService::stateChanged, this, &skandikawiribike::stateChanged);
|
||||
gattCommunicationChannelService->discoverDetails();
|
||||
if (gattCommunicationChannelService) {
|
||||
connect(gattCommunicationChannelService, &QLowEnergyService::stateChanged, this,
|
||||
&skandikawiribike::stateChanged);
|
||||
gattCommunicationChannelService->discoverDetails();
|
||||
} else {
|
||||
m_control->disconnectFromDevice();
|
||||
}
|
||||
}
|
||||
|
||||
void skandikawiribike::errorService(QLowEnergyService::ServiceError err) {
|
||||
|
||||
@@ -413,8 +413,12 @@ void smartrowrower::serviceScanDone(void) {
|
||||
QBluetoothUuid _gattCommunicationChannelServiceId((quint16)0x1234);
|
||||
|
||||
gattCommunicationChannelService = m_control->createServiceObject(_gattCommunicationChannelServiceId);
|
||||
connect(gattCommunicationChannelService, &QLowEnergyService::stateChanged, this, &smartrowrower::stateChanged);
|
||||
gattCommunicationChannelService->discoverDetails();
|
||||
if (gattCommunicationChannelService) {
|
||||
connect(gattCommunicationChannelService, &QLowEnergyService::stateChanged, this, &smartrowrower::stateChanged);
|
||||
gattCommunicationChannelService->discoverDetails();
|
||||
} else {
|
||||
m_control->disconnectFromDevice();
|
||||
}
|
||||
}
|
||||
|
||||
void smartrowrower::errorService(QLowEnergyService::ServiceError err) {
|
||||
|
||||
@@ -455,8 +455,12 @@ void snodebike::serviceScanDone() {
|
||||
emit debug(QStringLiteral("serviceScanDone"));
|
||||
|
||||
gattCommunicationChannelService = m_control->createServiceObject(QBluetoothUuid((quint16)0x1826));
|
||||
connect(gattCommunicationChannelService, &QLowEnergyService::stateChanged, this, &snodebike::stateChanged);
|
||||
gattCommunicationChannelService->discoverDetails();
|
||||
if (gattCommunicationChannelService) {
|
||||
connect(gattCommunicationChannelService, &QLowEnergyService::stateChanged, this, &snodebike::stateChanged);
|
||||
gattCommunicationChannelService->discoverDetails();
|
||||
} else {
|
||||
m_control->disconnectFromDevice();
|
||||
}
|
||||
}
|
||||
|
||||
void snodebike::errorService(QLowEnergyService::ServiceError err) {
|
||||
|
||||
@@ -495,8 +495,12 @@ void solebike::serviceScanDone(void) {
|
||||
QBluetoothUuid _gattCommunicationChannelServiceId(QStringLiteral("49535343-fe7d-4ae5-8fa9-9fafd205e455"));
|
||||
|
||||
gattCommunicationChannelService = m_control->createServiceObject(_gattCommunicationChannelServiceId);
|
||||
connect(gattCommunicationChannelService, &QLowEnergyService::stateChanged, this, &solebike::stateChanged);
|
||||
gattCommunicationChannelService->discoverDetails();
|
||||
if (gattCommunicationChannelService) {
|
||||
connect(gattCommunicationChannelService, &QLowEnergyService::stateChanged, this, &solebike::stateChanged);
|
||||
gattCommunicationChannelService->discoverDetails();
|
||||
} else {
|
||||
m_control->disconnectFromDevice();
|
||||
}
|
||||
}
|
||||
|
||||
void solebike::errorService(QLowEnergyService::ServiceError err) {
|
||||
|
||||
@@ -543,8 +543,12 @@ void soleelliptical::serviceScanDone(void) {
|
||||
QBluetoothUuid _gattCommunicationChannelServiceId(QStringLiteral("49535343-fe7d-4ae5-8fa9-9fafd205e455"));
|
||||
|
||||
gattCommunicationChannelService = m_control->createServiceObject(_gattCommunicationChannelServiceId);
|
||||
connect(gattCommunicationChannelService, &QLowEnergyService::stateChanged, this, &soleelliptical::stateChanged);
|
||||
gattCommunicationChannelService->discoverDetails();
|
||||
if (gattCommunicationChannelService) {
|
||||
connect(gattCommunicationChannelService, &QLowEnergyService::stateChanged, this, &soleelliptical::stateChanged);
|
||||
gattCommunicationChannelService->discoverDetails();
|
||||
} else {
|
||||
m_control->disconnectFromDevice();
|
||||
}
|
||||
}
|
||||
|
||||
void soleelliptical::errorService(QLowEnergyService::ServiceError err) {
|
||||
|
||||
@@ -862,9 +862,14 @@ void solef80treadmill::serviceScanDone(void) {
|
||||
auto services_list = m_control->services();
|
||||
for (const QBluetoothUuid &s : qAsConst(services_list)) {
|
||||
gattCommunicationChannelService.append(m_control->createServiceObject(s));
|
||||
connect(gattCommunicationChannelService.constLast(), &QLowEnergyService::stateChanged, this,
|
||||
&solef80treadmill::stateChanged);
|
||||
gattCommunicationChannelService.constLast()->discoverDetails();
|
||||
if (gattCommunicationChannelService.constLast()) {
|
||||
connect(gattCommunicationChannelService.constLast(), &QLowEnergyService::stateChanged, this,
|
||||
&solef80treadmill::stateChanged);
|
||||
gattCommunicationChannelService.constLast()->discoverDetails();
|
||||
} else {
|
||||
m_control->disconnectFromDevice();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -517,6 +517,7 @@ void spirittreadmill::serviceScanDone(void) {
|
||||
|
||||
if (gattCommunicationChannelService == nullptr) {
|
||||
qDebug() << QStringLiteral("invalid service") << _gattCommunicationChannelServiceId.toString();
|
||||
m_control->disconnectFromDevice();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -431,6 +431,7 @@ void sportsplusbike::serviceScanDone(void) {
|
||||
|
||||
if (gattCommunicationChannelService == nullptr) {
|
||||
qDebug() << QStringLiteral("invalid service") << _gattCommunicationChannelServiceId.toString();
|
||||
m_control->disconnectFromDevice();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -328,6 +328,7 @@ void sportstechbike::serviceScanDone(void) {
|
||||
|
||||
if (gattCommunicationChannelService == nullptr) {
|
||||
qDebug() << QStringLiteral("invalid service") << _gattCommunicationChannelServiceId.toString();
|
||||
m_control->disconnectFromDevice();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -525,9 +525,14 @@ void stagesbike::serviceScanDone(void) {
|
||||
auto services_list = m_control->services();
|
||||
for (const QBluetoothUuid &s : qAsConst(services_list)) {
|
||||
gattCommunicationChannelService.append(m_control->createServiceObject(s));
|
||||
connect(gattCommunicationChannelService.constLast(), &QLowEnergyService::stateChanged, this,
|
||||
&stagesbike::stateChanged);
|
||||
gattCommunicationChannelService.constLast()->discoverDetails();
|
||||
if (gattCommunicationChannelService.constLast()) {
|
||||
connect(gattCommunicationChannelService.constLast(), &QLowEnergyService::stateChanged, this,
|
||||
&stagesbike::stateChanged);
|
||||
gattCommunicationChannelService.constLast()->discoverDetails();
|
||||
} else {
|
||||
m_control->disconnectFromDevice();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -497,9 +497,14 @@ void tacxneo2::serviceScanDone(void) {
|
||||
auto services = m_control->services();
|
||||
for (const QBluetoothUuid &s : services) {
|
||||
gattCommunicationChannelService.append(m_control->createServiceObject(s));
|
||||
connect(gattCommunicationChannelService.constLast(), &QLowEnergyService::stateChanged, this,
|
||||
&tacxneo2::stateChanged);
|
||||
gattCommunicationChannelService.constLast()->discoverDetails();
|
||||
if (gattCommunicationChannelService.constLast()) {
|
||||
connect(gattCommunicationChannelService.constLast(), &QLowEnergyService::stateChanged, this,
|
||||
&tacxneo2::stateChanged);
|
||||
gattCommunicationChannelService.constLast()->discoverDetails();
|
||||
} else {
|
||||
m_control->disconnectFromDevice();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -628,9 +628,14 @@ void technogymmyruntreadmill::serviceScanDone(void) {
|
||||
auto services_list = m_control->services();
|
||||
for (const QBluetoothUuid &s : qAsConst(services_list)) {
|
||||
gattCommunicationChannelService.append(m_control->createServiceObject(s));
|
||||
connect(gattCommunicationChannelService.constLast(), &QLowEnergyService::stateChanged, this,
|
||||
&technogymmyruntreadmill::stateChanged);
|
||||
gattCommunicationChannelService.constLast()->discoverDetails();
|
||||
if (gattCommunicationChannelService.constLast()) {
|
||||
connect(gattCommunicationChannelService.constLast(), &QLowEnergyService::stateChanged, this,
|
||||
&technogymmyruntreadmill::stateChanged);
|
||||
gattCommunicationChannelService.constLast()->discoverDetails();
|
||||
} else {
|
||||
m_control->disconnectFromDevice();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -293,8 +293,12 @@ void truetreadmill::serviceScanDone(void) {
|
||||
QBluetoothUuid _gattCommunicationChannelServiceId(QStringLiteral("a026ee07-0a7d-4ab3-97fa-f1500f9feb8b"));
|
||||
|
||||
gattCommunicationChannelService = m_control->createServiceObject(_gattCommunicationChannelServiceId);
|
||||
connect(gattCommunicationChannelService, &QLowEnergyService::stateChanged, this, &truetreadmill::stateChanged);
|
||||
gattCommunicationChannelService->discoverDetails();
|
||||
if (gattCommunicationChannelService) {
|
||||
connect(gattCommunicationChannelService, &QLowEnergyService::stateChanged, this, &truetreadmill::stateChanged);
|
||||
gattCommunicationChannelService->discoverDetails();
|
||||
} else {
|
||||
m_control->disconnectFromDevice();
|
||||
}
|
||||
}
|
||||
|
||||
void truetreadmill::errorService(QLowEnergyService::ServiceError err) {
|
||||
|
||||
@@ -898,7 +898,7 @@ void trxappgateusbbike::serviceScanDone(void) {
|
||||
|
||||
if (gattCommunicationChannelService == nullptr) {
|
||||
qDebug() << QStringLiteral("invalid service") << uuid;
|
||||
|
||||
m_control->disconnectFromDevice();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -654,6 +654,7 @@ void trxappgateusbtreadmill::serviceScanDone(void) {
|
||||
gattCommunicationChannelService = m_control->createServiceObject(_gattCommunicationChannelServiceId2);
|
||||
if (gattCommunicationChannelService == nullptr) {
|
||||
qDebug() << QStringLiteral("invalid service") << uuid;
|
||||
m_control->disconnectFromDevice();
|
||||
return;
|
||||
} else {
|
||||
treadmill_type = TYPE::IRUNNING_2;
|
||||
@@ -672,6 +673,7 @@ void trxappgateusbtreadmill::serviceScanDone(void) {
|
||||
}
|
||||
} else {
|
||||
qDebug() << QStringLiteral("invalid service") << uuid;
|
||||
m_control->disconnectFromDevice();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -365,8 +365,12 @@ void ultrasportbike::serviceScanDone(void) {
|
||||
QBluetoothUuid _gattCommunicationChannelServiceId(QStringLiteral("0000fff0-0000-1000-8000-00805f9b34fb"));
|
||||
|
||||
gattCommunicationChannelService = m_control->createServiceObject(_gattCommunicationChannelServiceId);
|
||||
connect(gattCommunicationChannelService, &QLowEnergyService::stateChanged, this, &ultrasportbike::stateChanged);
|
||||
gattCommunicationChannelService->discoverDetails();
|
||||
if (gattCommunicationChannelService) {
|
||||
connect(gattCommunicationChannelService, &QLowEnergyService::stateChanged, this, &ultrasportbike::stateChanged);
|
||||
gattCommunicationChannelService->discoverDetails();
|
||||
} else {
|
||||
m_control->disconnectFromDevice();
|
||||
}
|
||||
}
|
||||
|
||||
void ultrasportbike::errorService(QLowEnergyService::ServiceError err) {
|
||||
|
||||
@@ -694,9 +694,14 @@ void wahookickrsnapbike::serviceScanDone(void) {
|
||||
auto services_list = m_control->services();
|
||||
for (const QBluetoothUuid &s : qAsConst(services_list)) {
|
||||
gattCommunicationChannelService.append(m_control->createServiceObject(s));
|
||||
connect(gattCommunicationChannelService.constLast(), &QLowEnergyService::stateChanged, this,
|
||||
&wahookickrsnapbike::stateChanged);
|
||||
gattCommunicationChannelService.constLast()->discoverDetails();
|
||||
if (gattCommunicationChannelService.constLast()) {
|
||||
connect(gattCommunicationChannelService.constLast(), &QLowEnergyService::stateChanged, this,
|
||||
&wahookickrsnapbike::stateChanged);
|
||||
gattCommunicationChannelService.constLast()->discoverDetails();
|
||||
} else {
|
||||
m_control->disconnectFromDevice();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -309,8 +309,12 @@ void yesoulbike::serviceScanDone(void) {
|
||||
QBluetoothUuid _gattCommunicationChannelServiceId((quint16)0xFFF0);
|
||||
|
||||
gattCommunicationChannelService = m_control->createServiceObject(_gattCommunicationChannelServiceId);
|
||||
connect(gattCommunicationChannelService, &QLowEnergyService::stateChanged, this, &yesoulbike::stateChanged);
|
||||
gattCommunicationChannelService->discoverDetails();
|
||||
if (gattCommunicationChannelService) {
|
||||
connect(gattCommunicationChannelService, &QLowEnergyService::stateChanged, this, &yesoulbike::stateChanged);
|
||||
gattCommunicationChannelService->discoverDetails();
|
||||
} else {
|
||||
m_control->disconnectFromDevice();
|
||||
}
|
||||
}
|
||||
|
||||
void yesoulbike::errorService(QLowEnergyService::ServiceError err) {
|
||||
|
||||
@@ -589,9 +589,13 @@ void ypooelliptical::serviceScanDone(void) {
|
||||
auto services_list = m_control->services();
|
||||
for (const QBluetoothUuid &s : qAsConst(services_list)) {
|
||||
gattCommunicationChannelService.append(m_control->createServiceObject(s));
|
||||
connect(gattCommunicationChannelService.constLast(), &QLowEnergyService::stateChanged, this,
|
||||
if(gattCommunicationChannelService.constLast()) {
|
||||
connect(gattCommunicationChannelService.constLast(), &QLowEnergyService::stateChanged, this,
|
||||
&ypooelliptical::stateChanged);
|
||||
gattCommunicationChannelService.constLast()->discoverDetails();
|
||||
gattCommunicationChannelService.constLast()->discoverDetails();
|
||||
} else {
|
||||
m_control->disconnectFromDevice();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -322,8 +322,12 @@ void ziprotreadmill::serviceScanDone(void) {
|
||||
|
||||
QBluetoothUuid _gattCommunicationChannelServiceId((quint16)0xfff0);
|
||||
gattCommunicationChannelService = m_control->createServiceObject(_gattCommunicationChannelServiceId);
|
||||
connect(gattCommunicationChannelService, &QLowEnergyService::stateChanged, this, &ziprotreadmill::stateChanged);
|
||||
gattCommunicationChannelService->discoverDetails();
|
||||
if(gattCommunicationChannelService) {
|
||||
connect(gattCommunicationChannelService, &QLowEnergyService::stateChanged, this, &ziprotreadmill::stateChanged);
|
||||
gattCommunicationChannelService->discoverDetails();
|
||||
} else {
|
||||
m_control->disconnectFromDevice();
|
||||
}
|
||||
}
|
||||
|
||||
void ziprotreadmill::errorService(QLowEnergyService::ServiceError err) {
|
||||
|
||||
Reference in New Issue
Block a user