Replace inverse smoothstep with regular smoothstep for battery curve
All checks were successful
Compile / Compile (push) Successful in 1m18s

This commit is contained in:
Lewis Jackson 2023-06-01 15:19:46 +03:00
parent f564f8c6e8
commit c1ed9a77c5

View file

@ -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);