Remove code nesting

This commit is contained in:
Thomas Basler 2023-12-07 14:13:58 +01:00
parent e9a55cf361
commit e0c07b9bcf

View File

@ -40,7 +40,10 @@ void HoymilesClass::loop()
_radioNrf->loop();
_radioCmt->loop();
if (getNumInverters() > 0) {
if (getNumInverters() == 0) {
return;
}
if (millis() - _lastPoll > (_pollInterval * 1000)) {
static uint8_t inverterPos = 0;
@ -141,7 +144,6 @@ void HoymilesClass::loop()
}
}
}
}
}
std::shared_ptr<InverterAbstract> HoymilesClass::addInverter(const char* name, uint64_t serial)