Skip to content

Commit 6e28e83

Browse files
cagnuleinclaude
andcommitted
feat: add V-BLE-R support to ftmsrower without init request
Devices with name prefix "V-BLE-R-" are now recognized and flagged as V_BLE_R. For these devices the FTMS init/start commands are skipped on connection so the device is not disturbed by the control-point write. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent b902555 commit 6e28e83

2 files changed

Lines changed: 15 additions & 9 deletions

File tree

src/devices/ftmsrower/ftmsrower.cpp

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -78,15 +78,17 @@ void ftmsrower::update() {
7878
}
7979

8080
if (initRequest) {
81-
if(I_ROWER || SF_RW || ROWER || MRK_R06) {
82-
uint8_t write[] = {FTMS_REQUEST_CONTROL};
83-
writeCharacteristic(write, sizeof(write), "start", false, true);
84-
85-
uint8_t write1[] = {FTMS_START_RESUME};
86-
writeCharacteristic(write1, sizeof(write1), "start simulation", false, true);
87-
} else {
88-
uint8_t write[] = {FTMS_START_RESUME};
89-
writeCharacteristic(write, sizeof(write), "start simulation", false, true);
81+
if (!V_BLE_R) {
82+
if(I_ROWER || SF_RW || ROWER || MRK_R06) {
83+
uint8_t write[] = {FTMS_REQUEST_CONTROL};
84+
writeCharacteristic(write, sizeof(write), "start", false, true);
85+
86+
uint8_t write1[] = {FTMS_START_RESUME};
87+
writeCharacteristic(write1, sizeof(write1), "start simulation", false, true);
88+
} else {
89+
uint8_t write[] = {FTMS_START_RESUME};
90+
writeCharacteristic(write, sizeof(write), "start simulation", false, true);
91+
}
9092
}
9193

9294
initRequest = false;
@@ -880,6 +882,9 @@ void ftmsrower::deviceDiscovered(const QBluetoothDeviceInfo &device) {
880882
} else if (device.name().toUpper().startsWith(QStringLiteral("DOMYOS-ROW-"))) {
881883
DOMYOS = true;
882884
qDebug() << "DOMYOS found!";
885+
} else if (device.name().toUpper().startsWith(QStringLiteral("V-BLE-R-"))) {
886+
V_BLE_R = true;
887+
qDebug() << "V-BLE-R found! skipping init request";
883888
} else if (deviceName.size() >= 7 && deviceName.startsWith(QStringLiteral("WDK")) &&
884889
deviceName.at(3).isDigit() && deviceName.at(4).isDigit() &&
885890
deviceName.at(5).isDigit() && deviceName.at(6).isDigit()) {

src/devices/ftmsrower/ftmsrower.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ class ftmsrower : public rower {
8383
bool ROWER = false;
8484
bool MRK_R06 = false;
8585
bool MRK_R11S = false;
86+
bool V_BLE_R = false;
8687
QDateTime lastStroke = QDateTime::currentDateTime();
8788
double lastStrokesCount = 0;
8889

0 commit comments

Comments
 (0)