Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: VE.Direct data is invalid if no controller has valid data
the original implementation of the isDataValid() method worked by returning false if any of the charge controllers had invalid data. if no charge controllers were configured, this function then also needed to also return false. the logic was changed in 415c767 such that if at least one charge controller had valid data, the function would return true. this would have required to adjust the default return statement as well, but it was not. if the user enabled VE.Diret and configured at least one charge controller in the pin mapping, but this controller never delivered any data, the function would now errorneously return true, because the container is not empty. however, if no controller has valid data, this now means we exit the loop and then the return value must be false, which is also desired if the container is empty.
- Loading branch information