diff --git a/src/hm/hmPayload.h b/src/hm/hmPayload.h index 5689af9d..bf3d3c66 100644 --- a/src/hm/hmPayload.h +++ b/src/hm/hmPayload.h @@ -248,8 +248,10 @@ class HmPayload { continue; // skip to next inverter } - if((mPayload[iv->id].sendMillis + 500) > millis()) - return; // to fast, wait until packets are received! + if((IV_HMS == iv->ivGen) || (IV_HMT == iv->ivGen)) { + if((mPayload[iv->id].sendMillis + 500) > millis()) + return; // to fast, wait until packets are received! + } if (!mPayload[iv->id].complete) { bool crcPass, pyldComplete, fastNext; diff --git a/src/hm/hmRadio.h b/src/hm/hmRadio.h index ed9652bc..9e015564 100644 --- a/src/hm/hmRadio.h +++ b/src/hm/hmRadio.h @@ -202,7 +202,7 @@ class HmRadio : public Radio { std::queue mBufCtrl; private: - bool getReceived(void) { + bool getReceived(void) { bool tx_ok, tx_fail, rx_ready; mNrf24.whatHappened(tx_ok, tx_fail, rx_ready); // resets the IRQ pin to HIGH @@ -219,10 +219,10 @@ class HmRadio : public Radio { if (p.packet[0] != 0x00) { mBufCtrl.push(p); if (p.packet[0] == (TX_REQ_INFO + ALL_FRAMES)) // response from get information command - isLastPackage = (p.packet[9] > ALL_FRAMES); // > ALL_FRAMES indicates last packet received + isLastPackage = (p.packet[9] > ALL_FRAMES); // > ALL_FRAMES indicates last packet received else if (p.packet[0] == ( 0x0f + ALL_FRAMES) ) // response from MI get information command - isLastPackage = (p.packet[9] > 0x10); // > 0x10 indicates last packet received - else if ((p.packet[0] != 0x88) && (p.packet[0] != 0x92)) // ignore fragment number zero and MI status messages //#0 was p.packet[0] != 0x00 && + isLastPackage = (p.packet[9] > 0x10); // > 0x10 indicates last packet received + else if ((p.packet[0] != 0x88) && (p.packet[0] != 0x92)) // ignore fragment number zero and MI status messages //#0 was p.packet[0] != 0x00 && isLastPackage = true; // response from dev control command } } diff --git a/src/web/RestApi.h b/src/web/RestApi.h index a8843306..a3a0384c 100644 --- a/src/web/RestApi.h +++ b/src/web/RestApi.h @@ -36,10 +36,9 @@ class RestApi { public: RestApi() { mTimezoneOffset = 0; - mHeapFree = 0; - mHeapFreeBlk = 0; - mHeapFrag = 0; - nr = 0; + mHeapFree = 0; + mHeapFreeBlk = 0; + mHeapFrag = 0; } void setup(IApp *app, HMSYSTEM *sys, AsyncWebServer *srv, settings_t *config) { @@ -63,9 +62,6 @@ class RestApi { } void ctrlRequest(JsonObject obj) { - /*char out[128]; - serializeJson(obj, out, 128); - DPRINTLN(DBG_INFO, "RestApi: " + String(out));*/ DynamicJsonDocument json(128); JsonObject dummy = json.as(); if(obj[F("path")] == "ctrl") @@ -726,7 +722,6 @@ class RestApi { uint32_t mTimezoneOffset; uint32_t mHeapFree, mHeapFreeBlk; uint8_t mHeapFrag; - uint16_t nr; }; #endif /*__WEB_API_H__*/ diff --git a/src/web/web.h b/src/web/web.h index 20883c97..99dd5924 100644 --- a/src/web/web.h +++ b/src/web/web.h @@ -715,13 +715,14 @@ class Web { metrics += String(type) + String(topic); // NRF Statistics - stat = mApp->getNrfStatistics(); + // @TODO 2023-10-01: the statistic data is now available per inverter + /*stat = mApp->getNrfStatistics(); metrics += radioStatistic(F("rx_success"), stat->rxSuccess); metrics += radioStatistic(F("rx_fail"), stat->rxFail); metrics += radioStatistic(F("rx_fail_answer"), stat->rxFailNoAnser); metrics += radioStatistic(F("frame_cnt"), stat->frmCnt); metrics += radioStatistic(F("tx_cnt"), stat->txCnt); - metrics += radioStatistic(F("retrans_cnt"), stat->retransmits); + metrics += radioStatistic(F("retrans_cnt"), stat->retransmits);*/ len = snprintf((char *)buffer,maxLen,"%s",metrics.c_str()); // Next is Inverter information