From 3fbd2c7c88e933e42af35d84dba243598bceed95 Mon Sep 17 00:00:00 2001 From: rejoe2 Date: Tue, 23 Jan 2024 17:54:57 +0100 Subject: [PATCH] fix retransmit counter for secondtry - try to fix "45ms"-Problem --- src/hm/Communication.h | 4 ++-- src/hm/hmRadio.h | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/hm/Communication.h b/src/hm/Communication.h index 15ca3d5d..94cf23ff 100644 --- a/src/hm/Communication.h +++ b/src/hm/Communication.h @@ -156,9 +156,9 @@ class Communication : public CommQueue<> { if(mFirstTry) { mFirstTry = false; - setAttempt(); + //setAttempt(); mHeu.evalTxChQuality(q->iv, false, 0, 0); - q->iv->radioStatistics.rxFailNoAnser++; + //q->iv->radioStatistics.rxFailNoAnser++; // should only be one of fail or retransmit. q->iv->radioStatistics.retransmits++; q->iv->radio->mRadioWaitTime.stopTimeMonitor(); mState = States::START; diff --git a/src/hm/hmRadio.h b/src/hm/hmRadio.h index 9915a9a8..54f099dd 100644 --- a/src/hm/hmRadio.h +++ b/src/hm/hmRadio.h @@ -167,6 +167,7 @@ class HmRadio : public Radio { if(rx_ready) { if (getReceived()) { // check what we got, returns true for last package mNRFisInRX = false; + rx_ready = false; mRadioWaitTime.startTimeMonitor(DURATION_PAUSE_LASTFR); // let the inverter first end his transmissions mNrf24->stopListening(); } else {