X-Git-Url: https://git.rohieb.name/hackover2013-badge-firmware.git/blobdiff_plain/9d18e10afb2439a6a9ba6978a799259746a837b7..4292be14c78b8f30075c9e4837dd026f6fec532e:/project/commands/drawing/cmd_progress.c diff --git a/project/commands/drawing/cmd_progress.c b/project/commands/drawing/cmd_progress.c index 40c1b27..dbd5dec 100644 --- a/project/commands/drawing/cmd_progress.c +++ b/project/commands/drawing/cmd_progress.c @@ -43,8 +43,9 @@ #include "project/commands.h" // Generic helper functions #ifdef CFG_TFTLCD - #include "drivers/lcd/tft/lcd.h" - #include "drivers/lcd/tft/drawing.h" + #include "drivers/displays/tft/lcd.h" + #include "drivers/displays/tft/drawing.h" + #include "drivers/displays/tft/controls/progressbar.h" /**************************************************************************/ /*! @@ -53,7 +54,7 @@ /**************************************************************************/ void cmd_progress(uint8_t argc, char **argv) { - int32_t x, y, w, h, percent, border, borderfill, progressborder, progressfill; + int32_t x, y, w, h, percent, progressfill; // Convert supplied parameters getNumber (argv[0], &x); @@ -61,13 +62,10 @@ void cmd_progress(uint8_t argc, char **argv) getNumber (argv[2], &w); getNumber (argv[3], &h); getNumber (argv[4], &percent); - getNumber (argv[5], &border); - getNumber (argv[6], &borderfill); - getNumber (argv[7], &progressborder); - getNumber (argv[8], &progressfill); + getNumber (argv[5], &progressfill); // ToDo: Validate data! - if (border < 0 || border > 0xFFFF || borderfill < 0 || borderfill > 0xFFFF || progressborder < 0 || progressborder > 0xFFFF || progressfill < 0 || progressfill > 0xFFFF) + if (progressfill < 0 || progressfill > 0xFFFF) { printf("Invalid Color%s", CFG_PRINTF_NEWLINE); return; @@ -79,7 +77,7 @@ void cmd_progress(uint8_t argc, char **argv) } // Draw the progress bar (always use rounded corners for simplicity sake) - drawProgressBar(x, y, w, h, DRAW_ROUNDEDCORNERS_ALL, DRAW_ROUNDEDCORNERS_ALL, border, borderfill, progressborder, progressfill, percent); + progressbarRender(x, y, w, h, percent, progressfill, themeGetDefault()); } #endif