Prusa MINI Firmware overview
wizard_types.h File Reference
#include <assert.h>

Go to the source code of this file.

Macros

#define _STATE_MASK(state)   (((uint64_t)1) << state)
 
#define _STATE_MASK_WIZARD_START
 
#define _STATE_MASK_SELFTEST
 
#define _STATE_MASK_XYZCALIB
 
#define _STATE_MASK_FIRSTLAY
 
#define _STATE_MASK_WIZARD   (_STATE_MASK_WIZARD_START | _STATE_MASK_SELFTEST | _STATE_MASK_FIRSTLAY | _STATE_MASK(_STATE_FINISH) | _STATE_MASK(_STATE_LAST))
 
#define _SCREEN_NONE   0
 
#define _SCREEN_SELFTEST_FANS_XYZ   1
 
#define _SCREEN_SELFTEST_HOME   2
 
#define _SCREEN_SELFTEST_TEMP   3
 
#define _SCREEN_XYZCALIB_HOME   4
 

Enumerations

enum  wizard_state_t {
  _STATE_START, _STATE_INIT, _STATE_INFO, _STATE_FIRST,
  _STATE_SELFTEST_INIT, _STATE_SELFTEST_FAN0, _STATE_SELFTEST_FAN1, _STATE_SELFTEST_X,
  _STATE_SELFTEST_Y, _STATE_SELFTEST_Z, _STATE_SELFTEST_HOME, _STATE_SELFTEST_COOL,
  _STATE_SELFTEST_INIT_TEMP, _STATE_SELFTEST_TEMP, _STATE_SELFTEST_PASS, _STATE_SELFTEST_FAIL,
  _STATE_XYZCALIB_INIT, _STATE_XYZCALIB_HOME, _STATE_XYZCALIB_Z, _STATE_XYZCALIB_XY_MSG_CLEAN_NOZZLE,
  _STATE_XYZCALIB_XY_MSG_IS_SHEET, _STATE_XYZCALIB_XY_MSG_REMOVE_SHEET, _STATE_XYZCALIB_XY_MSG_PLACE_PAPER, _STATE_XYZCALIB_XY_SEARCH,
  _STATE_XYZCALIB_XY_MSG_PLACE_SHEET, _STATE_XYZCALIB_XY_MEASURE, _STATE_XYZCALIB_PASS, _STATE_XYZCALIB_FAIL,
  _STATE_FIRSTLAY_INIT, _STATE_FIRSTLAY_LOAD, _STATE_FIRSTLAY_MSBX_CALIB, _STATE_FIRSTLAY_MSBX_START_PRINT,
  _STATE_FIRSTLAY_PRINT, _STATE_FIRSTLAY_MSBX_REPEAT_PRINT, _STATE_FIRSTLAY_FAIL, _STATE_FINISH,
  _STATE_LAST
}
 
enum  _TEST_STATE_t { _TEST_START, _TEST_RUN, _TEST_PASSED, _TEST_FAILED }
 

Functions

static int _is_test_done (int result)
 

Macro Definition Documentation

◆ _STATE_MASK

#define _STATE_MASK (   state)    (((uint64_t)1) << state)

◆ _STATE_MASK_WIZARD_START

#define _STATE_MASK_WIZARD_START

◆ _STATE_MASK_SELFTEST

◆ _STATE_MASK_XYZCALIB

◆ _STATE_MASK_FIRSTLAY

◆ _STATE_MASK_WIZARD

◆ _SCREEN_NONE

#define _SCREEN_NONE   0

◆ _SCREEN_SELFTEST_FANS_XYZ

#define _SCREEN_SELFTEST_FANS_XYZ   1

◆ _SCREEN_SELFTEST_HOME

#define _SCREEN_SELFTEST_HOME   2

◆ _SCREEN_SELFTEST_TEMP

#define _SCREEN_SELFTEST_TEMP   3

◆ _SCREEN_XYZCALIB_HOME

#define _SCREEN_XYZCALIB_HOME   4

Enumeration Type Documentation

◆ wizard_state_t

Enumerator
_STATE_START 
_STATE_INIT 
_STATE_INFO 
_STATE_FIRST 
_STATE_SELFTEST_INIT 
_STATE_SELFTEST_FAN0 
_STATE_SELFTEST_FAN1 
_STATE_SELFTEST_X 
_STATE_SELFTEST_Y 
_STATE_SELFTEST_Z 
_STATE_SELFTEST_HOME 
_STATE_SELFTEST_COOL 
_STATE_SELFTEST_INIT_TEMP 
_STATE_SELFTEST_TEMP 
_STATE_SELFTEST_PASS 
_STATE_SELFTEST_FAIL 
_STATE_XYZCALIB_INIT 
_STATE_XYZCALIB_HOME 
_STATE_XYZCALIB_Z 
_STATE_XYZCALIB_XY_MSG_CLEAN_NOZZLE 
_STATE_XYZCALIB_XY_MSG_IS_SHEET 
_STATE_XYZCALIB_XY_MSG_REMOVE_SHEET 
_STATE_XYZCALIB_XY_MSG_PLACE_PAPER 
_STATE_XYZCALIB_XY_SEARCH 
_STATE_XYZCALIB_XY_MSG_PLACE_SHEET 
_STATE_XYZCALIB_XY_MEASURE 
_STATE_XYZCALIB_PASS 
_STATE_XYZCALIB_FAIL 
_STATE_FIRSTLAY_INIT 
_STATE_FIRSTLAY_LOAD 
_STATE_FIRSTLAY_MSBX_CALIB 
_STATE_FIRSTLAY_MSBX_START_PRINT 
_STATE_FIRSTLAY_PRINT 
_STATE_FIRSTLAY_MSBX_REPEAT_PRINT 
_STATE_FIRSTLAY_FAIL 
_STATE_FINISH 
_STATE_LAST 

◆ _TEST_STATE_t

Enumerator
_TEST_START 
_TEST_RUN 
_TEST_PASSED 
_TEST_FAILED 
84  {
86  _TEST_RUN,

Function Documentation

◆ _is_test_done()

static int _is_test_done ( int  result)
static
91  {
92  return (result == _TEST_PASSED) || (result == _TEST_FAILED);
93 }
Here is the caller graph for this function:
_STATE_SELFTEST_Y
Definition: wizard_types.h:17
_STATE_LAST
Definition: wizard_types.h:48
_STATE_XYZCALIB_XY_MSG_PLACE_PAPER
Definition: wizard_types.h:32
_STATE_INFO
Definition: wizard_types.h:10
_STATE_XYZCALIB_XY_MSG_IS_SHEET
Definition: wizard_types.h:30
_STATE_FIRSTLAY_PRINT
Definition: wizard_types.h:43
_TEST_FAILED
Definition: wizard_types.h:88
_TEST_STATE_t
_TEST_STATE_t
Definition: wizard_types.h:84
_STATE_SELFTEST_Z
Definition: wizard_types.h:18
_STATE_FINISH
Definition: wizard_types.h:46
_STATE_SELFTEST_FAN1
Definition: wizard_types.h:15
_STATE_XYZCALIB_XY_MEASURE
Definition: wizard_types.h:35
_STATE_SELFTEST_COOL
Definition: wizard_types.h:20
_STATE_FIRSTLAY_MSBX_START_PRINT
Definition: wizard_types.h:42
_STATE_SELFTEST_INIT
Definition: wizard_types.h:13
_STATE_XYZCALIB_PASS
Definition: wizard_types.h:36
_STATE_XYZCALIB_XY_MSG_REMOVE_SHEET
Definition: wizard_types.h:31
_STATE_XYZCALIB_Z
Definition: wizard_types.h:28
_STATE_SELFTEST_HOME
Definition: wizard_types.h:19
_STATE_SELFTEST_X
Definition: wizard_types.h:16
_STATE_XYZCALIB_FAIL
Definition: wizard_types.h:37
_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
_STATE_FIRST
Definition: wizard_types.h:11
_TEST_RUN
Definition: wizard_types.h:86
_STATE_XYZCALIB_HOME
Definition: wizard_types.h:27
_STATE_FIRSTLAY_LOAD
Definition: wizard_types.h:40
_STATE_FIRSTLAY_MSBX_CALIB
Definition: wizard_types.h:41
_STATE_XYZCALIB_INIT
Definition: wizard_types.h:26
_TEST_START
Definition: wizard_types.h:85
_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
_STATE_MASK
#define _STATE_MASK(state)
Definition: wizard_types.h:53
_STATE_XYZCALIB_XY_MSG_CLEAN_NOZZLE
Definition: wizard_types.h:29
_STATE_FIRSTLAY_MSBX_REPEAT_PRINT
Definition: wizard_types.h:44
_STATE_XYZCALIB_XY_MSG_PLACE_SHEET
Definition: wizard_types.h:34
_STATE_SELFTEST_FAIL
Definition: wizard_types.h:24
_STATE_SELFTEST_FAN0
Definition: wizard_types.h:14
_TEST_PASSED
Definition: wizard_types.h:87
_STATE_XYZCALIB_XY_SEARCH
Definition: wizard_types.h:33