Skip to content

Commit b2a28d7

Browse files
committed
DMASUN bike watt HR based
1 parent 2db5683 commit b2a28d7

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

src/devices/ftmsbike/ftmsbike.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -753,7 +753,7 @@ void ftmsbike::characteristicChanged(const QLowEnergyCharacteristic &characteris
753753
} else if (MRK_S26C) {
754754
m_watt = Cadence.value() * (Resistance.value() * 1.16);
755755
emit debug(QStringLiteral("Current Watt (MRK-S26C formula): ") + QString::number(m_watt.value()));
756-
} else if (LYDSTO && watt_ignore_builtin) {
756+
} else if ((LYDSTO || DMASUN) && watt_ignore_builtin) {
757757
m_watt = wattFromHR(true);
758758
emit debug(QStringLiteral("Current Watt: ") + QString::number(m_watt.value()));
759759
} else {
@@ -1747,6 +1747,9 @@ void ftmsbike::deviceDiscovered(const QBluetoothDeviceInfo &device) {
17471747
} else if ((bluetoothDevice.name().toUpper().startsWith("LYDSTO"))) {
17481748
qDebug() << QStringLiteral("LYDSTO found");
17491749
LYDSTO = true;
1750+
} else if ((bluetoothDevice.name().toUpper().startsWith("DMASUN-") && bluetoothDevice.name().toUpper().endsWith("-BIKE"))) {
1751+
qDebug() << QStringLiteral("DMASUN bike found");
1752+
DMASUN = true;
17501753
} else if ((bluetoothDevice.name().toUpper().startsWith("SL010-"))) {
17511754
qDebug() << QStringLiteral("SL010 found");
17521755
SL010 = true;

src/devices/ftmsbike/ftmsbike.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ class ftmsbike : public bike {
154154
bool BIKE_ = false;
155155
bool SMB1 = false;
156156
bool LYDSTO = false;
157+
bool DMASUN = false;
157158
bool SL010 = false;
158159
bool REEBOK = false;
159160
bool TITAN_7000 = false;

0 commit comments

Comments
 (0)