Fix for drawing battery icon
All checks were successful
Compile / Compile (push) Successful in 1m14s

This commit is contained in:
Lewis Jackson 2023-06-01 03:17:42 +03:00
parent 9e6f562287
commit f87d626925

View file

@ -1,4 +1,4 @@
#include "Clock.h"
#include "Clock.h"
#include "../SevenSegment.h"
#include "../Icons.h"
#include <Fonts/FreeSans9pt7b.h>
@ -16,7 +16,6 @@ void WatchFacePages::Clock::InitBoot()
void WatchFacePages::Clock::InitWake()
{
}
void WatchFacePages::Clock::DrawPage(bool partialRefresh)
@ -59,7 +58,7 @@ void WatchFacePages::Clock::DrawBatteryIcon()
m_display.fillRect(200 - 48, 5, 43, 23, GxEPD_BLACK);
m_display.fillRect(200 - 46, 7, 39, 19, GxEPD_WHITE);
int intLevel = m_features.battery.GetPercentage();
uint8_t level = intLevel / 100.0f;
float level = intLevel / 100.0f;
m_display.fillRect(200 - 44, 9, (int)std::round(35.0f * level), 15, GxEPD_BLACK);