Prusa MINI Firmware overview
|
|
void | wiz_set_progressbar_range_auto (window_progress_t *p_progress, int min, int max, int range_dif, int value) |
|
int | wiz_set_progressbar_range (window_progress_t *p_progress, int min, int max, int range_min, int range_max, int value) |
|
int | wiz_set_progressbar (window_progress_t *p_progress, int min, int max, int value) |
|
int | wiz_get_percent (int min, int max, int value) |
|
static void | mix_cl (color_t *ret, color_t cl_0, color_t cl_100, int progress, int chan) |
|
void | wiz_set_progressbar_dual_cl (window_progress_t *p_progress, int value, int cl_val, color_t cl_0, color_t cl_100) |
|
◆ wiz_set_progressbar_range_auto()
void wiz_set_progressbar_range_auto |
( |
window_progress_t * |
p_progress, |
|
|
int |
min, |
|
|
int |
max, |
|
|
int |
range_dif, |
|
|
int |
value |
|
) |
| |
7 int new_min =
min - range_dif;
8 int new_max =
max + range_dif;
9 int visible_min = new_min + 3 * (
min +
max) / 100;
11 if (value < visible_min)
◆ wiz_set_progressbar_range()
int wiz_set_progressbar_range |
( |
window_progress_t * |
p_progress, |
|
|
int |
min, |
|
|
int |
max, |
|
|
int |
range_min, |
|
|
int |
range_max, |
|
|
int |
value |
|
) |
| |
19 if (value < range_min)
21 else if (value > range_max)
◆ wiz_set_progressbar()
int wiz_set_progressbar |
( |
window_progress_t * |
p_progress, |
|
|
int |
min, |
|
|
int |
max, |
|
|
int |
value |
|
) |
| |
◆ wiz_get_percent()
int wiz_get_percent |
( |
int |
min, |
|
|
int |
max, |
|
|
int |
value |
|
) |
| |
46 return (
float)(value -
min) * (
float)100 / (float)(
max -
min);
◆ mix_cl()
51 cl_0 = (cl_0 >> (chan * 8)) & 0xff;
52 cl_100 = (cl_100 >> (chan * 8)) & 0xff;
54 cl = ((100 - progress) * cl_0) / 100;
55 cl += (progress * cl_100) / 100;
59 *ret |= cl << (chan * 8);
◆ wiz_set_progressbar_dual_cl()
70 for (
int channel = 0; channel <= 3; ++channel) {
71 mix_cl(&color, cl_0, cl_100, cl_val, channel);
int wiz_set_progressbar_range(window_progress_t *p_progress, int min, int max, int range_min, int range_max, int value)
Definition: wizard_progress_bar.c:16
color_t color_progress
Definition: window_progress.h:19
#define COLOR_RED
Definition: guitypes.h:42
#define max(a, b)
Definition: wiring_constants.h:40
#define COLOR_LIME
Definition: guitypes.h:44
int16_t id
Definition: window.h:79
#define min(a, b)
Definition: wiring_constants.h:36
int wiz_get_percent(int min, int max, int value)
Definition: wizard_progress_bar.c:40
void window_set_value(int16_t id, float value)
Definition: window.c:363
#define COLOR_BLUE
Definition: guitypes.h:45
uint32_t color_t
Definition: guitypes.h:62
window_t win
Definition: window_progress.h:16
static void mix_cl(color_t *ret, color_t cl_0, color_t cl_100, int progress, int chan)
Definition: wizard_progress_bar.c:49