Replace inverse smoothstep with regular smoothstep for battery curve
All checks were successful
Compile / Compile (push) Successful in 1m18s
All checks were successful
Compile / Compile (push) Successful in 1m18s
This commit is contained in:
parent
f564f8c6e8
commit
c1ed9a77c5
1 changed files with 1 additions and 1 deletions
|
@ -128,7 +128,7 @@ void WatchFace::DrawBatteryIcon()
|
||||||
} else if (level < 0.0f) {
|
} else if (level < 0.0f) {
|
||||||
level = 0.0f;
|
level = 0.0f;
|
||||||
}
|
}
|
||||||
level = 0.5f - sin(asin(1.0f - 2.0f * level) / 3.0f);
|
level = level * level * (3.0f - 2.0f * level);
|
||||||
|
|
||||||
m_display.fillRect(200 - 44, 9, (int)std::round(35.0f * level), 15, GxEPD_BLACK);
|
m_display.fillRect(200 - 44, 9, (int)std::round(35.0f * level), 15, GxEPD_BLACK);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue