-
Notifications
You must be signed in to change notification settings - Fork 67
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
Feature: show power grid usage on display #658
Feature: show power grid usage on display #658
Conversation
Thanks for your work. I really appreciate it and like the outcome. looking forward that it gets merged so we can update and try it :) |
@spcqike Or try the artifacts on the bottom of this page: https://github.com/helgeerbe/OpenDTU-OnBattery/actions/runs/7854398954 which effectively are the released 2024.02.09 plus this change 😉 |
Good to know. Let’s see what happens first, merge or our discharge from hospital. I will update and try whatever version is available, when we get home :) |
Still not done, there are more issues: The PV power now collides with the small diagram's y-axis label. |
fix calculation of the text baselines, using getAscent() in favor of getMaxCharHeight(), which includes ascent and descent. this moves the first text up and allows to insert margin between the lines until the display area is fully utilized. on large displays, if the small diagram is selected, keep the first line rather low to avoid collision with the diagram y-axis label. in this mode, there is still more space between the text lines as before, allowing for improved readability.
if the power meter is enabled, the display will use two of three out of every three-second time slot to show the grid consumption. closes hoylabs#620.
7dfe477
to
42d1cf1
Compare
Can't make this work properly, i.e., without risking future glitches because the code relied on upstream errors, without correcting those issues as proposed in tbnobody#1729. That's because the descent of the third line reaches into the fourth line. When erasing the third line without the descent, a text change to something that uses the descent will cause a glitch (the descent is not erased). For that reason, the changes proposed upstream are part of this PR. |
The upstream PR tbnobody#1729 was merged and published. This PR and the upstream changes should merge cleanly. |
Very nice!! Thank you so much!! |
habs installiert, scheint problemlos zu laufen. zumindest ist mir nichts aufgefallen, was komisch aussieht. |
kurzes Feedback: mir ist grad aufgefallen (sowohl auf meinem Modul, als auch jetzt hier beim Schreiben auf deinen Bildern), dass der Graph nicht läuft. Auch die Skalierung mit 18W erscheint mir zu gering. Nachtrag: |
Ich glaube hier möchte ich so weit gehen und ausschließen, dass das etwas mit der Änderung zu tun hat. Während ich das entwickelt und getestet habe, hat der Graph bei mir funktioniert. |
ok, dann gucke ich mal im Upstream, ob da was diesbezüglich steht. Bis zu deiner Version aus diesem PR hatte ich ne relativ alte, selbsterstellte Firmware laufen, in der ich eben auch den Netzbezug angezeigt habe. Der Graph ist für mich also erst seit gestern vorhanden 😄 und ich hab keine Vergleiche, ob es vorher anders war. Auch hab ich mir den Code dazu noch nicht näher angeguckt. Ich bin auch eigentlich davon ausgegangen, dass deine Anpassung rein kosmetischer Natur (zumindest was den Graph angeht) ist, und nichts mit der Erfassung der Datenpunkte zu tun hat. Wollte aber nochmal nachfragen, ob dir nicht doch was aufgefallen ist :) Nachtrag: |
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. |
if the power meter is enabled, the display will use two of three out of every three-second time slot to show the grid consumption.
closes #620.
This was fun and I like the result, but it took way too much time. Fiddling with the display is much more time consuming as one might think. At least it was in this instance for me.
The display shows this screen for three seconds:
This one for another three seconds (last line changes ever three seconds):
The third out of three three-second time slots will still show the total yield (if this was the actual successor screen of the frame above, it would show the date and time in the last line...):
Works for French as well (the word "reseau" is quite long):
I made sure that it works for small display as well:
Changes were made to the calculation of the text baselines, which I think were wrong and lead to space being wasted. Those changes will be proposed upstream as well.
This PR supersedes #644. Thanks @spcqike and @thinklerde for your feedback.