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

Function update_progress

src/UpdateManager.cpp:39–49  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

37}
38
39void update_progress(int cur, int total)
40{
41 DisplayManager.clear();
42 int progress = (cur * 100) / total;
43 char progressStr[5];
44 snprintf(progressStr, 5, "%d%%", progress);
45 DisplayManager.resetTextColor();
46 DisplayManager.printText(0, 6, progressStr, true, false);
47 DisplayManager.drawProgressBar(0, 7, progress, 0x00FF00, 0xFFFFFF);
48 DisplayManager.show();
49}
50
51void update_error(int err)
52{

Callers

nothing calls this directly

Calls 5

resetTextColorMethod · 0.80
printTextMethod · 0.80
drawProgressBarMethod · 0.80
showMethod · 0.80
clearMethod · 0.45

Tested by

no test coverage detected