Prusa MINI Firmware overview
|
Go to the documentation of this file.
3 #ifndef _WINDOW_DLG_STATEMACHINE_H
4 #define _WINDOW_DLG_STATEMACHINE_H
15 #define BT_ENABLED ((uint8_t)(1 << 0))
17 #define BT_AUTOEXIT ((uint8_t)(1 << 2))
19 #define DLG_BT_FLG ((uint8_t)(1 << 0)) //button flag
20 #define DLG_CH_CMD ((uint8_t)(1 << 1)) //check marlin_command()
23 #define DLG_DI_US0 ((uint8_t)(1 << 4)) //user flag 0
24 #define DLG_DI_US1 ((uint8_t)(1 << 5)) //user flag 1
25 #define DLG_DI_US2 ((uint8_t)(1 << 6)) //user flag 2
26 #define DLG_DI_US3 ((uint8_t)(1 << 7)) //user flag 3
135 #endif //_WINDOW_DLG_STATEMACHINE_H
const dlg_cb_t on_timeout
Definition: window_dlg_statemachine.h:83
window_class_t cls
Definition: window_dlg_statemachine.h:102
static void phase_changed_log(int phase, int base_progress)
Definition: window_dlg_statemachine.c:461
void() window_draw_t(void *window)
Definition: window.h:57
const _cl_dlg * _ths
Definition: window_dlg_statemachine.h:97
const _dlg_state * p_states
Definition: window_dlg_statemachine.h:79
Definition: window_dlg_statemachine.h:101
#define BT_ENABLED
Definition: window_dlg_statemachine.h:15
int16_t WINDOW_CLS_DLG_LOADUNLOAD
Definition: window_dlg_statemachine.c:37
void progress_draw(rect_ui16_t win_rect, font_t *font, color_t color_back, color_t color_text, padding_ui8_t padding, uint8_t progress)
Definition: window_dlg_statemachine.c:108
dlg_result_t _gui_dlg(const _cl_dlg *_ths, void *p_additional_vars, int32_t ttl)
Definition: window_dlg_statemachine.c:257
int16_t window_capture(void)
Definition: window.c:169
uint16_t y
Definition: guitypes.h:71
uint8_t h
Definition: guitypes.h:78
color_t color_back
Definition: window_dlg_statemachine.h:89
Definition: window_dlg_statemachine.h:76
uint16_t h
Definition: display.h:26
uint16_t w
Definition: guitypes.h:72
#define DLG_BT_FLG
Definition: window_dlg_statemachine.h:19
void _window_dlg_statemachine_draw_phase_text(window_dlg_statemachine_t *window)
Definition: window_dlg_statemachine.c:160
Definition: guitypes.h:76
uint8_t flags
Definition: window_dlg_statemachine.h:38
#define DLG_PRX_CH
Definition: window_dlg_statemachine.c:31
int16_t WINDOW_CLS_DLG_LOADUNLOAD
Definition: window_dlg_statemachine.c:37
#define MARLIN_VAR_INDEX_E
Definition: marlin_vars.h:67
dlg_result_t _gui_dlg(const _cl_dlg *_ths, void *p_additional_vars, int32_t ttl)
Definition: window_dlg_statemachine.c:257
window_draw_dlg_cb_t * progress_draw
Definition: window_dlg_statemachine.h:70
color_t color_text
Definition: guitypes.h:108
#define BT_AUTOEXIT
Definition: window_dlg_statemachine.h:17
void set_repaint_btn_flg(window_dlg_statemachine_t *window)
Definition: window_dlg_statemachine.c:49
int is_repaint_btn_flg(window_dlg_statemachine_t *window)
Definition: window_dlg_statemachine.c:53
const dlg_loop_cb_t on_loop
Definition: window_dlg_statemachine.h:82
#define DLG_PPR_CH
Definition: window_dlg_statemachine.c:30
#define MARLIN_VAR_MOTION
Definition: marlin_vars.h:8
int is_repaint_btn_flg(window_dlg_statemachine_t *window)
Definition: window_dlg_statemachine.c:53
#define ALIGN_CENTER
Definition: guitypes.h:19
void window_invalidate(int16_t id)
Definition: window.c:304
static rect_ui16_t rect_ui16(uint16_t x, uint16_t y, uint16_t w, uint16_t h)
Definition: guitypes.h:159
void progress_clr(rect_ui16_t win_rect, font_t *font, color_t color_back)
Definition: window_dlg_statemachine.c:130
dlg_state_func state_fnc
Definition: window_dlg_statemachine.h:73
font_t * font
Definition: guitypes.h:110
const char * text
Definition: window_dlg_statemachine.h:71
Definition: window_dlg_statemachine.h:67
void window_destroy(int16_t id)
Definition: window.c:132
uint8_t last_text_h
Definition: window_dlg_statemachine.h:95
void window_dlg_statemachine_draw_progress_none(window_dlg_statemachine_t *window)
Definition: window_dlg_statemachine.c:156
void window_dlg_statemachine_event_1bt(window_dlg_statemachine_t *window, uint8_t event, void *param)
Definition: window_dlg_statemachine.c:235
#define WINDOW_CLS_USER
Definition: window.h:21
#define DLG_BTN_CH
Definition: window_dlg_statemachine.c:27
rect_ui16_t msg_box_sz
Definition: guitypes.h:114
void window_dlg_statemachine_init(window_dlg_statemachine_t *window)
Definition: window_dlg_statemachine.c:57
static void print_log()
Definition: window_dlg_statemachine.c:463
int8_t phase
Definition: window_dlg_statemachine.h:39
void _window_dlg_statemachine_draw_frame(window_dlg_statemachine_t *window)
Definition: window_dlg_statemachine.c:100
void window_dlg_statemachine_draw_progress_tot(window_dlg_statemachine_t *window)
Definition: window_dlg_statemachine.c:144
void window_dlg_statemachine_draw_progress_part(window_dlg_statemachine_t *window)
Definition: window_dlg_statemachine.c:150
#define NULL
Definition: usbd_def.h:53
color_t color_text
Definition: window_dlg_statemachine.h:90
loop_result_t(* dlg_loop_cb_t)(_dlg_vars *p_vars, void *p_additional_vars)
Definition: window_dlg_statemachine.h:57
Definition: window_dlg_statemachine.h:87
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
_dlg_vars vars
Definition: window_dlg_statemachine.h:98
void() window_draw_dlg_cb_t(window_dlg_statemachine_t *window)
Definition: window_dlg_statemachine.h:28
uint32_t f_invalid
Definition: window.h:87
padding_ui8_t padding
Definition: guitypes.h:112
#define COLOR_GRAY
Definition: guitypes.h:50
static void is_part_log(int part_progress)
Definition: window_dlg_statemachine.c:457
int(* dlg_state_func)(_dlg_vars *p_vars, void *p_additional_vars)
Definition: window_dlg_statemachine.h:55
uint32_t time_total
Definition: window_dlg_statemachine.h:47
void() window_event_dlg_cb_t(window_dlg_statemachine_t *window, uint8_t event, void *param)
Definition: window_dlg_statemachine.h:30
void gui_invalidate(void)
Definition: gui.c:66
Definition: window_dlg_statemachine.h:52
font_t * font_title
Definition: window_dlg_statemachine.h:92
#define COLOR_ORANGE
Definition: guitypes.h:57
window_t win
Definition: window_dlg_statemachine.h:88
Definition: window_dlg_statemachine.h:51
static int rect_empty_ui16(rect_ui16_t rc)
Definition: guitypes.h:177
const dlg_cb_t on_done
Definition: window_dlg_statemachine.h:84
void window_dlg_statemachine_event(window_dlg_statemachine_t *window, uint8_t event, void *param)
Definition: window_dlg_statemachine.c:228
uint8_t base_progress
Definition: window_dlg_statemachine.h:44
void
Definition: png.h:1083
color_t color_back
Definition: guitypes.h:107
Definition: guitypes.h:86
if(size<=((png_alloc_size_t) -1) - ob)
Definition: pngwrite.c:2176
static uint32_t _phase_time_total(int phase, const _cl_dlg *_ths)
Definition: window_dlg_statemachine.c:375
#define MARLIN_VAR_POS_E
Definition: marlin_vars.h:18
marlin_vars_t * marlin_update_vars(uint64_t msk)
Definition: marlin_client.c:368
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
int8_t prev_phase
Definition: window_dlg_statemachine.h:40
dlg_result_t
Definition: dlg_result.h:9
uint32_t time
Definition: window_dlg_statemachine.h:69
void window_dlg_statemachine_draw_0bt(window_dlg_statemachine_t *window)
Definition: window_dlg_statemachine.c:94
const uint8_t[]
Definition: 404_html.c:3
#define _dbg(...)
Definition: dbg.h:50
static void progress_changed_log(int progress)
Definition: window_dlg_statemachine.c:459
Definition: dlg_result.h:10
#define MARLIN_VAR_MSK(v_id)
Definition: marlin_vars.h:35
Definition: window_dlg_statemachine.h:36
display_t * display
Definition: display.c:6
uint16_t h
Definition: guitypes.h:73
uint8_t part_progress
Definition: window_dlg_statemachine.h:43
rect_ui16_t rect
Definition: window.h:101
const char * title
Definition: window_dlg_statemachine.h:78
const _dlg_button_t * p_button
Definition: window_dlg_statemachine.h:72
void window_dlg_statemachine_draw(window_dlg_statemachine_t *window)
Definition: window_dlg_statemachine.c:187
uint32_t f_visible
Definition: window.h:85
#define WINDOW_EVENT_CLICK
Definition: window.h:46
font_t * font
Definition: window_dlg_statemachine.h:91
rect_ui16_t _get_dlg_statemachine_button_size(window_dlg_statemachine_t *window)
Definition: window_dlg_statemachine.c:78
This file contains all the functions prototypes for the HAL module driver.
int16_t window_create_ptr(int16_t cls_id, int16_t id_parent, rect_ui16_t rect, void *ptr)
Definition: window.c:102
void window_dlg_statemachine_draw_progress_none(window_dlg_statemachine_t *window)
Definition: window_dlg_statemachine.c:156
#define DLG_TXT_CH
Definition: window_dlg_statemachine.c:28
#define DLG_PRO_CH
Definition: window_dlg_statemachine.c:29
void window_dlg_statemachine_draw_1bt(window_dlg_statemachine_t *window)
Definition: window_dlg_statemachine.c:87
const window_class_dlg_statemachine_t window_class_dlg_statemachine
Definition: window_dlg_statemachine.c:246
Definition: marlin_vars.h:77
uint16_t x
Definition: guitypes.h:70
padding_ui8_t padding
Definition: window_dlg_statemachine.h:93
uint16_t w
Definition: display.h:25
#define MARLIN_VAR_INDEX_Z
Definition: marlin_vars.h:66
int
Definition: createSpeedLookupTable.py:15
const window_class_dlg_statemachine_t window_class_dlg_statemachine
Definition: window_dlg_statemachine.c:246
uint8_t prev_part_progress
Definition: window_dlg_statemachine.h:45
uint32_t color_t
Definition: guitypes.h:62
void window_dlg_statemachine_draw_progress_tot(window_dlg_statemachine_t *window)
Definition: window_dlg_statemachine.c:144
font_t * font_big
Definition: guitypes.h:111
void() window_init_t(void *window)
Definition: window.h:55
float pos[4]
Definition: marlin_vars.h:82
void window_dlg_statemachine_draw_progress_part(window_dlg_statemachine_t *window)
Definition: window_dlg_statemachine.c:150
gui_defaults_t gui_defaults
Definition: gui.c:20
#define WINDOW_EVENT_BTN_DN
Definition: window.h:38
const size_t count
Definition: window_dlg_statemachine.h:80
uint8_t progress
Definition: window_dlg_statemachine.h:41
window_t * window_1
Definition: window.c:14
rect_ui16_t _get_dlg_statemachine_button_size(window_dlg_statemachine_t *window)
Definition: window_dlg_statemachine.c:78
#define DLG_PHA_CH
Definition: window_dlg_statemachine.c:32
void window_dlg_statemachine_draw_1bt(window_dlg_statemachine_t *window)
Definition: window_dlg_statemachine.c:87
uint32_t tick_part_start
Definition: window_dlg_statemachine.h:46
#define DLG_DRA_FR
Definition: window_dlg_statemachine.c:25
uint32_t flg
Definition: window.h:81
display_draw_line_t * draw_line
Definition: display.h:31
struct _window_class_dlg_statemachine_t window_class_dlg_statemachine_t
void window_dlg_statemachine_event_1bt(window_dlg_statemachine_t *window, uint8_t event, void *param)
Definition: window_dlg_statemachine.c:235
static void clr_logs()
Definition: window_dlg_statemachine.c:455
void(* dlg_cb_t)(void)
Definition: window_dlg_statemachine.h:56
loop_result_t
Definition: window_dlg_statemachine.h:50
const dlg_cb_t on_load
Definition: window_dlg_statemachine.h:81
#define WINDOW_FLG_ENABLED
Definition: window.h:25
uint16_t flags
Definition: window_dlg_statemachine.h:94
void window_dlg_statemachine_draw_0bt(window_dlg_statemachine_t *window)
Definition: window_dlg_statemachine.c:94
uint8_t prev_progress
Definition: window_dlg_statemachine.h:42
static point_ui16_t point_ui16(uint16_t x, uint16_t y)
Definition: guitypes.h:154
void set_repaint_btn_flg(window_dlg_statemachine_t *window)
Definition: window_dlg_statemachine.c:49
struct _window_dlg_statemachine_t window_dlg_statemachine_t
Definition: window_dlg_statemachine.h:9