Browse Source

0.7.8

* fix `YieldDay`, `YieldTotal` and `P_AC` in `TotalValues` #929
* fix some serial debug prints
pull/1027/head
lumapu 2 years ago
parent
commit
cb3080e177
  1. 4
      src/CHANGES.md
  2. 2
      src/defines.h
  3. 14
      src/hms/hmsPayload.h
  4. 4
      src/publisher/pubMqttIvData.h

4
src/CHANGES.md

@ -1,5 +1,9 @@
# Development Changes # 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 ## 0.7.7 - 2023-07-03
* attempt to fix MqTT `YieldDay` in `TotalValues` #927 * attempt to fix MqTT `YieldDay` in `TotalValues` #927
* attempt to fix MqTT `YieldDay` and `YieldTotal` even if inverters are not completly available #929 * attempt to fix MqTT `YieldDay` and `YieldTotal` even if inverters are not completly available #929

2
src/defines.h

@ -13,7 +13,7 @@
//------------------------------------- //-------------------------------------
#define VERSION_MAJOR 0 #define VERSION_MAJOR 0
#define VERSION_MINOR 7 #define VERSION_MINOR 7
#define VERSION_PATCH 7 #define VERSION_PATCH 8
//------------------------------------- //-------------------------------------
typedef struct { typedef struct {

14
src/hms/hmsPayload.h

@ -114,7 +114,7 @@ class HmsPayload {
yield(); yield();
if (mSerialDebug) { if (mSerialDebug) {
DPRINT_IVID(DBG_INFO, iv->id); DPRINT_IVID(DBG_INFO, iv->id);
DBGPRINT(F(") Requesting Inv SN ")); DBGPRINT(F("Requesting Inv SN "));
DBGPRINTLN(String(iv->config->serial.u64, HEX)); DBGPRINTLN(String(iv->config->serial.u64, HEX));
} }
@ -122,7 +122,7 @@ class HmsPayload {
if (iv->getDevControlRequest()) { if (iv->getDevControlRequest()) {
if (mSerialDebug) { if (mSerialDebug) {
DPRINT_IVID(DBG_INFO, iv->id); DPRINT_IVID(DBG_INFO, iv->id);
DBGPRINT(F(") Devcontrol request 0x")); DBGPRINT(F("Devcontrol request 0x"));
DBGPRINT(String(iv->devControlCmd, HEX)); DBGPRINT(String(iv->devControlCmd, HEX));
DBGPRINT(F(" power limit ")); DBGPRINT(F(" power limit "));
DBGPRINTLN(String(iv->powerLimit[0])); DBGPRINTLN(String(iv->powerLimit[0]));
@ -182,14 +182,13 @@ class HmsPayload {
mApp->setMqttPowerLimitAck(iv); mApp->setMqttPowerLimitAck(iv);
else else
ok = false; ok = false;
DPRINT(DBG_INFO, F("(#")); DPRINT_IVID(DBG_INFO, iv->id);
DBGPRINT(String(iv->id));
DBGPRINT(F(" has ")); DBGPRINT(F(" has "));
if(!ok) DBGPRINT(F("not ")); if(!ok) DBGPRINT(F("not "));
DBGPRINT(F("accepted power limit set point ")); DBGPRINT(F("accepted power limit set point "));
DBGPRINT(String(iv->powerLimit[0])); DBGPRINT(String(iv->powerLimit[0]));
DBGPRINT(F(" with PowerLimitControl ")); DBGPRINT(F(" with PowerLimitControl "));
DBGPRINT(String(iv->powerLimit[1])); DBGPRINTLN(String(iv->powerLimit[1]));
iv->clearCmdQueue(); iv->clearCmdQueue();
iv->enqueCommand<InfoCommand>(SystemConfigPara); // read back power limit iv->enqueCommand<InfoCommand>(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)); //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); //mRadio->prepareDevInformCmd(iv->radioId.u64, mPayload[iv->id].txCmd, mPayload[iv->id].ts, iv->alarmMesIndex, true);
DPRINT(DBG_INFO, F("(#")); DPRINT_IVID(DBG_INFO, iv->id);
DBGPRINT(String(iv->id)); DBGPRINTLN(F("nothing received"));
DBGPRINTLN(F(") nothing received"));
mPayload[iv->id].retransmits = mMaxRetrans; mPayload[iv->id].retransmits = mMaxRetrans;
} else { } else {
for (uint8_t i = 0; i < (mPayload[iv->id].maxPackId - 1); i++) { for (uint8_t i = 0; i < (mPayload[iv->id].maxPackId - 1); i++) {

4
src/publisher/pubMqttIvData.h

@ -129,7 +129,7 @@ class PubMqttIvData {
if (CH0 == rec->assign[mPos].ch) { if (CH0 == rec->assign[mPos].ch) {
switch (rec->assign[mPos].fieldId) { switch (rec->assign[mPos].fieldId) {
case FLD_PAC: case FLD_PAC:
if(mIv->isProducing(*mUtcTimestamp)) if(mIv->isAvailable(*mUtcTimestamp))
mTotal[0] += mIv->getValue(mPos, rec); mTotal[0] += mIv->getValue(mPos, rec);
break; break;
case FLD_YT: case FLD_YT:
@ -139,7 +139,7 @@ class PubMqttIvData {
mTotal[2] += mIv->getValue(mPos, rec); mTotal[2] += mIv->getValue(mPos, rec);
break; break;
case FLD_PDC: case FLD_PDC:
if(mIv->isProducing(*mUtcTimestamp)) if(mIv->isAvailable(*mUtcTimestamp))
mTotal[3] += mIv->getValue(mPos, rec); mTotal[3] += mIv->getValue(mPos, rec);
break; break;
} }

Loading…
Cancel
Save