Fix: Victron MPPT: be happy with at least one that delivers valid data (#1118)
This commit is contained in:
parent
5fee069c65
commit
415c767d1d
@ -75,12 +75,16 @@ void VictronMpptClass::loop()
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* isDataValid()
|
||||
* return: true = if at least one of the MPPT controllers delivers valid data
|
||||
*/
|
||||
bool VictronMpptClass::isDataValid() const
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(_mutex);
|
||||
|
||||
for (auto const& upController: _controllers) {
|
||||
if (!upController->isDataValid()) { return false; }
|
||||
if (upController->isDataValid()) { return true; }
|
||||
}
|
||||
|
||||
return !_controllers.empty();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user