mirror of
https://github.com/lumapu/ahoy.git
synced 2025-06-05 04:01:41 +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
|
@ -4,6 +4,8 @@
|
||||||
* removed `delay` from ePaper
|
* removed `delay` from ePaper
|
||||||
* started improvements of `/system`
|
* started improvements of `/system`
|
||||||
* fix LEDs to check all configured inverters
|
* fix LEDs to check all configured inverters
|
||||||
|
* send loop skip disabled inverters fix
|
||||||
|
* print generated DTU SN to console
|
||||||
|
|
||||||
## 0.7.45 - 2023-08-29
|
## 0.7.45 - 2023-08-29
|
||||||
* change ePaper text to symbols PR #1131
|
* change ePaper text to symbols PR #1131
|
||||||
|
|
30
src/app.cpp
30
src/app.cpp
|
@ -454,24 +454,26 @@ void app::tickSend(void) {
|
||||||
int8_t maxLoop = MAX_NUM_INVERTERS;
|
int8_t maxLoop = MAX_NUM_INVERTERS;
|
||||||
Inverter<> *iv = mSys.getInverterByPos(mSendLastIvId);
|
Inverter<> *iv = mSys.getInverterByPos(mSendLastIvId);
|
||||||
do {
|
do {
|
||||||
mSendLastIvId = ((MAX_NUM_INVERTERS - 1) == mSendLastIvId) ? 0 : mSendLastIvId + 1;
|
do {
|
||||||
iv = mSys.getInverterByPos(mSendLastIvId);
|
mSendLastIvId = ((MAX_NUM_INVERTERS - 1) == mSendLastIvId) ? 0 : mSendLastIvId + 1;
|
||||||
} while ((NULL == iv) && ((maxLoop--) > 0));
|
iv = mSys.getInverterByPos(mSendLastIvId);
|
||||||
|
} while ((NULL == iv) && ((maxLoop--) > 0));
|
||||||
|
} while((!iv->config->enabled) && (maxLoop > 0));
|
||||||
|
|
||||||
if (NULL != iv) {
|
if (NULL != iv) {
|
||||||
if (iv->config->enabled) {
|
if (iv->config->enabled) {
|
||||||
if(mConfig->nrf.enabled) {
|
if(mConfig->nrf.enabled) {
|
||||||
if (iv->ivGen == IV_HM)
|
if (iv->ivGen == IV_HM)
|
||||||
mPayload.ivSend(iv);
|
mPayload.ivSend(iv);
|
||||||
else if(iv->ivGen == IV_MI)
|
else if(iv->ivGen == IV_MI)
|
||||||
mMiPayload.ivSend(iv);
|
mMiPayload.ivSend(iv);
|
||||||
}
|
}
|
||||||
#if defined(ESP32)
|
#if defined(ESP32)
|
||||||
if(mConfig->cmt.enabled) {
|
if(mConfig->cmt.enabled) {
|
||||||
if((iv->ivGen == IV_HMS) || (iv->ivGen == IV_HMT))
|
if((iv->ivGen == IV_HMS) || (iv->ivGen == IV_HMT))
|
||||||
mHmsPayload.ivSend(iv);
|
mHmsPayload.ivSend(iv);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -32,7 +32,7 @@ class HmRadio {
|
||||||
public:
|
public:
|
||||||
HmRadio() : mNrf24(CE_PIN, CS_PIN, SPI_SPEED) {
|
HmRadio() : mNrf24(CE_PIN, CS_PIN, SPI_SPEED) {
|
||||||
if(mSerialDebug) {
|
if(mSerialDebug) {
|
||||||
DPRINT(DBG_VERBOSE, F("hmRadio.h : HmRadio():mNrf24(CE_PIN: "));
|
DPRINT(DBG_VERBOSE, F("hmRadio.h : HmRadio():mNrf24(CE_PIN: "));
|
||||||
DBGPRINT(String(CE_PIN));
|
DBGPRINT(String(CE_PIN));
|
||||||
DBGPRINT(F(", CS_PIN: "));
|
DBGPRINT(F(", CS_PIN: "));
|
||||||
DBGPRINT(String(CS_PIN));
|
DBGPRINT(String(CS_PIN));
|
||||||
|
@ -117,8 +117,9 @@ class HmRadio {
|
||||||
if(mNrf24.isChipConnected()) {
|
if(mNrf24.isChipConnected()) {
|
||||||
DPRINTLN(DBG_INFO, F("Radio Config:"));
|
DPRINTLN(DBG_INFO, F("Radio Config:"));
|
||||||
mNrf24.printPrettyDetails();
|
mNrf24.printPrettyDetails();
|
||||||
}
|
DPRINT(DBG_INFO, F("DTU_SN: 0x"));
|
||||||
else
|
DBGPRINTLN(String(DTU_RADIO_ID, HEX));
|
||||||
|
} else
|
||||||
DPRINTLN(DBG_WARN, F("WARNING! your NRF24 module can't be reached, check the wiring"));
|
DPRINTLN(DBG_WARN, F("WARNING! your NRF24 module can't be reached, check the wiring"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue