Skip to content

Commit d37aa9e

Browse files
authored
Gate Sole bike detection on disabled FTMS bike (#4761)
1 parent 00d0676 commit d37aa9e

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

src/devices/bluetooth.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2777,7 +2777,7 @@ void bluetooth::deviceDiscovered(const QBluetoothDeviceInfo &device) {
27772777
} else if ((b.name().toUpper().startsWith(QStringLiteral("LCB")) ||
27782778
b.name().toUpper().startsWith("LCR") ||
27792779
b.name().toUpper().startsWith(QStringLiteral("R92"))) &&
2780-
!soleBike && filter) {
2780+
ftms_bike.contains(QZSettings::default_ftms_bike) && !soleBike && filter) {
27812781
this->setLastBluetoothDevice(b);
27822782
this->stopDiscovery();
27832783
soleBike = new solebike(noWriteResistance, noHeartService, bikeResistanceOffset, bikeResistanceGain);

tst/Devices/devicetestdataindex.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1115,7 +1115,8 @@ void DeviceTestDataIndex::Initialize() {
11151115
// Sole Bike
11161116
RegisterNewDeviceTestData(DeviceIndex::SoleBike)
11171117
->expectDevice<solebike>()
1118-
->acceptDeviceNames({"LCB", "R92"}, DeviceNameComparison::StartsWithIgnoreCase);
1118+
->acceptDeviceNames({"LCB", "LCR", "R92"}, DeviceNameComparison::StartsWithIgnoreCase)
1119+
->configureSettingsWith(QZSettings::ftms_bike, QZSettings::default_ftms_bike, "XX");
11191120

11201121
// Sole Elliptical
11211122
RegisterNewDeviceTestData(DeviceIndex::SoleElliptical)

0 commit comments

Comments
 (0)