From cb3080e177dfa7e3e627a2faf687e7e77df8b46b Mon Sep 17 00:00:00 2001 From: lumapu Date: Wed, 5 Jul 2023 23:19:11 +0200 Subject: [PATCH] 0.7.8 * fix `YieldDay`, `YieldTotal` and `P_AC` in `TotalValues` #929 * fix some serial debug prints --- src/CHANGES.md | 4 ++++ src/defines.h | 2 +- src/hms/hmsPayload.h | 14 ++++++-------- src/publisher/pubMqttIvData.h | 4 ++-- 4 files changed, 13 insertions(+), 11 deletions(-) diff --git a/src/CHANGES.md b/src/CHANGES.md index 5907f51d..c461ab31 100644 --- a/src/CHANGES.md +++ b/src/CHANGES.md @@ -1,5 +1,9 @@ # Development Changes +## 0.7.8 - 2023-07-05 +* fix `YieldDay`, `YieldTotal` and `P_AC` in `TotalValues` #929 +* fix some serial debug prints + ## 0.7.7 - 2023-07-03 * attempt to fix MqTT `YieldDay` in `TotalValues` #927 * attempt to fix MqTT `YieldDay` and `YieldTotal` even if inverters are not completly available #929 diff --git a/src/defines.h b/src/defines.h index 21803069..45782b7a 100644 --- a/src/defines.h +++ b/src/defines.h @@ -13,7 +13,7 @@ //------------------------------------- #define VERSION_MAJOR 0 #define VERSION_MINOR 7 -#define VERSION_PATCH 7 +#define VERSION_PATCH 8 //------------------------------------- typedef struct { diff --git a/src/hms/hmsPayload.h b/src/hms/hmsPayload.h index fdef3e45..5c7a08d2 100644 --- a/src/hms/hmsPayload.h +++ b/src/hms/hmsPayload.h @@ -114,7 +114,7 @@ class HmsPayload { yield(); if (mSerialDebug) { DPRINT_IVID(DBG_INFO, iv->id); - DBGPRINT(F(") Requesting Inv SN ")); + DBGPRINT(F("Requesting Inv SN ")); DBGPRINTLN(String(iv->config->serial.u64, HEX)); } @@ -122,7 +122,7 @@ class HmsPayload { if (iv->getDevControlRequest()) { if (mSerialDebug) { DPRINT_IVID(DBG_INFO, iv->id); - DBGPRINT(F(") Devcontrol request 0x")); + DBGPRINT(F("Devcontrol request 0x")); DBGPRINT(String(iv->devControlCmd, HEX)); DBGPRINT(F(" power limit ")); DBGPRINTLN(String(iv->powerLimit[0])); @@ -182,14 +182,13 @@ class HmsPayload { mApp->setMqttPowerLimitAck(iv); else ok = false; - DPRINT(DBG_INFO, F("(#")); - DBGPRINT(String(iv->id)); + DPRINT_IVID(DBG_INFO, iv->id); DBGPRINT(F(" has ")); if(!ok) DBGPRINT(F("not ")); DBGPRINT(F("accepted power limit set point ")); DBGPRINT(String(iv->powerLimit[0])); DBGPRINT(F(" with PowerLimitControl ")); - DBGPRINT(String(iv->powerLimit[1])); + DBGPRINTLN(String(iv->powerLimit[1])); iv->clearCmdQueue(); iv->enqueCommand(SystemConfigPara); // read back power limit @@ -235,9 +234,8 @@ class HmsPayload { //DPRINTLN(DBG_INFO, F("(#") + String(iv->id) + F(") prepareDevInformCmd 0x") + String(mPayload[iv->id].txCmd, HEX)); //mRadio->prepareDevInformCmd(iv->radioId.u64, mPayload[iv->id].txCmd, mPayload[iv->id].ts, iv->alarmMesIndex, true); - DPRINT(DBG_INFO, F("(#")); - DBGPRINT(String(iv->id)); - DBGPRINTLN(F(") nothing received")); + DPRINT_IVID(DBG_INFO, iv->id); + DBGPRINTLN(F("nothing received")); mPayload[iv->id].retransmits = mMaxRetrans; } else { for (uint8_t i = 0; i < (mPayload[iv->id].maxPackId - 1); i++) { diff --git a/src/publisher/pubMqttIvData.h b/src/publisher/pubMqttIvData.h index 58880f72..111bbd37 100644 --- a/src/publisher/pubMqttIvData.h +++ b/src/publisher/pubMqttIvData.h @@ -129,7 +129,7 @@ class PubMqttIvData { if (CH0 == rec->assign[mPos].ch) { switch (rec->assign[mPos].fieldId) { case FLD_PAC: - if(mIv->isProducing(*mUtcTimestamp)) + if(mIv->isAvailable(*mUtcTimestamp)) mTotal[0] += mIv->getValue(mPos, rec); break; case FLD_YT: @@ -139,7 +139,7 @@ class PubMqttIvData { mTotal[2] += mIv->getValue(mPos, rec); break; case FLD_PDC: - if(mIv->isProducing(*mUtcTimestamp)) + if(mIv->isAvailable(*mUtcTimestamp)) mTotal[3] += mIv->getValue(mPos, rec); break; }