Skip to content

Commit 5b81e1d

Browse files
committed
don't retry for pause
1 parent d24e2d5 commit 5b81e1d

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

src/devices/fitshowtreadmill/fitshowtreadmill.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,10 +272,18 @@ void fitshowtreadmill::update() {
272272
removeFromBuffer();
273273
}
274274
if (!bufferWrite.isEmpty()) {
275+
const bool t80PauseWithoutRetry =
276+
tunturi_t80_connected && !debugMsgs.isEmpty() && debugMsgs.at(0) == QStringLiteral("pause tape");
277+
275278
retrySend++;
276279
if (retrySend % 2) { // retry only on odd values: on even values wait some more time for response
277280
const uint8_t *write_pld = (const uint8_t *)bufferWrite.constData();
278281
writePayload(write_pld + 1, write_pld[0], debugMsgs.at(0));
282+
283+
if (t80PauseWithoutRetry) {
284+
emit debug(QStringLiteral("T80 pause tape sent once, skipping retries"));
285+
removeFromBuffer();
286+
}
279287
}
280288
} else {
281289
uint8_t status = FITSHOW_SYS_STATUS;

0 commit comments

Comments
 (0)