From 415c767d1d376ca1feb2b35e10cecf2ed256efbb Mon Sep 17 00:00:00 2001 From: Niko <129541740+SW-Niko@users.noreply.github.com> Date: Sun, 21 Jul 2024 19:46:06 +0200 Subject: [PATCH] Fix: Victron MPPT: be happy with at least one that delivers valid data (#1118) --- src/VictronMppt.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/VictronMppt.cpp b/src/VictronMppt.cpp index bc0122d40..4e084974c 100644 --- a/src/VictronMppt.cpp +++ b/src/VictronMppt.cpp @@ -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 lock(_mutex); for (auto const& upController: _controllers) { - if (!upController->isDataValid()) { return false; } + if (upController->isDataValid()) { return true; } } return !_controllers.empty();