Prusa MINI Firmware overview
screen_wizard.h
Go to the documentation of this file.
1 // screen_wizard.h
2 #ifndef _SCREEN_WIZARD
3 #define _SCREEN_WIZARD
4 
5 #include "gui.h"
6 #include "status_footer.h"
7 #include "wizard_types.h"
8 //#include "wizard_ui.h"
9 #include "xyzcalib.h"
10 #include "selftest.h"
11 #include "firstlay.h"
12 
13 #pragma pack(push)
14 #pragma pack(1)
15 
16 typedef union {
21  //selftest_screen_t selftest_screen;
25 
26 //data in screen_variant_t screen_variant does not "survive" between screens
27 //data in selftest_data_t selftest, xyzcalib_data_t xyzcalib, firstlay_data_t firstlay, does
28 typedef struct
29 {
32  //window_header_t header;
42  /*float Kp_bed;
43  float Ki_bed;
44  float Kd_bed;
45  float Kp_noz;
46  float Ki_noz;
47  float Kd_noz;*/
49 
50 #pragma pack(pop)
51 
52 #define pd ((screen_wizard_data_t *)screen->pdata)
53 
54 extern const char *wizard_get_caption(screen_t *screen);
55 
56 extern void wizard_done_screen(screen_t *screen);
57 
58 extern void wizard_ui_set_progress(int ctl, float val);
59 
60 #endif //_SCREEN_WIZARD
_STATE_SELFTEST_Y
Definition: wizard_types.h:17
window_set_alignment
void window_set_alignment(int16_t id, uint8_t alignment)
Definition: window.c:561
screen_wizard_init
void screen_wizard_init(screen_t *screen)
Definition: screen_wizard.c:31
xyzcalib_xy_search
int xyzcalib_xy_search(int16_t id_body, xyzcalib_screen_t *p_screen, xyzcalib_data_t *p_data)
Definition: xyzcalib.c:63
Marlin_PID_wrapper.h
selftest.h
fs_enable
void fs_enable()
Definition: filament_sensor.c:90
_window_text_t
Definition: window_text.h:15
_STATE_LAST
Definition: wizard_types.h:48
screen_wizard_data_t::firstlay
firstlay_data_t firstlay
Definition: screen_wizard.h:41
_STATE_XYZCALIB_XY_MSG_PLACE_PAPER
Definition: wizard_types.h:32
filament_sensor.h
xyzcalib_screen_t
Definition: xyzcalib.h:12
xyzcalib_xy_measure
int xyzcalib_xy_measure(int16_t id_body, xyzcalib_screen_t *p_screen, xyzcalib_data_t *p_data)
Definition: xyzcalib.c:75
screen_wizard
screen_t screen_wizard
Definition: screen_wizard.c:548
screen_wizard_data_t::selftest
selftest_data_t selftest
Definition: screen_wizard.h:39
z_offset_step
const float z_offset_step
Definition: menu_vars.cpp:26
wizard_msgbox1
int wizard_msgbox1(const char *text, uint16_t flags, uint16_t id_icon)
Definition: wizard_ui.c:47
variant8_ui8
variant8_t variant8_ui8(uint8_t ui8)
Definition: variant8.c:18
screen_wizard_data_t::screen_variant
screen_variant_t screen_variant
Definition: screen_wizard.h:38
_STATE_INFO
Definition: wizard_types.h:10
marlin_client.h
_STATE_XYZCALIB_XY_MSG_IS_SHEET
Definition: wizard_types.h:30
_window_frame_t
Definition: window_frame.h:18
wizard_done_screen
void wizard_done_screen(screen_t *screen)
Definition: screen_wizard.c:543
wizard_selftest_cool
int wizard_selftest_cool(int16_t id_body, selftest_cool_screen_t *p_screen, selftest_cool_data_t *p_data)
Definition: selftest_cool.c:77
wizard_firstlay_print
int wizard_firstlay_print(int16_t id_body, firstlay_screen_t *p_screen, firstlay_data_t *p_data, float z_offset)
Definition: firstlay.c:118
selftest_home_data_t
Definition: selftest_home.h:25
FILAMENT_NONE
Definition: filament.h:26
xyzcalib_home
int xyzcalib_home(int16_t id_body, xyzcalib_screen_t *p_screen, xyzcalib_data_t *p_data)
Definition: xyzcalib.c:39
firstlay_screen_t
Definition: firstlay.h:30
FS_DISABLED
Definition: filament_sensor.h:22
eeprom.h
screen_wizard_data_t::flags
uint8_t flags
Definition: screen_wizard.h:37
wizard_init
void wizard_init(float t_noz, float t_bed)
Definition: wizard_ui.c:111
_STATE_FIRSTLAY_PRINT
Definition: wizard_types.h:43
_marlin_vars_t::z_offset
float z_offset
Definition: marlin_vars.h:87
wizard_ui.h
pd
#define pd
Definition: screen_filebrowser.cpp:39
window_destroy_children
void window_destroy_children(int16_t id)
Definition: window.c:157
screen_variant_t::selftest_home_screen
selftest_home_screen_t selftest_home_screen
Definition: screen_wizard.h:18
WINDOW_EVENT_ENC_UP
#define WINDOW_EVENT_ENC_UP
Definition: window.h:41
MSGBOX_RES_NO
#define MSGBOX_RES_NO
Definition: window_msgbox.h:45
window_invalidate
void window_invalidate(int16_t id)
Definition: window.c:304
rect_ui16
static rect_ui16_t rect_ui16(uint16_t x, uint16_t y, uint16_t w, uint16_t h)
Definition: guitypes.h:159
_START_TEMP_BED
#define _START_TEMP_BED
Definition: wizard_config.h:46
marlin_processing
int marlin_processing(void)
Definition: marlin_client.c:145
xyzcalib_z
int xyzcalib_z(int16_t id_body, xyzcalib_screen_t *p_screen, xyzcalib_data_t *p_data)
Definition: xyzcalib.c:53
window_destroy
void window_destroy(int16_t id)
Definition: window.c:132
firstlay.h
screen_wizard_data_t::frame_footer
window_frame_t frame_footer
Definition: screen_wizard.h:31
EEVAR_RUN_FIRSTLAY
#define EEVAR_RUN_FIRSTLAY
Definition: eeprom.h:16
wizard_load_unload
LD_UNLD_STATE_t wizard_load_unload(LD_UNLD_STATE_t state)
Definition: wizard_load_unload.c:74
WINDOW_FLG_VISIBLE
#define WINDOW_FLG_VISIBLE
Definition: window.h:24
xyzcalib_is_ok
int xyzcalib_is_ok(int16_t id_body, xyzcalib_screen_t *p_screen, xyzcalib_data_t *p_data)
Definition: xyzcalib.c:92
_TEST_STATE_t
_TEST_STATE_t
Definition: wizard_types.h:84
screen_variant_t::selftest_temp_screen
selftest_temp_screen_t selftest_temp_screen
Definition: screen_wizard.h:20
IDR_PNG_icon_pepa
#define IDR_PNG_icon_pepa
Definition: resource.h:44
wizard_init_disable_PID
void wizard_init_disable_PID(float t_noz, float t_bed)
Definition: wizard_ui.c:135
wizard_selftest_y
int wizard_selftest_y(int16_t id_body, selftest_fans_axis_screen_t *p_screen, selftest_fans_axis_data_t *p_data)
Definition: selftest_fans_axis.c:367
is_state_in_wizard_mask
static int is_state_in_wizard_mask(wizard_state_t st)
Definition: screen_wizard.c:19
firstlay_data_t::state_print
_TEST_STATE_t state_print
Definition: firstlay.h:67
eeprom_set_var
void eeprom_set_var(uint8_t id, variant8_t var)
Definition: eeprom.c:88
_STATE_SELFTEST_Z
Definition: wizard_types.h:18
screen_variant_t::selftest_cool_screen
selftest_cool_screen_t selftest_cool_screen
Definition: screen_wizard.h:19
wizard_ui_set_progress
void wizard_ui_set_progress(int ctl, float val)
wizard_selftest_is_ok
int wizard_selftest_is_ok(int16_t id_body, selftest_data_t *p_data)
Definition: selftest.c:5
screen_wizard_data_t::state
wizard_state_t state
Definition: screen_wizard.h:36
dbg.h
screen_variant_t::firstlay_screen
firstlay_screen_t firstlay_screen
Definition: screen_wizard.h:23
screen_variant_t
Definition: screen_wizard.h:16
MSGBOX_DEF_BUTTON1
#define MSGBOX_DEF_BUTTON1
Definition: window_msgbox.h:55
wizard_get_caption
const char * wizard_get_caption(screen_t *screen)
Definition: screen_wizard.c:494
filaments
const filament_t filaments[FILAMENTS_END]
Definition: filament.cpp:20
_STATE_FINISH
Definition: wizard_types.h:46
_STATE_SELFTEST_FAN1
Definition: wizard_types.h:15
_STATE_XYZCALIB_XY_MEASURE
Definition: wizard_types.h:35
ALIGN_LEFT_BOTTOM
#define ALIGN_LEFT_BOTTOM
Definition: guitypes.h:22
window_show
void window_show(int16_t id)
Definition: window.c:529
_STATE_SELFTEST_COOL
Definition: wizard_types.h:20
FILAMENT_PLA
Definition: filament.h:27
_STATE_FIRSTLAY_MSBX_START_PRINT
Definition: wizard_types.h:42
wizard_firstlay_event_dn
void wizard_firstlay_event_dn(firstlay_screen_t *p_screen)
Definition: firstlay.c:241
selftest_cool_screen_t
Definition: selftest_cool.h:17
_STATE_SELFTEST_INIT
Definition: wizard_types.h:13
screen_close
void screen_close(void)
Definition: screen.c:80
_STATE_XYZCALIB_PASS
Definition: wizard_types.h:36
_STATE_XYZCALIB_XY_MSG_REMOVE_SHEET
Definition: wizard_types.h:31
firstlay_screen_t::load_unload_state
LD_UNLD_STATE_t load_unload_state
Definition: firstlay.h:43
_START_TEMP_NOZ
#define _START_TEMP_NOZ
Definition: wizard_config.h:47
wizard_selftest_z
int wizard_selftest_z(int16_t id_body, selftest_fans_axis_screen_t *p_screen, selftest_fans_axis_data_t *p_data)
Definition: selftest_fans_axis.c:378
_STATE_XYZCALIB_Z
Definition: wizard_types.h:28
xyzcalib.h
MSGBOX_BTN_DONE
#define MSGBOX_BTN_DONE
Definition: wizard_ui.h:13
selftest_temp_data_t
Definition: selftest_temp.h:27
window_set_text
void window_set_text(int16_t id, const char *text)
Definition: window.c:340
_STATE_SELFTEST_HOME
Definition: wizard_types.h:19
screen_variant_t::xyzcalib_screen
xyzcalib_screen_t xyzcalib_screen
Definition: screen_wizard.h:22
EEVAR_RUN_XYZCALIB
#define EEVAR_RUN_XYZCALIB
Definition: eeprom.h:15
_STATE_SELFTEST_X
Definition: wizard_types.h:16
_STATE_XYZCALIB_FAIL
Definition: wizard_types.h:37
EEVAR_RUN_SELFTEST
#define EEVAR_RUN_SELFTEST
Definition: eeprom.h:14
_STATE_FIRSTLAY_FAIL
Definition: wizard_types.h:45
_STATE_FIRSTLAY_INIT
Definition: wizard_types.h:39
_window_t
Definition: window.h:76
screen_wizard_data_t::frame
window_frame_t frame
Definition: screen_wizard.h:30
_STATE_SELFTEST_TEMP
Definition: wizard_types.h:22
_STATE_SELFTEST_INIT_TEMP
Definition: wizard_types.h:21
selftest_temp_screen_t
Definition: selftest_temp.h:16
init_state
static _TEST_STATE_t init_state(wizard_state_t st)
Definition: screen_wizard.c:23
wizard_mask
uint64_t wizard_mask
Definition: screen_wizard.c:17
MSGBOX_RES_YES
#define MSGBOX_RES_YES
Definition: window_msgbox.h:44
menu_vars.h
_STATE_FIRST
Definition: wizard_types.h:11
WINDOW_CLS_FRAME
#define WINDOW_CLS_FRAME
Definition: window.h:9
wizard_done_screen
void wizard_done_screen(screen_t *screen)
Definition: screen_wizard.c:543
get_filament
FILAMENT_t get_filament()
Definition: filament.cpp:41
firstlay_data_t
Definition: firstlay.h:63
FS_NO_FILAMENT
Definition: filament_sensor.h:20
fs_get_state
fsensor_t fs_get_state()
Definition: filament_sensor.c:67
_STATE_XYZCALIB_HOME
Definition: wizard_types.h:27
_STATE_FIRSTLAY_LOAD
Definition: wizard_types.h:40
wizard_selftest_fan0
int wizard_selftest_fan0(int16_t id_body, selftest_fans_axis_screen_t *p_screen, selftest_fans_axis_data_t *p_data)
Definition: selftest_fans_axis.c:81
selftest_cool_data_t
Definition: selftest_cool.h:30
marlin_gcode
void marlin_gcode(const char *gcode)
Definition: marlin_client.c:195
marlin_update_vars
marlin_vars_t * marlin_update_vars(uint64_t msk)
Definition: marlin_client.c:368
_STATE_FIRSTLAY_MSBX_CALIB
Definition: wizard_types.h:41
wizard_selftest_home
int wizard_selftest_home(int16_t id_body, selftest_home_screen_t *p_screen, selftest_home_data_t *p_data)
Definition: selftest_home.c:28
wizard_selftest_fan1
int wizard_selftest_fan1(int16_t id_body, selftest_fans_axis_screen_t *p_screen, selftest_fans_axis_data_t *p_data)
Definition: selftest_fans_axis.c:99
LD_UNLD_DONE
Definition: wizard_load_unload.h:15
filament.h
screen_wizard_data_t::frame_body
window_frame_t frame_body
Definition: screen_wizard.h:35
uint8_t
const uint8_t[]
Definition: 404_html.c:3
MARLIN_VAR_MSK
#define MARLIN_VAR_MSK(v_id)
Definition: marlin_vars.h:35
firstlay_screen_t::Z_offset
float Z_offset
Definition: firstlay.h:49
window_hide
void window_hide(int16_t id)
Definition: window.c:539
xyzcalib_data_t
Definition: xyzcalib.h:22
_screen_t
Definition: screen.h:18
selftest_data_t
Definition: selftest.h:21
_STATE_XYZCALIB_INIT
Definition: wizard_types.h:26
WINDOW_CLS_TEXT
#define WINDOW_CLS_TEXT
Definition: window.h:10
screen_wizard_draw
void screen_wizard_draw(screen_t *screen)
Definition: screen_wizard.c:98
_TEST_START
Definition: wizard_types.h:85
wizard_firstlay_event_up
void wizard_firstlay_event_up(firstlay_screen_t *p_screen)
Definition: firstlay.c:249
selftest_fans_axis_screen_t
Definition: selftest_fans_axis.h:16
MSGBOX_BTN_YESNO
#define MSGBOX_BTN_YESNO
Definition: window_msgbox.h:24
stm32f4xx_hal.h
This file contains all the functions prototypes for the HAL module driver.
window_create_ptr
int16_t window_create_ptr(int16_t cls_id, int16_t id_parent, rect_ui16_t rect, void *ptr)
Definition: window.c:102
wizard_types.h
FS_NOT_CONNECTED
Definition: filament_sensor.h:21
_STATE_INIT
Definition: wizard_types.h:9
wizard_state_t
wizard_state_t
Definition: wizard_types.h:7
_STATE_START
Definition: wizard_types.h:8
_STATE_SELFTEST_PASS
Definition: wizard_types.h:23
_marlin_vars_t
Definition: marlin_vars.h:77
marlin_start_processing
void marlin_start_processing(void)
Definition: marlin_client.c:174
screen_wizard_done
void screen_wizard_done(screen_t *screen)
Definition: screen_wizard.c:81
wizard_selftest_temp
int wizard_selftest_temp(int16_t id_body, selftest_temp_screen_t *p_screen, selftest_temp_data_t *p_data)
Definition: selftest_temp.c:131
screen_wizard_data_t
Definition: screen_wizard.h:28
selftest_fans_axis_data_t
Definition: selftest_fans_axis.h:37
FILAMENT_t
FILAMENT_t
Definition: filament.h:25
WINDOW_EVENT_LOOP
#define WINDOW_EVENT_LOOP
Definition: window.h:49
marlin_set_z_offset
float marlin_set_z_offset(float val)
Definition: marlin_client.c:409
screen_wizard.h
fs_wait_inicialized
fsensor_t fs_wait_inicialized()
Definition: filament_sensor.c:104
LD_UNLD_INIT
Definition: wizard_load_unload.h:10
config.h
wizard_msgbox
int wizard_msgbox(const char *text, uint16_t flags, uint16_t id_icon)
Definition: wizard_ui.c:42
z_offset_def
#define z_offset_def
Definition: menu_vars.h:46
screen_wizard_data_t::xyzcalib
xyzcalib_data_t xyzcalib
Definition: screen_wizard.h:40
gui.h
selftest_home_screen_t
Definition: selftest_home.h:16
screen_variant_t::selftest_fans_axis_screen
selftest_fans_axis_screen_t selftest_fans_axis_screen
Definition: screen_wizard.h:17
screen_wizard_event
int screen_wizard_event(screen_t *screen, window_t *window, uint8_t event, void *param)
Definition: screen_wizard.c:101
fs_disable
void fs_disable()
Definition: filament_sensor.c:97
_STATE_XYZCALIB_XY_MSG_CLEAN_NOZZLE
Definition: wizard_types.h:29
marlin_set_print_speed
uint16_t marlin_set_print_speed(uint16_t val)
Definition: marlin_client.c:417
_STATE_FIRSTLAY_MSBX_REPEAT_PRINT
Definition: wizard_types.h:44
nozzle
Nozzle nozzle
Definition: nozzle.cpp:29
_STATE_XYZCALIB_XY_MSG_PLACE_SHEET
Definition: wizard_types.h:34
_STATE_SELFTEST_FAIL
Definition: wizard_types.h:24
wizard_get_caption
const char * wizard_get_caption(screen_t *screen)
Definition: screen_wizard.c:494
pscreen_wizard
const screen_t * pscreen_wizard
Definition: screen_wizard.c:559
screen_wizard_data_t::header
window_text_t header
Definition: screen_wizard.h:33
wizard_config.h
MSGBOX_BTN_NEXT
#define MSGBOX_BTN_NEXT
Definition: wizard_ui.h:12
WINDOW_EVENT_ENC_DN
#define WINDOW_EVENT_ENC_DN
Definition: window.h:40
_STATE_SELFTEST_FAN0
Definition: wizard_types.h:14
MARLIN_VAR_Z_OFFSET
#define MARLIN_VAR_Z_OFFSET
Definition: marlin_vars.h:23
_TEST_PASSED
Definition: wizard_types.h:87
wizard_selftest_x
int wizard_selftest_x(int16_t id_body, selftest_fans_axis_screen_t *p_screen, selftest_fans_axis_data_t *p_data)
Definition: selftest_fans_axis.c:356
screen_wizard_data_t::footer
status_footer_t footer
Definition: screen_wizard.h:34
_STATE_XYZCALIB_XY_SEARCH
Definition: wizard_types.h:33