Skip to content

Commit 75168f1

Browse files
committed
Add WT treadmill device support (e.g. WT703)
Adds support for WT treadmill devices with names matching pattern "WT" followed by 3 digits (max 5 characters). The forceSpeed is scaled to miles when miles_unit setting is enabled, similar to TM4800/TM6500/T3G_ELITE. https://claude.ai/code/session_01GJXMLrS4sA9LFxSkASSwuU
1 parent 9487fa3 commit 75168f1

3 files changed

Lines changed: 7 additions & 2 deletions

File tree

src/devices/bluetooth.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1569,7 +1569,8 @@ void bluetooth::deviceDiscovered(const QBluetoothDeviceInfo &device) {
15691569
(b.name().toUpper().startsWith(QStringLiteral("TC-"))) || // FTMS (Focus Fitness Jet 7 iPlus)
15701570
b.name().toUpper().startsWith(QStringLiteral("TM XP_")) || // FTMS
15711571
b.name().toUpper().startsWith(QStringLiteral("THERUN T15")) || // FTMS
1572-
b.name().toUpper().startsWith(QStringLiteral("BODYCRAFT_")) // Bodycraft T850 Treadmill
1572+
b.name().toUpper().startsWith(QStringLiteral("BODYCRAFT_")) || // Bodycraft T850 Treadmill
1573+
(b.name().toUpper().startsWith(QStringLiteral("WT")) && b.name().length() == 5 && b.name().midRef(2).toInt() > 0) // WT treadmill (e.g. WT703)
15731574
) &&
15741575
!horizonTreadmill && filter) {
15751576
this->setLastBluetoothDevice(b);

src/devices/horizontreadmill/horizontreadmill.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1261,7 +1261,7 @@ void horizontreadmill::forceSpeed(double requestSpeed) {
12611261
if(BOWFLEX_T9) {
12621262
requestSpeed *= miles_conversion; // this treadmill wants the speed in miles, at least seems so!!
12631263
}
1264-
if(TM4800 || TM6500 || T3G_ELITE) {
1264+
if(TM4800 || TM6500 || T3G_ELITE || WT_TREADMILL) {
12651265
bool miles = settings.value(QZSettings::miles_unit, QZSettings::default_miles_unit).toBool();
12661266
if(miles) {
12671267
requestSpeed *= miles_conversion; // these treadmills want the speed in miles when miles_unit is enabled
@@ -2698,6 +2698,9 @@ void horizontreadmill::deviceDiscovered(const QBluetoothDeviceInfo &device) {
26982698
qDebug() << QStringLiteral("TM6500 treadmill found");
26992699
TM6500 = true;
27002700
minInclination = -3.0;
2701+
} else if (device.name().toUpper().startsWith(QStringLiteral("WT")) && device.name().length() == 5) {
2702+
qDebug() << QStringLiteral("WT treadmill found");
2703+
WT_TREADMILL = true;
27012704
}
27022705

27032706
if (device.name().toUpper().startsWith(QStringLiteral("TRX3500"))) {

src/devices/horizontreadmill/horizontreadmill.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ class horizontreadmill : public treadmill {
119119
bool T01 = false;
120120
bool TM4800 = false;
121121
bool TM6500 = false;
122+
bool WT_TREADMILL = false;
122123

123124
void testProfileCRC();
124125
void updateProfileCRC();

0 commit comments

Comments
 (0)