Prusa MINI Firmware overview
screen_wizard.c File Reference
#include "screen_wizard.h"
#include "dbg.h"
#include "config.h"
#include "stm32f4xx_hal.h"
#include "marlin_client.h"
#include "wizard_config.h"
#include "selftest.h"
#include "wizard_ui.h"
#include "Marlin_PID_wrapper.h"
#include "filament.h"
#include "menu_vars.h"
#include "eeprom.h"
#include "filament_sensor.h"

Functions

static int is_state_in_wizard_mask (wizard_state_t st)
 
static _TEST_STATE_t init_state (wizard_state_t st)
 
void screen_wizard_init (screen_t *screen)
 
void screen_wizard_done (screen_t *screen)
 
void screen_wizard_draw (screen_t *screen)
 
int screen_wizard_event (screen_t *screen, window_t *window, uint8_t event, void *param)
 
const char * wizard_get_caption (screen_t *screen)
 
void wizard_done_screen (screen_t *screen)
 

Variables

uint64_t wizard_mask = 0
 
screen_t screen_wizard
 
const screen_tpscreen_wizard = &screen_wizard
 

Function Documentation

◆ is_state_in_wizard_mask()

static int is_state_in_wizard_mask ( wizard_state_t  st)
static
19  {
20  return ((((uint64_t)1) << st) & wizard_mask) != 0;
21 }
Here is the caller graph for this function:

◆ init_state()

static _TEST_STATE_t init_state ( wizard_state_t  st)
static
23  {
24  if (is_state_in_wizard_mask(st)) {
25  return _TEST_START;
26  } else {
27  return _TEST_PASSED;
28  }
29 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ screen_wizard_init()

void screen_wizard_init ( screen_t screen)
31  {
33  pd->state = _STATE_START;
34 
35  int16_t id_frame = window_create_ptr(WINDOW_CLS_FRAME, -1, rect_ui16(0, 0, 0, 0), &(pd->frame));
36 
37  int16_t id_foter = window_create_ptr(WINDOW_CLS_FRAME, id_frame, rect_ui16(0, 320 - 64, 240, 64), &(pd->frame_footer));
38  window_hide(id_foter);
39 
40  int16_t id_body = window_create_ptr(WINDOW_CLS_FRAME, id_frame, rect_ui16(0, 32, 240, 320 - 96), &(pd->frame_body));
41  window_hide(id_body);
42 
43  int16_t id = window_create_ptr(WINDOW_CLS_TEXT, id_frame, rect_ui16(21, 0, 211, 30), &(pd->header));
45 
47 
48  status_footer_init(&(pd->footer), id_foter);
49 
50  pd->selftest.fans_axis_data.state_fan0 = init_state(_STATE_SELFTEST_FAN0);
51  pd->selftest.fans_axis_data.state_fan1 = init_state(_STATE_SELFTEST_FAN1);
52  pd->selftest.fans_axis_data.state_x = init_state(_STATE_SELFTEST_X);
53  pd->selftest.fans_axis_data.state_y = init_state(_STATE_SELFTEST_Y);
54  pd->selftest.fans_axis_data.state_z = init_state(_STATE_SELFTEST_Z);
55  pd->selftest.home_data.state_home = init_state(_STATE_SELFTEST_HOME);
56  pd->selftest.cool_data.state_cool = init_state(_STATE_SELFTEST_COOL);
57  pd->selftest.temp_data.state_preheat_nozzle = init_state(_STATE_SELFTEST_TEMP);
58  pd->selftest.temp_data.state_preheat_bed = init_state(_STATE_SELFTEST_TEMP);
59  pd->selftest.temp_data.state_temp_nozzle = init_state(_STATE_SELFTEST_TEMP);
60  pd->selftest.temp_data.state_temp_bed = init_state(_STATE_SELFTEST_TEMP);
61  pd->xyzcalib.state_home = init_state(_STATE_XYZCALIB_HOME);
62  pd->xyzcalib.state_z = init_state(_STATE_XYZCALIB_Z);
63  pd->xyzcalib.state_xy = _TEST_START; //init_state();
64  pd->xyzcalib.state_xy_search = init_state(_STATE_XYZCALIB_XY_SEARCH);
65  pd->xyzcalib.state_xy_measure = init_state(_STATE_XYZCALIB_XY_MEASURE);
66  //pd->firstlay.state_heat = init_state();
67  pd->firstlay.state_load = init_state(_STATE_FIRSTLAY_LOAD);
68  pd->firstlay.state_print = init_state(_STATE_FIRSTLAY_PRINT);
69 
70  pd->flags = 0;
71 
72  //backup PID
73  /*pd->Kp_bed = get_Kp_Bed();
74  pd->Ki_bed = get_Ki_Bed();
75  pd->Kd_bed = get_Kd_Bed();
76  pd->Kp_noz = get_Kp_Noz();
77  pd->Ki_noz = get_Ki_Noz();
78  pd->Kd_noz = get_Kd_Noz();*/
79 }
Here is the call graph for this function:

◆ screen_wizard_done()

void screen_wizard_done ( screen_t screen)
81  {
82  if (!marlin_processing())
84  /*
85  //M301 - Set Hotend PID
86  //M301 [C<value>] [D<value>] [E<index>] [I<value>] [L<value>] [P<value>]
87  marlin_gcode_printf("M301 D%f I%f P%f", (double)(pd->Kd_noz), (double)(pd->Ki_noz), (double)(pd->Kp_noz));
88  //M304 - Set Bed PID
89  //M304 [D<value>] [I<value>] [P<value>]
90  marlin_gcode_printf("M304 D%f I%f P%f", (double)(pd->Kd_bed), (double)(pd->Ki_bed), (double)(pd->Kp_bed));
91 */
92 
93  //turn heaters off
94  wizard_init(0, 0);
95  window_destroy(pd->frame.win.id);
96 }
Here is the call graph for this function:

◆ screen_wizard_draw()

void screen_wizard_draw ( screen_t screen)
98  {
99 }

◆ screen_wizard_event()

int screen_wizard_event ( screen_t screen,
window_t window,
uint8_t  event,
void param 
)
101  {
102  static int inside_handler = 0;
103 
104  int16_t footer_id = pd->frame_footer.win.id;
105  int16_t frame_id = pd->frame_body.win.id;
106  selftest_fans_axis_screen_t *p_selftest_fans_axis_screen = &(pd->screen_variant.selftest_fans_axis_screen);
107  selftest_home_screen_t *p_selftest_home_screen = &(pd->screen_variant.selftest_home_screen);
108  selftest_cool_screen_t *p_selftest_cool_screen = &(pd->screen_variant.selftest_cool_screen);
109  selftest_temp_screen_t *p_selftest_temp_screen = &(pd->screen_variant.selftest_temp_screen);
110  selftest_data_t *p_selftest_data = &(pd->selftest);
111  selftest_cool_data_t *p_selftest_cool_data = &(pd->selftest.cool_data);
112  selftest_temp_data_t *p_selftest_temp_data = &(pd->selftest.temp_data);
113  selftest_home_data_t *p_selftest_home_data = &(pd->selftest.home_data);
114  selftest_fans_axis_data_t *p_selftest_fans_axis_data = &(pd->selftest.fans_axis_data);
115  firstlay_screen_t *p_firstlay_screen = &(pd->screen_variant.firstlay_screen);
116  firstlay_data_t *p_firstlay_data = &(pd->firstlay);
117  xyzcalib_screen_t *p_xyzcalib_screen = &(pd->screen_variant.xyzcalib_screen);
118  xyzcalib_data_t *p_xyzcalib_data = &(pd->xyzcalib);
119 
120  if (pd->frame_footer.win.flg & WINDOW_FLG_VISIBLE) {
121  status_footer_event(&(pd->footer), window, event, param);
122  }
123 
124  //notify first layer calib (needed for baby steps)
125  if (pd->state == _STATE_FIRSTLAY_PRINT) {
126  if (event == WINDOW_EVENT_ENC_DN)
127  wizard_firstlay_event_dn(p_firstlay_screen);
128 
129  if (event == WINDOW_EVENT_ENC_UP)
130  wizard_firstlay_event_up(p_firstlay_screen);
131  }
132 
133  if (event == WINDOW_EVENT_LOOP) {
134  if (inside_handler == 0) {
136  window_set_text(pd->header.win.id, wizard_get_caption(screen));
137  inside_handler = 1;
138  while (is_state_in_wizard_mask(pd->state) == 0)
139  pd->state++; //skip disabled steps
140  switch (pd->state) {
141  case _STATE_START:
142  if (wizard_msgbox(
143  "Welcome to the \n"
144  "Original Prusa MINI\n"
145  "setup wizard. \n"
146  "Would you like to \n"
147  "continue? ",
149  == MSGBOX_RES_YES) {
150  pd->state = _STATE_INIT;
151  window_show(footer_id);
152  } else
153  screen_close();
154  break;
155  case _STATE_INIT:
156  //PID of nozzle does not work with low temperatures well
157  //have to preheat to lower temperature to avoid need of cooling
158  pd->state = _STATE_INFO;
159  window_show(footer_id);
161  if (fs_get_state() == FS_DISABLED) {
162  fs_enable();
164  fs_disable();
165  }
166  break;
167  case _STATE_INFO:
169  "The status bar is at\n"
170  "the bottom of the \n"
171  "screen. It contains\n"
172  "information about: \n"
173  " - Nozzle temp. \n"
174  " - Heatbed temp. \n"
175  " - Printing speed \n"
176  " - Z-axis height \n"
177  " - Selected filament",
178  MSGBOX_BTN_NEXT, 0);
179  pd->state = _STATE_FIRST;
180  break;
181  case _STATE_FIRST:
183  "Press NEXT to run \n"
184  "the Selftest, which\n"
185  "checks for \n"
186  "potential issues \n"
187  "related to \n"
188  "the assembly.",
189  MSGBOX_BTN_NEXT, 0);
190  pd->state = _STATE_SELFTEST_INIT;
191  break;
193  pd->state = _STATE_SELFTEST_FAN0;
194  //am i inicialized by screen before?
196  window_show(footer_id);
198  }
199  break;
201  if (wizard_selftest_fan0(frame_id, p_selftest_fans_axis_screen, p_selftest_fans_axis_data) == 100)
202  pd->state = _STATE_SELFTEST_FAN1;
203  break;
205  if (wizard_selftest_fan1(frame_id, p_selftest_fans_axis_screen, p_selftest_fans_axis_data) == 100)
206  pd->state = _STATE_SELFTEST_X;
207  break;
208  case _STATE_SELFTEST_X:
209  if (wizard_selftest_x(frame_id, p_selftest_fans_axis_screen, p_selftest_fans_axis_data) == 100)
210  pd->state = _STATE_SELFTEST_Y;
211  break;
212  case _STATE_SELFTEST_Y:
213  if (wizard_selftest_y(frame_id, p_selftest_fans_axis_screen, p_selftest_fans_axis_data) == 100)
214  pd->state = _STATE_SELFTEST_Z;
215  break;
216  case _STATE_SELFTEST_Z:
217  if (wizard_selftest_z(frame_id, p_selftest_fans_axis_screen, p_selftest_fans_axis_data) == 100)
218  pd->state = _STATE_SELFTEST_HOME;
219  break;
221  if (wizard_selftest_home(frame_id, p_selftest_home_screen, p_selftest_home_data) == 100)
222  pd->state = _STATE_SELFTEST_COOL;
223  break;
225  if (wizard_selftest_cool(frame_id, p_selftest_cool_screen, p_selftest_cool_data) == 100)
226  pd->state = _STATE_SELFTEST_INIT_TEMP;
227  break;
229  //must start marlin
230  pd->state = _STATE_SELFTEST_TEMP;
231  window_show(footer_id);
233  break;
235  if (wizard_selftest_temp(frame_id, p_selftest_temp_screen, p_selftest_temp_data) == 100) {
236  pd->state = wizard_selftest_is_ok(frame_id, p_selftest_data)
239  wizard_done_screen(screen);
240  }
241  break;
243  //need to show different msg box if XYZ calib shall not run
244  eeprom_set_var(EEVAR_RUN_SELFTEST, variant8_ui8(0)); // clear selftest flag
247  "Everything is alright. "
248  "I will run XYZ "
249  "calibration now. It will "
250  "take approximately "
251  "12 minutes.",
253  else // do not run XYZ
255  "All tests finished successfully!", MSGBOX_BTN_DONE, IDR_PNG_icon_pepa);
256  pd->state = _STATE_XYZCALIB_INIT;
257  break;
260  "The selftest failed\n"
261  "to finish. \n"
262  "Double-check the \n"
263  "printer's wiring \n"
264  "and axes. \n"
265  "Then restart \n"
266  "the Selftest. ",
267  MSGBOX_BTN_DONE, 0);
268  screen_close();
269  break;
271  pd->state = _STATE_XYZCALIB_HOME;
272  window_show(footer_id);
273  wizard_init(0, 0);
274  break;
276  if (xyzcalib_home(frame_id, p_xyzcalib_screen, p_xyzcalib_data) == 100)
277  pd->state = _STATE_XYZCALIB_Z;
278  break;
279  case _STATE_XYZCALIB_Z:
280  if (xyzcalib_z(frame_id, p_xyzcalib_screen, p_xyzcalib_data) == 100)
282  break;
284  window_set_text(pd->screen_variant.xyzcalib_screen.text_state.win.id, "Calibration XY");
286  "Please clean the nozzle "
287  "for calibration. Click "
288  "NEXT when done.",
289  MSGBOX_BTN_NEXT, 0);
291  break;
293  if (wizard_msgbox1(
294  "Is steel sheet "
295  "on heatbed?",
296  MSGBOX_BTN_YESNO, 0)
297  == MSGBOX_RES_YES)
299  else
301  break;
304  "Please remove steel "
305  "sheet from heatbed.",
306  MSGBOX_BTN_NEXT, 0);
308  break;
311  "Place a sheet of paper "
312  "under the nozzle during "
313  "the calibration of first "
314  "4 points. "
315  "If the nozzle "
316  "catches the paper, power "
317  "off printer immediately!",
318  MSGBOX_BTN_NEXT, 0);
319  pd->state = _STATE_XYZCALIB_XY_SEARCH;
320  break;
322  if (xyzcalib_xy_search(frame_id, p_xyzcalib_screen, p_xyzcalib_data) == 100)
324  break;
327  "Please place steel sheet "
328  "on heatbed.",
329  MSGBOX_BTN_NEXT, 0);
331  break;
333  if (xyzcalib_xy_measure(frame_id, p_xyzcalib_screen, p_xyzcalib_data) == 100) {
334  pd->state = xyzcalib_is_ok(frame_id, p_xyzcalib_screen, p_xyzcalib_data)
337  wizard_done_screen(screen);
338  }
339  break;
341  eeprom_set_var(EEVAR_RUN_XYZCALIB, variant8_ui8(0)); // clear XYZ calib flag
343  "Congratulations! "
344  "XYZ calibration is ok. "
345  "XY axes are "
346  "perpendicular.",
348  pd->state = _STATE_FIRSTLAY_INIT;
349  break;
352  "The XYZ calibration failed to finish. "
353  "Double-check the printer's wiring and axes, then restart the XYZ calibration.",
354  MSGBOX_BTN_DONE, 0);
355  screen_close();
356  break;
358  {
359  pd->state = _STATE_FIRSTLAY_LOAD;
360  window_show(footer_id);
361  FILAMENT_t filament = get_filament();
362  if (filament == FILAMENT_NONE || fs_get_state() == FS_NO_FILAMENT) filament = FILAMENT_PLA;
363  wizard_init(filaments[filament].nozzle, filaments[filament].heatbed);
364  p_firstlay_screen->load_unload_state = LD_UNLD_INIT;
365  }
366  break;
368  p_firstlay_screen->load_unload_state = wizard_load_unload(p_firstlay_screen->load_unload_state);
369  if (p_firstlay_screen->load_unload_state == LD_UNLD_DONE)
371  break;
374  "Now, let's calibrate\n"
375  "the distance \n"
376  "between the tip \n"
377  "of the nozzle and \n"
378  "the print sheet. ",
379  MSGBOX_BTN_NEXT, 0);
380 
381  //show dialog only when values are not equal
382  float diff = vars->z_offset - z_offset_def;
383  if ((diff <= -z_offset_step) || (diff >= z_offset_step)) {
384  char buff[255];
385  //cannot use \n
386  snprintf(buff, sizeof(buff) / sizeof(char),
387  "Do you want to use\n"
388  "the current value?\n"
389  "Current: %0.3f. \n"
390  "Default: %0.3f. \n"
391  "Click NO to use the default value (recommended)",
392  (double)vars->z_offset, (double)z_offset_def);
393 
394  if (wizard_msgbox(buff, MSGBOX_BTN_YESNO, 0) == MSGBOX_RES_NO) {
396  marlin_gcode("M500"); //store to eeprom
397  }
398  }
399 
401  } break;
404  // "Observe the pattern\n"
405  // "and turn the knob \n"
406  // "to adjust the \n"
407  // "nozzle height in \n"
408  // "real time. \n"
409  // "Extruded plastic \n"
410  // "must stick to \n"
411  // "the print surface."
412  "In the next step, \n"
413  "use the knob to \n"
414  "adjust the nozzle \n"
415  "height. \n"
416  "Check the pictures\n"
417  "in the handbook \n"
418  "for reference."
419 
420  ,
421  MSGBOX_BTN_NEXT, 0);
422  pd->state = _STATE_FIRSTLAY_PRINT;
423  break;
425  if (wizard_firstlay_print(frame_id, p_firstlay_screen, p_firstlay_data, vars->z_offset) == 100)
427  break;
429  if (wizard_msgbox(
430  "Do you want to \n"
431  "repeat the last \n"
432  "step and readjust \n"
433  "the distance \n"
434  "between the nozzle \n"
435  "and heatbed?",
437  == MSGBOX_RES_NO) {
438  pd->state = _STATE_FINISH;
439  marlin_set_z_offset(p_firstlay_screen->Z_offset);
440  marlin_gcode("M500"); //store to eeprom
441  eeprom_set_var(EEVAR_RUN_FIRSTLAY, variant8_ui8(0)); // clear first layer flag
442  wizard_done_screen(screen);
443  } else {
444  wizard_msgbox("Clean steel sheet.", MSGBOX_BTN_NEXT, 0);
445 
446  pd->state = _STATE_FIRSTLAY_PRINT;
447  pd->firstlay.state_print = _TEST_START;
448 
449  float z_val_to_store = p_firstlay_screen->Z_offset;
450  //show dialog only when values are not equal
451  float diff = z_val_to_store - z_offset_def;
452  if ((diff <= -z_offset_step) || (diff >= z_offset_step)) {
453  char buff[255];
454  snprintf(buff, sizeof(buff) / sizeof(char),
455  "Do you want to use last set value? "
456  "Last: %0.3f. "
457  "Default: %0.3f. "
458  "Click NO to use default value.",
459  (double)p_firstlay_screen->Z_offset, (double)z_offset_def);
460 
461  if (wizard_msgbox(buff, MSGBOX_BTN_YESNO, 0) == MSGBOX_RES_NO) {
462  z_val_to_store = z_offset_def;
463  }
464  }
465  marlin_set_z_offset(z_val_to_store);
466  marlin_gcode("M500"); //store to eeprom
467  }
468  break;
471  "The first layer calibration failed to finish. "
472  "Double-check the printer's wiring, nozzle and axes, then restart the calibration.",
473  MSGBOX_BTN_DONE, 0);
474  screen_close();
475  break;
476  case _STATE_FINISH:
478  "Calibration successful!\n"
479  "Happy printing!",
481  screen_close();
482  break;
483  default:
484  screen_close();
485  break;
486  }
487  inside_handler = 0;
488  }
489  } else {
490  }
491  return 0;
492 }
Here is the call graph for this function:

◆ wizard_get_caption()

const char* wizard_get_caption ( screen_t screen)
494  {
495  switch (pd->state) {
496  case _STATE_START:
497  case _STATE_INIT:
498  case _STATE_INFO:
499  case _STATE_FIRST:
500  return "WIZARD";
504  case _STATE_SELFTEST_X:
505  case _STATE_SELFTEST_Y:
506  case _STATE_SELFTEST_Z:
513  return "SELFTEST";
516  case _STATE_XYZCALIB_Z:
526  return "XYZ CALIBRATION";
534  return "FIRST LAYER CALIB.";
535  case _STATE_FINISH:
536  return "WIZARD - OK";
537  case _STATE_LAST:
538  return "";
539  }
540  return ""; //to avoid warning
541 }
Here is the caller graph for this function:

◆ wizard_done_screen()

void wizard_done_screen ( screen_t screen)
543  {
544  window_destroy_children(pd->frame_body.win.id);
545  window_invalidate(pd->frame_body.win.id);
546 }
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ wizard_mask

uint64_t wizard_mask = 0

◆ screen_wizard

◆ pscreen_wizard

const screen_t* pscreen_wizard = &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
fs_enable
void fs_enable()
Definition: filament_sensor.c:90
_STATE_LAST
Definition: wizard_types.h:48
_STATE_XYZCALIB_XY_MSG_PLACE_PAPER
Definition: wizard_types.h:32
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
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
_STATE_INFO
Definition: wizard_types.h:10
_STATE_XYZCALIB_XY_MSG_IS_SHEET
Definition: wizard_types.h:30
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
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
pd
#define pd
Definition: screen_filebrowser.cpp:39
window_destroy_children
void window_destroy_children(int16_t id)
Definition: window.c:157
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
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
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
wizard_selftest_is_ok
int wizard_selftest_is_ok(int16_t id_body, selftest_data_t *p_data)
Definition: selftest.c:5
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
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
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
_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
_STATE_FIRST
Definition: wizard_types.h:11
WINDOW_CLS_FRAME
#define WINDOW_CLS_FRAME
Definition: window.h:9
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
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
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
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
FS_NOT_CONNECTED
Definition: filament_sensor.h:21
_STATE_INIT
Definition: wizard_types.h:9
_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
fs_wait_inicialized
fsensor_t fs_wait_inicialized()
Definition: filament_sensor.c:104
LD_UNLD_INIT
Definition: wizard_load_unload.h:10
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
selftest_home_screen_t
Definition: selftest_home.h:16
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
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
_STATE_XYZCALIB_XY_SEARCH
Definition: wizard_types.h:33