X-Git-Url: https://git.rohieb.name/hackover2013-badge-firmware.git/blobdiff_plain/a7be12a4e68fcaaa92f81a394bc316a592ec6270..11d3519339b45996592aa5b43669c9cd8cc495b1:/project/commands/drawing/cmd_progress.c diff --git a/project/commands/drawing/cmd_progress.c b/project/commands/drawing/cmd_progress.c index 0168e05..dbd5dec 100644 --- a/project/commands/drawing/cmd_progress.c +++ b/project/commands/drawing/cmd_progress.c @@ -45,6 +45,7 @@ #ifdef CFG_TFTLCD #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