diff --git a/src/hm/hmRadio.h b/src/hm/hmRadio.h index f0236362..8f528784 100644 --- a/src/hm/hmRadio.h +++ b/src/hm/hmRadio.h @@ -253,7 +253,10 @@ class HmRadio { mBufCtrl.push(p); if (p.packet[0] == (TX_REQ_INFO + ALL_FRAMES)) // response from get information command isLastPackage = (p.packet[9] > 0x81); // > 0x81 indicates last packet received - else if (p.packet[0] != 0x00) // ignore fragment number zero + else if (p.packet[0] == ( 0x0f + ALL_FRAMES) ) // response from MI get information command + isLastPackage = (p.packet[9] > 0x11); // > 0x11 indicates last packet received + else if (p.packet[0] != 0x00 && p.packet[0] != 0x88 && p.packet[0] != 0x92) + // ignore fragment number zero and MI status messages isLastPackage = true; // response from dev control command yield(); } diff --git a/src/hm/miPayload.h b/src/hm/miPayload.h index a90b845d..931c9657 100644 --- a/src/hm/miPayload.h +++ b/src/hm/miPayload.h @@ -221,14 +221,16 @@ const byteAssign_t InfoAssignment[] = { for (uint8_t i = 0; i < 5; i++) { iv->setValue(i, rec, (float) ((p->packet[(12+2*i)] << 8) + p->packet[(13+2*i)])/1); } - iv->setQueuedCmdFinished(); + /*iv->setQueuedCmdFinished(); mStat->rxSuccess++; - mSys->Radio.sendCmdPacket(iv->radioId.u64, 0x0f, 0x01, false); + mSys->Radio.sendCmdPacket(iv->radioId.u64, 0x0f, 0x01, false);*/ } else if ( p->packet[9] == 0x01 ) {//second frame DPRINTLN(DBG_INFO, F("(#") + String(iv->id) + F(") got 2nd frame (hw info)")); - mSys->Radio.sendCmdPacket(iv->radioId.u64, 0x0f, 0x12, false); + //mSys->Radio.sendCmdPacket(iv->radioId.u64, 0x0f, 0x12, false); } else if ( p->packet[9] == 0x12 ) {//3rd frame DPRINTLN(DBG_INFO, F("(#") + String(iv->id) + F(") got 3rd frame (hw info)")); + iv->setQueuedCmdFinished(); + mStat->rxSuccess++; } } else if (p->packet[0] == (TX_REQ_INFO + ALL_FRAMES)) { // response from get information command @@ -723,6 +725,7 @@ const byteAssign_t InfoAssignment[] = { } + IApp *mApp; HMSYSTEM *mSys; statistics_t *mStat;