@@ -2016,6 +2016,19 @@ void bluetooth::deviceDiscovered(const QBluetoothDeviceInfo &device) {
20162016 connect (echelonStairclimber, &echelonstairclimber::inclinationChanged, this , &bluetooth::inclinationChanged);
20172017 echelonStairclimber->deviceDiscovered (b);
20182018 this ->signalBluetoothDeviceConnected (echelonStairclimber);
2019+ } else if (b.name ().toUpper ().startsWith (QLatin1String (" SF-S" )) &&
2020+ !sunnyfitStepper && filter) {
2021+ this ->setLastBluetoothDevice (b);
2022+ this ->stopDiscovery ();
2023+ sunnyfitStepper = new sunnyfitstepper (this ->pollDeviceTime , noConsole, noHeartService);
2024+ emit deviceConnected (b);
2025+ connect (sunnyfitStepper, &bluetoothdevice::connectedAndDiscovered, this ,
2026+ &bluetooth::connectedAndDiscovered);
2027+ connect (sunnyfitStepper, &sunnyfitstepper::debug, this , &bluetooth::debug);
2028+ connect (sunnyfitStepper, &sunnyfitstepper::speedChanged, this , &bluetooth::speedChanged);
2029+ connect (sunnyfitStepper, &sunnyfitstepper::inclinationChanged, this , &bluetooth::inclinationChanged);
2030+ sunnyfitStepper->deviceDiscovered (b);
2031+ this ->signalBluetoothDeviceConnected (sunnyfitStepper);
20192032 } else if ((b.name ().toUpper ().startsWith (QLatin1String (" ECH-STRIDE" )) ||
20202033 b.name ().toUpper ().startsWith (QLatin1String (" ECH-UK-" )) ||
20212034 b.name ().toUpper ().startsWith (QLatin1String (" ECH-FR-" )) ||
@@ -3615,6 +3628,11 @@ void bluetooth::restart() {
36153628 delete echelonStairclimber;
36163629 echelonStairclimber = nullptr ;
36173630 }
3631+ if (sunnyfitStepper) {
3632+
3633+ delete sunnyfitStepper;
3634+ sunnyfitStepper = nullptr ;
3635+ }
36183636 if (octaneTreadmill) {
36193637
36203638 delete octaneTreadmill;
@@ -4044,6 +4062,8 @@ bluetoothdevice *bluetooth::device() {
40444062 return echelonStride;
40454063 } else if (echelonStairclimber) {
40464064 return echelonStairclimber;
4065+ } else if (sunnyfitStepper) {
4066+ return sunnyfitStepper;
40474067 } else if (octaneTreadmill) {
40484068 return octaneTreadmill;
40494069 } else if (ziproTreadmill) {
0 commit comments