mirror of
https://github.com/lumapu/ahoy.git
synced 2025-06-03 03:01:40 +02:00
0.7.46
* send loop skip disabled inverters fix * print generated DTU SN to console
This commit is contained in:
parent
f3192b49ab
commit
69e2a63eab
3 changed files with 22 additions and 17 deletions
30
src/app.cpp
30
src/app.cpp
|
@ -454,24 +454,26 @@ void app::tickSend(void) {
|
|||
int8_t maxLoop = MAX_NUM_INVERTERS;
|
||||
Inverter<> *iv = mSys.getInverterByPos(mSendLastIvId);
|
||||
do {
|
||||
mSendLastIvId = ((MAX_NUM_INVERTERS - 1) == mSendLastIvId) ? 0 : mSendLastIvId + 1;
|
||||
iv = mSys.getInverterByPos(mSendLastIvId);
|
||||
} while ((NULL == iv) && ((maxLoop--) > 0));
|
||||
do {
|
||||
mSendLastIvId = ((MAX_NUM_INVERTERS - 1) == mSendLastIvId) ? 0 : mSendLastIvId + 1;
|
||||
iv = mSys.getInverterByPos(mSendLastIvId);
|
||||
} while ((NULL == iv) && ((maxLoop--) > 0));
|
||||
} while((!iv->config->enabled) && (maxLoop > 0));
|
||||
|
||||
if (NULL != iv) {
|
||||
if (iv->config->enabled) {
|
||||
if(mConfig->nrf.enabled) {
|
||||
if (iv->ivGen == IV_HM)
|
||||
mPayload.ivSend(iv);
|
||||
else if(iv->ivGen == IV_MI)
|
||||
mMiPayload.ivSend(iv);
|
||||
}
|
||||
#if defined(ESP32)
|
||||
if(mConfig->cmt.enabled) {
|
||||
if((iv->ivGen == IV_HMS) || (iv->ivGen == IV_HMT))
|
||||
mHmsPayload.ivSend(iv);
|
||||
}
|
||||
#endif
|
||||
if (iv->ivGen == IV_HM)
|
||||
mPayload.ivSend(iv);
|
||||
else if(iv->ivGen == IV_MI)
|
||||
mMiPayload.ivSend(iv);
|
||||
}
|
||||
#if defined(ESP32)
|
||||
if(mConfig->cmt.enabled) {
|
||||
if((iv->ivGen == IV_HMS) || (iv->ivGen == IV_HMT))
|
||||
mHmsPayload.ivSend(iv);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue