-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bring back the sun indicator #195
Bring back the sun indicator #195
Conversation
It was much simpler uint8_t PowerLimiterClass::getPowerLimiterState() {
CONFIG_T& config = Configuration.get();
std::shared_ptr<InverterAbstract> inverter = Hoymiles.getInverterByPos(config.PowerLimiter_InverterId);
if (inverter == nullptr || !inverter->isReachable()) {
// inactive icon
return PL_UI_STATE_INACTIVE;
}
if (inverter->isProducing() && _batteryDischargeEnabled) {
// battery icon
return PL_UI_STATE_USE_SOLAR_AND_BATTERY;
}
if (inverter->isProducing() && !_batteryDischargeEnabled) {
// sun icon
return PL_UI_STATE_USE_SOLAR_ONLY;
}
if(!inverter->isProducing()) {
// battery charging icon
return PL_UI_STATE_CHARGING;
}
return PL_UI_STATE_INACTIVE;
} I know that the power number is not correct, then inverter is switched off. It was more the last set power. |
@MalteSchm can you rebase your three commits into one and do a "git push -f" ? |
Hi @madmartin two questions:
Sorry for the hassle. I have not really become accustomed to git yet. |
@MalteSchm No problem, I try to guide you. Whatever the reason is that you have 3 commits (or more on other pull requests=PR's) in your log on top of the original branch, in a PR all unnecessary stuff should not be there. First look into your
The newest commit is at the top. Search from top down to the first commit which is not from you, copy the commit hash (the first 8 digits are sufficient). In this example, it is
The execute
Read the instructions in the comment section. Take note that the merge commit is not shown, because it does not contain any changed file content.
Then leave the editor, writing the document. When git is able to put these commits together, the rebase is successful. Here, you have changed some lines two times, which gives a "merge conflict".
Now all conflicting files must be edited (what have you done here???). Every section looking like this
must be cleaned up - delete the unwanted content together with the Example in "include/PowerLimiter.h": before:
after:
Then - like printed out in the instructions from the rebase abort:
Next, git presents you the usual commit editor for the one squashed commit, which you should edit (because it contains the summary of all commit messages). When finished, your
When you are happy with the outcome, you must execute While writing this instructions, I see that @helgeerbe has merged your PR, so you this is a little obsolete, but please keep this on your records for your next pull request. |
thanks @madmartin ... not sure where you got the lalala lines from but I'd be very surprised if I wrote them. @helgeerbe
whereas you suggested above to check if the inverter is not producing:
I changed this yesterday but could not commit as we had a network outage. I updated the branch just now. Let me know if this should be changed. |
@madmartin
From there if I do a git pull I need to merge once more. This needs to be followed by rebase again to get rid of the additional commits. I keep arriving at this point with more and more commits in my branch. Git and I are no real friends yet |
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new discussion or issue for related concerns. |
@helgeerbe mentioned here: #172 (comment) that I broke the sun indicator for Power Limiter solar pass-through. I investigated and believe the code in this PR fixes this. It works for me but I hardly ever get direct SolarPassthrough in my setup.
Can you kindly check?
Note: I did not compare the MPPT power and the inverter power to indicate if the battery is actually being discharged or charged. Is that the desired behavior or shall this be done?
Note 2: The UI shows the last requested inverter power currently. This is correct as per methods used currently but also means that there is a power value shown case if the inverter is off. Should this indicate 0 in this case?