mirror of
https://github.com/lumapu/ahoy.git
synced 2025-05-22 05:16:11 +02:00
0.8.50
* small changes
This commit is contained in:
parent
281da4f576
commit
ce6013d6a0
2 changed files with 43 additions and 42 deletions
|
@ -158,10 +158,11 @@ class DisplayMono {
|
|||
if (mPgData != nullptr) {
|
||||
mPgMaxPwr = 0.0;
|
||||
mPgLastPos = 0;
|
||||
for (uint8_t i = 0; i < mPgWidth; i++)
|
||||
for (uint8_t i = 0; i < mPgWidth; i++) {
|
||||
mPgData[i] = 0.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
uint8_t sss2pgpos(uint seconds_since_start) {
|
||||
return(seconds_since_start * (mPgWidth - 1) / (mDisplayData->pGraphEndTime - mDisplayData->pGraphStartTime));
|
||||
|
@ -194,7 +195,6 @@ class DisplayMono {
|
|||
|
||||
uint8_t getPowerGraphYpos(uint8_t p) {
|
||||
if (p < mPgWidth)
|
||||
//return(((uint32_t) mPgData[p] * (uint32_t) mPgMaxAvailPower) * (uint32_t) mPgHeight / mPgMaxPwr / 255); // scaling of normalized data (0-255) to graph height
|
||||
return((mPgData[p] * (uint32_t) mPgHeight / mPgMaxPwr)); // scaling of data to graph height
|
||||
else
|
||||
return(0);
|
||||
|
@ -225,6 +225,7 @@ class DisplayMono {
|
|||
uint32_t maxpwr_int = static_cast<uint8_t>(std::round(mPgMaxPwr));
|
||||
if (maxpwr_int > 100)
|
||||
scale_y = 100;
|
||||
|
||||
for (uint32_t i = scale_y; i <= maxpwr_int; i += scale_y) {
|
||||
uint8_t ypos = yoff - static_cast<uint8_t>(std::round(i * (float) mPgHeight / mPgMaxPwr)); // scale vertical axis
|
||||
mDisplay->drawPixel(xoff + 1, ypos);
|
||||
|
|
|
@ -1261,12 +1261,12 @@
|
|||
{
|
||||
"token": "INV_LOSS_RATE",
|
||||
"en": "Inverter loss rate",
|
||||
"de": "Wechselrichter Empfangsqualität"
|
||||
"de": "Wechselrichter Verlustrate"
|
||||
},
|
||||
{
|
||||
"token": "DTU_LOSS_RATE",
|
||||
"en": "DTU loss rate",
|
||||
"de": "DTU Empfangsqualität"
|
||||
"de": "DTU Verlustrate"
|
||||
},
|
||||
{
|
||||
"token": "RADIO_STAT_MODAL",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue