MCPcopy Create free account
hub / github.com/Blueforcer/awtrix3 / drawProgressBar

Method drawProgressBar

src/DisplayManager.cpp:1456–1463  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1454}
1455
1456void DisplayManager_::drawProgressBar(int16_t x, int16_t y, int progress, uint32_t pColor, uint32_t pbColor)
1457{
1458 int available_length = 32 - x;
1459 int leds_for_progress = (progress * available_length) / 100;
1460 drawLine(x, y, x + available_length - 1, y, pbColor);
1461 if (leds_for_progress > 0)
1462 drawLine(x, y, x + leds_for_progress - 1, y, pColor);
1463}
1464
1465void DisplayManager_::drawMenuIndicator(int cur, int total, uint32_t color)
1466{

Callers 3

NotifyOverlayFunction · 0.80
ShowCustomAppFunction · 0.80
update_progressFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected