[FL-2284] IR: Show universal remote loading (#1004)

* [FL-2131] IR: Show universal remote loading
* Remove unused hal rtc. Gui: cleanup loading module.

Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
Albert Kharisov
2022-02-24 15:59:36 +04:00
committed by GitHub
parent 92734f1bb3
commit 24987b95cd
32 changed files with 409 additions and 243 deletions

View File

@@ -27,18 +27,12 @@ typedef struct {
const char* text;
} ElementTextBoxLine;
void elements_progress_bar(
Canvas* canvas,
uint8_t x,
uint8_t y,
uint8_t width,
uint8_t progress,
uint8_t total) {
void elements_progress_bar(Canvas* canvas, uint8_t x, uint8_t y, uint8_t width, float progress) {
furi_assert(canvas);
furi_assert(total > 0);
furi_assert((progress >= 0) && (progress <= 1.0));
uint8_t height = 9;
uint8_t progress_length = roundf(((float)progress / total) * (width - 2));
uint8_t progress_length = roundf(progress * (width - 2));
canvas_set_color(canvas, ColorWhite);
canvas_draw_box(canvas, x + 1, y + 1, width - 2, height - 2);