Prusa MINI Firmware overview
|
#include "window_dlg_wait.h"
#include "display_helper.h"
#include "gui.h"
#include "dbg.h"
#include "stm32f4xx_hal.h"
#include "marlin_client.h"
#include "resource.h"
◆ DLG_W8_HOUR_CHNG
#define DLG_W8_HOUR_CHNG 0x0300 |
◆ DLG_W8_HOUR_REDRW
#define DLG_W8_HOUR_REDRW 0x0100 |
◆ DLG_W8_ANI_FLG
#define DLG_W8_ANI_FLG 0x0010 |
◆ DLG_W8_FRAME_FLG
#define DLG_W8_FRAME_FLG 0x4000 |
◆ DLG_W8_PROGRESS
#define DLG_W8_PROGRESS 0x8000 |
◆ DLG_W8_HOUR_ROT
#define DLG_W8_HOUR_ROT 0x0200 |
◆ DLG_W8_FPS
◆ window_dlg_wait_init()
◆ window_dlg_wait_draw()
62 icon_rc.
h = icon_rc.
w = 30;
68 if (window->
flags & 0x0010) {
71 }
else if (window->
flags & 0x0020) {
76 }
else if (window->
flags & 0x0040) {
82 }
else if (window->
flags & 0x0080) {
97 window->
flags &= 0xF00F;
107 uint16_t w = rc_pro.
w;
110 rc_pro.
x += rc_pro.
w;
111 rc_pro.
w = w - rc_pro.
w;
113 rc_pro.
y += rc_pro.
h;
114 rc_pro.
w = rc.
w - 120;
115 rc_pro.
x = rc.
x + 60;
117 sprintf(text,
"%d%%", window->
progress);
119 window->
flags &= 0x7FFF;
◆ window_dlg_wait_event()
◆ gui_dlg_wait()
int gui_dlg_wait |
( |
int8_t(*)() |
callback | ) |
|
146 gui_reset_jogwheel();
156 uint8_t tmp_timer, last_time = 0;
159 while ((*callback)()) {
161 if (tmp_timer != last_time && tmp_timer < 5) {
170 if (tmp_timer >= 5) {
174 tmp_timer = last_time = 0;
177 last_time = tmp_timer;
183 int8_t tmp_progress = (*callback)();
189 if (tmp_timer != last_time && tmp_timer < 5) {
198 if (tmp_timer >= 5) {
202 tmp_timer = last_time = 0;
205 last_time = tmp_timer;
◆ gui_marlin_busy_callback()
int8_t gui_marlin_busy_callback |
( |
void |
| ) |
|
◆ WINDOW_CLS_DLG_WAIT
int16_t WINDOW_CLS_DLG_WAIT = 0 |
◆ window_1
◆ window_class_dlg_wait
struct _window_dlg_wait_t window_dlg_wait_t
Definition: window_dlg_wait.h:13
void() window_draw_t(void *window)
Definition: window.h:57
#define DLG_W8_HOUR_ROT
Definition: window_dlg_wait.c:22
int16_t window_capture(void)
Definition: window.c:169
uint16_t y
Definition: guitypes.h:71
uint16_t w
Definition: guitypes.h:72
color_t color_text
Definition: guitypes.h:108
#define DLG_W8_FRAME_FLG
Definition: window_dlg_wait.c:20
uint16_t flags
Definition: window_dlg_wait.h:29
#define ALIGN_CENTER
Definition: guitypes.h:19
void window_invalidate(int16_t id)
Definition: window.c:304
font_t * font
Definition: guitypes.h:110
void window_destroy(int16_t id)
Definition: window.c:132
#define WINDOW_CLS_USER
Definition: window.h:21
rect_ui16_t msg_box_sz
Definition: guitypes.h:114
color_t color_back
Definition: window_dlg_wait.h:22
padding_ui8_t padding
Definition: window_dlg_wait.h:26
void window_dlg_wait_init(window_dlg_wait_t *window)
Definition: window_dlg_wait.c:29
#define DLG_W8_FPS
Definition: window_dlg_wait.c:23
#define DLG_W8_HOUR_REDRW
Definition: window_dlg_wait.c:18
int16_t WINDOW_CLS_DLG_WAIT
Definition: window_dlg_wait.c:25
display_fill_rect_t * fill_rect
Definition: display.h:33
uint32_t HAL_GetTick(void)
Provides a tick value in millisecond.
Definition: stm32f4xx_hal.c:339
uint32_t f_invalid
Definition: window.h:87
padding_ui8_t padding
Definition: guitypes.h:112
#define COLOR_GRAY
Definition: guitypes.h:50
void window_dlg_wait_draw(window_dlg_wait_t *window)
Definition: window_dlg_wait.c:41
window_t * window_1
Definition: window.c:14
void gui_invalidate(void)
Definition: gui.c:66
int marlin_motion(void)
Definition: marlin_client.c:182
#define DLG_W8_HOUR_CHNG
Definition: window_dlg_wait.c:17
#define COLOR_ORANGE
Definition: guitypes.h:57
font_t * font
Definition: window_dlg_wait.h:24
color_t color_back
Definition: guitypes.h:107
int marlin_busy(void)
Definition: marlin_client.c:152
font_t * font_title
Definition: window_dlg_wait.h:25
#define DLG_W8_PROGRESS
Definition: window_dlg_wait.c:21
int8_t progress
Definition: window_dlg_wait.h:28
void() window_event_t(void *window, uint8_t event, void *param)
Definition: window.h:58
Definition: guitypes.h:69
void render_text_align(rect_ui16_t rc, const char *text, font_t *font, color_t clr0, color_t clr1, padding_ui8_t padding, uint16_t flags)
Definition: display_helper.c:6
uint32_t timer
Definition: window_dlg_wait.h:27
const uint8_t[]
Definition: 404_html.c:3
display_t * display
Definition: display.c:6
uint16_t h
Definition: guitypes.h:73
rect_ui16_t rect
Definition: window.h:101
uint32_t f_visible
Definition: window.h:85
int16_t window_create_ptr(int16_t cls_id, int16_t id_parent, rect_ui16_t rect, void *ptr)
Definition: window.c:102
#define COLOR_BLACK
Definition: guitypes.h:40
uint16_t x
Definition: guitypes.h:70
window_t win
Definition: window_dlg_wait.h:21
void window_dlg_wait_event(window_dlg_wait_t *window, uint8_t event, void *param)
Definition: window_dlg_wait.c:124
#define DLG_W8_ANI_FLG
Definition: window_dlg_wait.c:19
font_t * font_big
Definition: guitypes.h:111
void() window_init_t(void *window)
Definition: window.h:55
gui_defaults_t gui_defaults
Definition: gui.c:20
void render_icon_align(rect_ui16_t rc, uint16_t id_res, color_t clr0, uint16_t flags)
Definition: display_helper.c:55
color_t color_text
Definition: window_dlg_wait.h:23
uint32_t flg
Definition: window.h:81
display_draw_line_t * draw_line
Definition: display.h:31
#define IDR_PNG_wizard_icon_hourglass
Definition: resource.h:56
#define WINDOW_FLG_ENABLED
Definition: window.h:25
static point_ui16_t point_ui16(uint16_t x, uint16_t y)
Definition: guitypes.h:154
Definition: window_dlg_wait.h:20