mirror of
https://github.com/lumapu/ahoy.git
synced 2025-05-30 01:06:11 +02:00
0.8.102
* fix MDNS #1538 * improved Wizard * improved MqTT on devcontrol e.g. set power limit
This commit is contained in:
parent
bcc52c793c
commit
4d5ae72cb6
15 changed files with 86 additions and 77 deletions
55
src/app.cpp
55
src/app.cpp
|
@ -403,29 +403,7 @@ void app::tickSend(void) {
|
|||
|
||||
for (uint8_t i = 0; i < MAX_NUM_INVERTERS; i++) {
|
||||
Inverter<> *iv = mSys.getInverterByPos(i);
|
||||
if(NULL == iv)
|
||||
continue;
|
||||
|
||||
if(iv->config->enabled) {
|
||||
if(!iv->commEnabled) {
|
||||
DPRINT_IVID(DBG_INFO, iv->id);
|
||||
DBGPRINTLN(F("no communication to the inverter (night time)"));
|
||||
continue;
|
||||
}
|
||||
|
||||
if(!iv->radio->isChipConnected())
|
||||
continue;
|
||||
|
||||
if(InverterStatus::OFF != iv->status)
|
||||
notAvail = false;
|
||||
|
||||
iv->tickSend([this, iv](uint8_t cmd, bool isDevControl) {
|
||||
if(isDevControl)
|
||||
mCommunication.addImportant(iv, cmd);
|
||||
else
|
||||
mCommunication.add(iv, cmd);
|
||||
});
|
||||
}
|
||||
sendIv(iv);
|
||||
}
|
||||
|
||||
if(mAllIvNotAvail != notAvail)
|
||||
|
@ -435,6 +413,37 @@ void app::tickSend(void) {
|
|||
updateLed();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
bool app::sendIv(Inverter<> *iv) {
|
||||
bool notAvail = true;
|
||||
if(NULL == iv)
|
||||
return notAvail;
|
||||
|
||||
if(!iv->config->enabled)
|
||||
return notAvail;
|
||||
|
||||
if(!iv->commEnabled) {
|
||||
DPRINT_IVID(DBG_INFO, iv->id);
|
||||
DBGPRINTLN(F("no communication to the inverter (night time)"));
|
||||
return notAvail;
|
||||
}
|
||||
|
||||
if(!iv->radio->isChipConnected())
|
||||
return notAvail;
|
||||
|
||||
if(InverterStatus::OFF != iv->status)
|
||||
notAvail = false;
|
||||
|
||||
iv->tickSend([this, iv](uint8_t cmd, bool isDevControl) {
|
||||
if(isDevControl)
|
||||
mCommunication.addImportant(iv, cmd);
|
||||
else
|
||||
mCommunication.add(iv, cmd);
|
||||
});
|
||||
|
||||
return notAvail;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
void app:: zeroIvValues(bool checkAvail, bool skipYieldDay) {
|
||||
Inverter<> *iv;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue