#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"
/**************************************************************************/
/*!
/**************************************************************************/
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);
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;
}
// 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