diff --git a/src/hm/Communication.h b/src/hm/Communication.h index 4003c13e..38925059 100644 --- a/src/hm/Communication.h +++ b/src/hm/Communication.h @@ -129,7 +129,7 @@ class Communication : public CommQueue<> { break; case States::CHECK_FRAMES: { - if((q->iv->radio->mBufCtrl.empty() && !mIsRetransmit) || (0 == q->attempts)) { // radio buffer empty or no more answers + if((q->iv->radio->mBufCtrl.empty() && !mIsRetransmit) ) { // || (0 == q->attempts)) { // radio buffer empty or no more answers if(*mSerialDebug) { DPRINT_IVID(DBG_INFO, q->iv->id); DBGPRINT(F("request timeout: ")); @@ -259,7 +259,7 @@ class Communication : public CommQueue<> { if(framnr) { if(0 == q->attempts) { DPRINT_IVID(DBG_INFO, q->iv->id); - DBGPRINT(F("no attempts left")); + DBGPRINTLN(F("no attempts left")); closeRequest(q, false); return; } diff --git a/src/hm/hmRadio.h b/src/hm/hmRadio.h index feb4fde5..0df22f5a 100644 --- a/src/hm/hmRadio.h +++ b/src/hm/hmRadio.h @@ -336,6 +336,8 @@ class HmRadio : public Radio { isLastPackage = (p.packet[9] > ALL_FRAMES); // > ALL_FRAMES indicates last packet received if(mLastIv->mIsSingleframeReq) // we only expect one frame here... isRetransmitAnswer = true; + if(isLastPackage) + mFramesExpected = p.packet[9] - ALL_FRAMES; } if(IV_MI == mLastIv->ivGen) { @@ -350,8 +352,9 @@ class HmRadio : public Radio { } yield(); } - if(isLastPackage) + if(isLastPackage) { mLastIv->mGotLastMsg = true; + } return isLastPackage || isRetransmitAnswer; }