mirror of
https://github.com/lumapu/ahoy.git
synced 2025-05-25 14:56:11 +02:00
0.7.7
* attempt to fix MqTT `YieldDay` in `TotalValues` #927 * attempt to fix MqTT `YieldDay` and `YieldTotal` even if inverters are not completly available #929 * fix wrong message 'NRF not connected' if it is disabled #1007
This commit is contained in:
parent
45e02b94c3
commit
982c201d48
3 changed files with 11 additions and 17 deletions
|
@ -2,6 +2,8 @@
|
|||
|
||||
## 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
|
||||
* fix wrong message 'NRF not connected' if it is disabled #1007
|
||||
|
||||
## 0.7.6 - 2023-06-17
|
||||
* fix display of hidden SSID checkbox
|
||||
|
|
|
@ -71,8 +71,7 @@ class PubMqttIvData {
|
|||
mCmd = mSendList->front().cmd;
|
||||
mIvSend = mSendList->front().iv;
|
||||
|
||||
if((RealTimeRunData_Debug != mCmd) || !mRTRDataHasBeenSent) {
|
||||
mSendTotals = (RealTimeRunData_Debug == mCmd);
|
||||
if((RealTimeRunData_Debug != mCmd) || !mRTRDataHasBeenSent) { // send RealTimeRunData only once
|
||||
memset(mTotal, 0, sizeof(float) * 4);
|
||||
mState = FIND_NXT_IV;
|
||||
} else
|
||||
|
@ -97,18 +96,10 @@ class PubMqttIvData {
|
|||
mLastIvId++;
|
||||
|
||||
mPos = 0;
|
||||
if(found) {
|
||||
if(found)
|
||||
mState = SEND_DATA;
|
||||
if(!mIv->isAvailable(*mUtcTimestamp))
|
||||
mSendTotals = false; // avoid send total values on no availability, because the sum of values is not built
|
||||
}
|
||||
else if(mSendTotals)
|
||||
else
|
||||
mState = SEND_TOTALS;
|
||||
else {
|
||||
mSendList->pop();
|
||||
mZeroValues = false;
|
||||
mState = START;
|
||||
}
|
||||
}
|
||||
|
||||
void stateSend() {
|
||||
|
@ -138,6 +129,7 @@ class PubMqttIvData {
|
|||
if (CH0 == rec->assign[mPos].ch) {
|
||||
switch (rec->assign[mPos].fieldId) {
|
||||
case FLD_PAC:
|
||||
if(mIv->isProducing(*mUtcTimestamp))
|
||||
mTotal[0] += mIv->getValue(mPos, rec);
|
||||
break;
|
||||
case FLD_YT:
|
||||
|
@ -147,6 +139,7 @@ class PubMqttIvData {
|
|||
mTotal[2] += mIv->getValue(mPos, rec);
|
||||
break;
|
||||
case FLD_PDC:
|
||||
if(mIv->isProducing(*mUtcTimestamp))
|
||||
mTotal[3] += mIv->getValue(mPos, rec);
|
||||
break;
|
||||
}
|
||||
|
@ -208,7 +201,6 @@ class PubMqttIvData {
|
|||
|
||||
uint8_t mCmd;
|
||||
uint8_t mLastIvId;
|
||||
bool mSendTotals;
|
||||
float mTotal[4];
|
||||
|
||||
Inverter<> *mIv, *mIvSend;
|
||||
|
|
|
@ -469,9 +469,9 @@ class RestApi {
|
|||
}
|
||||
|
||||
JsonArray warn = obj.createNestedArray(F("warnings"));
|
||||
if(!mRadio->isChipConnected())
|
||||
if(!mRadio->isChipConnected() && mConfig->nrf.enabled)
|
||||
warn.add(F("your NRF24 module can't be reached, check the wiring, pinout and enable"));
|
||||
else if(!mRadio->isPVariant())
|
||||
else if(!mRadio->isPVariant() && mConfig->nrf.enabled)
|
||||
warn.add(F("your NRF24 module isn't a plus version(+), maybe incompatible"));
|
||||
if(!mApp->getSettingsValid())
|
||||
warn.add(F("your settings are invalid"));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue