Prusa MINI Firmware overview
selftest_fans_axis.c File Reference
#include "selftest.h"
#include "dbg.h"
#include "config.h"
#include "hwio_a3ides.h"
#include "marlin_client.h"
#include "wizard_config.h"
#include "wizard_ui.h"

Classes

struct  _cl_st_ax
 

Typedefs

typedef int(* selftest_phase) (selftest_fans_axis_data_t *p_data, uint8_t *state, int axis, int fr, int min, int max, int dir, char achar, float pos)
 

Functions

void wizard_init_screen_selftest_fans_axis (int16_t id_body, selftest_fans_axis_screen_t *p_screen, selftest_fans_axis_data_t *p_data)
 
int wizard_selftest_fan0 (int16_t id_body, selftest_fans_axis_screen_t *p_screen, selftest_fans_axis_data_t *p_data)
 
int wizard_selftest_fan1 (int16_t id_body, selftest_fans_axis_screen_t *p_screen, selftest_fans_axis_data_t *p_data)
 
static float _get_pos (int axis)
 
static int ph_init (selftest_fans_axis_data_t *p_data, uint8_t *state, int axis, int fr, int min, int max, int dir, char achar, float pos)
 
static int ph_prepare_to_move_to_max (selftest_fans_axis_data_t *p_data, uint8_t *state, int axis, int fr, int min, int max, int dir, char achar, float pos)
 
static int ph_move_to_max (selftest_fans_axis_data_t *p_data, uint8_t *state, int axis, int fr, int min, int max, int dir, char achar, float pos)
 
static int ph_wait_motion (selftest_fans_axis_data_t *p_data, uint8_t *state, int axis, int fr, int min, int max, int dir, char achar, float pos)
 
static int ph_move_to_min (selftest_fans_axis_data_t *p_data, uint8_t *state, int axis, int fr, int min, int max, int dir, char achar, float pos)
 
static int ph_measure_min (selftest_fans_axis_data_t *p_data, uint8_t *state, int axis, int fr, int min, int max, int dir, char achar, float pos)
 
static int ph_measure_max (selftest_fans_axis_data_t *p_data, uint8_t *state, int axis, int fr, int min, int max, int dir, char achar, float pos)
 
static int ph_finish (selftest_fans_axis_data_t *p_data, uint8_t *state, int axis, int fr, int min, int max, int dir, char achar, float pos)
 
static int ph_home_axis (selftest_fans_axis_data_t *p_data, uint8_t *state, int axis, int fr, int min, int max, int dir, char achar, float pos)
 
static int ph_home_all_axis (selftest_fans_axis_data_t *p_data, uint8_t *state, int axis, int fr, int min, int max, int dir, char achar, float pos)
 
static int ph_restore_Xaxis (selftest_fans_axis_data_t *p_data, uint8_t *state, int axis, int fr, int min, int max, int dir, char achar, float pos)
 
static int ph_restore_Yaxis (selftest_fans_axis_data_t *p_data, uint8_t *state, int axis, int fr, int min, int max, int dir, char achar, float pos)
 
static int ph_restore_Zaxis (selftest_fans_axis_data_t *p_data, uint8_t *state, int axis, int fr, int min, int max, int dir, char achar, float pos)
 
static int ph_wait_autohome (selftest_fans_axis_data_t *p_data, uint8_t *state, int axis, int fr, int min, int max, int dir, char achar, float pos)
 
void wizard_selftest_axis (const _cl_st_ax *_ths, selftest_fans_axis_data_t *p_data, uint8_t *state, int axis, int fr, int min, int max, int dir)
 
int wizard_selftest_x (int16_t id_body, selftest_fans_axis_screen_t *p_screen, selftest_fans_axis_data_t *p_data)
 
int wizard_selftest_y (int16_t id_body, selftest_fans_axis_screen_t *p_screen, selftest_fans_axis_data_t *p_data)
 
int wizard_selftest_z (int16_t id_body, selftest_fans_axis_screen_t *p_screen, selftest_fans_axis_data_t *p_data)
 

Variables

uint32_t Tacho_FAN0
 
uint32_t Tacho_FAN1
 
const char _axis_char [4] = { 'X', 'Y', 'Z', 'E' }
 
static const selftest_phase phasesX []
 
static const _cl_st_ax axisX
 
static const selftest_phase phasesY []
 
static const _cl_st_ax axisY
 
static const selftest_phase phasesZ []
 
static const _cl_st_ax axisZ
 

Typedef Documentation

◆ selftest_phase

typedef int(* selftest_phase) (selftest_fans_axis_data_t *p_data, uint8_t *state, int axis, int fr, int min, int max, int dir, char achar, float pos)

Function Documentation

◆ wizard_init_screen_selftest_fans_axis()

void wizard_init_screen_selftest_fans_axis ( int16_t  id_body,
selftest_fans_axis_screen_t p_screen,
selftest_fans_axis_data_t p_data 
)
15  {
16  int16_t id;
17  window_destroy_children(id_body);
18  window_show(id_body);
19  window_invalidate(id_body);
20 
21  uint16_t y = 40;
22  uint16_t x = WIZARD_MARGIN_LEFT;
23 
24  id = window_create_ptr(WINDOW_CLS_TEXT, id_body, rect_ui16(x, y, WIZARD_X_SPACE, 22), &(p_screen->text_fan_test));
25  window_set_text(id, "Fan test");
26 
27  y += 22;
28 
29  id = window_create_ptr(WINDOW_CLS_PROGRESS, id_body, rect_ui16(x, y, WIZARD_X_SPACE, 8), &(p_screen->progress_fan));
30 
31  y += 12;
32 
33  id = window_create_ptr(WINDOW_CLS_TEXT, id_body, rect_ui16(x, y, 200, 22), &(p_screen->text_extruder_fan));
34  window_set_text(id, "Hotend fan");
35 
36  id = window_create_ptr(WINDOW_CLS_ICON, id_body, rect_ui16(x + 200, y, 22, 22), &(p_screen->icon_extruder_fan));
38 
39  y += 22;
40 
41  id = window_create_ptr(WINDOW_CLS_TEXT, id_body, rect_ui16(x, y, 200, 22), &(p_screen->text_print_fan));
42  window_set_text(id, "Print fan");
43 
44  id = window_create_ptr(WINDOW_CLS_ICON, id_body, rect_ui16(x + 200, y, 22, 22), &(p_screen->icon_print_fan));
46 
47  y += 44;
48 
49  id = window_create_ptr(WINDOW_CLS_TEXT, id_body, rect_ui16(x, y, WIZARD_X_SPACE, 22), &(p_screen->text_checking_axis));
50  window_set_text(id, "Checking axes");
51 
52  y += 22;
53 
54  id = window_create_ptr(WINDOW_CLS_PROGRESS, id_body, rect_ui16(x, y, WIZARD_X_SPACE, 8), &(p_screen->progress_axis));
55 
56  y += 12;
57 
58  id = window_create_ptr(WINDOW_CLS_TEXT, id_body, rect_ui16(x, y, 200, 22), &(p_screen->text_x_axis));
59  window_set_text(id, "X-axis");
60 
61  id = window_create_ptr(WINDOW_CLS_ICON, id_body, rect_ui16(x + 200, y, 22, 22), &(p_screen->icon_x_axis));
63 
64  y += 22;
65 
66  id = window_create_ptr(WINDOW_CLS_TEXT, id_body, rect_ui16(x, y, 200, 22), &(p_screen->text_y_axis));
67  window_set_text(id, "Y-axis");
68 
69  id = window_create_ptr(WINDOW_CLS_ICON, id_body, rect_ui16(x + 200, y, 22, 22), &(p_screen->icon_y_axis));
71 
72  y += 22;
73 
74  id = window_create_ptr(WINDOW_CLS_TEXT, id_body, rect_ui16(x, y, 200, 22), &(p_screen->text_z_axis));
75  window_set_text(id, "Z-axis");
76 
77  id = window_create_ptr(WINDOW_CLS_ICON, id_body, rect_ui16(x + 200, y, 22, 22), &(p_screen->icon_z_axis));
79 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ 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 
)
81  {
82  if (p_data->state_fan0 == _TEST_START) {
83  wizard_init_screen_selftest_fans_axis(id_body, p_screen, p_data);
85  hwio_fan_set_pwm(0, 255);
86  Tacho_FAN0 = 0;
87  }
88  int progress = wizard_timer(&p_screen->timer0, _SELFTEST_FAN0_TIME, &(p_data->state_fan0), _WIZ_TIMER_AUTOPASS);
89  if (progress == 100) {
91  p_data->state_fan0 = _TEST_FAILED;
92  hwio_fan_set_pwm(0, 0);
93  }
94  window_set_value(p_screen->progress_fan.win.id, (float)progress / 2);
96  return progress;
97 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ 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 
)
99  {
100  if (p_data->state_fan1 == _TEST_START) {
101  wizard_init_screen_selftest_fans_axis(id_body, p_screen, p_data);
103  hwio_fan_set_pwm(1, 255);
104  Tacho_FAN1 = 0;
105  }
106  int progress = wizard_timer(&p_screen->timer0, _SELFTEST_FAN1_TIME, &(p_data->state_fan1), _WIZ_TIMER_AUTOPASS);
107  if (progress == 100) {
109  p_data->state_fan1 = _TEST_FAILED;
110  hwio_fan_set_pwm(1, 0);
111  }
112  window_set_value(p_screen->progress_fan.win.id, 50.0F + (float)progress / 2);
114  return progress;
115 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ _get_pos()

static float _get_pos ( int  axis)
static
120  {
121  return marlin_update_vars(MARLIN_VAR_MSK(MARLIN_VAR_POS_X + axis))->pos[axis];
122 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ph_init()

static int ph_init ( selftest_fans_axis_data_t p_data,
uint8_t state,
int  axis,
int  fr,
int  min,
int  max,
int  dir,
char  achar,
float  pos 
)
static
139  {
140  marlin_start_processing(); // enable processing
141  marlin_gcode("M211 S0"); // disable software endstops
142  marlin_gcode("M120"); // enable hw endstop detection
143  return 1;//next phase
144 }
Here is the call graph for this function:

◆ ph_prepare_to_move_to_max()

static int ph_prepare_to_move_to_max ( selftest_fans_axis_data_t p_data,
uint8_t state,
int  axis,
int  fr,
int  min,
int  max,
int  dir,
char  achar,
float  pos 
)
static
147  {
148  marlin_gcode_printf("G92 %c%.3f", achar, (double)pos); // set position to current
149  marlin_gcode_printf("G1 %c%.3f F%d", achar,(double)(pos - dir * (1.92F)), fr / 4);
150  return 1;//next phase
151 }
Here is the call graph for this function:

◆ ph_move_to_max()

static int ph_move_to_max ( selftest_fans_axis_data_t p_data,
uint8_t state,
int  axis,
int  fr,
int  min,
int  max,
int  dir,
char  achar,
float  pos 
)
static
154  {
155  marlin_gcode_printf("G92 %c%.3f", achar, (double)pos); // set position to current
156  p_data->axis_max[axis] = pos; // save current position
157  pos += dir * max; // calc target position
158  marlin_gcode_printf("G1 %c%.3f F%d", achar, (double)pos, fr); // start move to maximum (XY)
159  marlin_wait_motion(100); // wait for motion start (max 100ms)
160  return 1;//next phase
161 }
Here is the call graph for this function:

◆ ph_wait_motion()

static int ph_wait_motion ( selftest_fans_axis_data_t p_data,
uint8_t state,
int  axis,
int  fr,
int  min,
int  max,
int  dir,
char  achar,
float  pos 
)
static
164  {
165  if (marlin_motion()||marlin_busy()) return 0;//wait
166  else return 1;//next phase
167 }
Here is the call graph for this function:

◆ ph_move_to_min()

static int ph_move_to_min ( selftest_fans_axis_data_t p_data,
uint8_t state,
int  axis,
int  fr,
int  min,
int  max,
int  dir,
char  achar,
float  pos 
)
static
170  {
171  marlin_gcode_printf("G92 %c%.3f", achar, (double)pos); // set position to current
172  p_data->axis_min[axis] = pos; // save current position
173  pos -= dir * max; // calc target position
174  marlin_gcode_printf("G1 %c%.3f F%d", achar, (double)pos, fr); // start move to maximum
175  marlin_wait_motion(100); // wait for motion start (max 100ms)
176  return 1;//next phase
177 }
Here is the call graph for this function:

◆ ph_measure_min()

static int ph_measure_min ( selftest_fans_axis_data_t p_data,
uint8_t state,
int  axis,
int  fr,
int  min,
int  max,
int  dir,
char  achar,
float  pos 
)
static
180  {
181  float dis = dir * (p_data->axis_min[axis] - pos); // calculate traveled distance
182  _dbg("dis = %.3f", (double)dis);
183  if ((int)(dis + 0.5F) >= max) // check distance >= max
184  { // (round to millimeters)
185  _dbg("endstop not reached");
186  *state = _TEST_FAILED; // fail - endstop not triggered
187  return 0;
188  }
189  if ((int)(dis + 0.5F) <= min) // check distance <= min
190  { // (round to millimeters)
191  _dbg("distance to short");
192  *state = _TEST_FAILED; // fail - axis length invalid
193  return 0;
194  }
195  return 1;
196 }

◆ ph_measure_max()

static int ph_measure_max ( selftest_fans_axis_data_t p_data,
uint8_t state,
int  axis,
int  fr,
int  min,
int  max,
int  dir,
char  achar,
float  pos 
)
static
199  {
200  float dis = dir * (pos - p_data->axis_max[axis]); // calculate traveled distance
201  _dbg("dis = %.3f", (double)dis);
202  if ((int)(dis + 0.5F) >= max) // check distance >= max
203  { // (round to millimeters)
204  _dbg("endstop not reached");
205  *state = _TEST_FAILED; // fail - endstop not triggered
206  return 0;
207  }
208  if ((int)(dis + 0.5F) <= min) // check distance <= min
209  { // (round to millimeters)
210  _dbg("distance to short");
211  *state = _TEST_FAILED; // fail - axis length invalid
212  return 0;
213  }
214  return 1;
215 }

◆ ph_finish()

static int ph_finish ( selftest_fans_axis_data_t p_data,
uint8_t state,
int  axis,
int  fr,
int  min,
int  max,
int  dir,
char  achar,
float  pos 
)
static
218  {
219  _dbg("finished");
220  *state = _TEST_PASSED;
221  return 0;
222 }

◆ ph_home_axis()

static int ph_home_axis ( selftest_fans_axis_data_t p_data,
uint8_t state,
int  axis,
int  fr,
int  min,
int  max,
int  dir,
char  achar,
float  pos 
)
static
225  {
226  marlin_gcode("G90"); /*use absolute coordinates*/
227 
228  marlin_gcode_printf("G28 %c", achar); /*HOME AXIS MUST BE ONLY currrent axis*/
229  return 1;
230 }
Here is the call graph for this function:

◆ ph_home_all_axis()

static int ph_home_all_axis ( selftest_fans_axis_data_t p_data,
uint8_t state,
int  axis,
int  fr,
int  min,
int  max,
int  dir,
char  achar,
float  pos 
)
static
233  {
234  marlin_gcode("G90"); /*use absolute coordinates*/
235 
236  marlin_gcode("G28");
237  return 1;
238 }
Here is the call graph for this function:

◆ ph_restore_Xaxis()

static int ph_restore_Xaxis ( selftest_fans_axis_data_t p_data,
uint8_t state,
int  axis,
int  fr,
int  min,
int  max,
int  dir,
char  achar,
float  pos 
)
static
241  {
242  marlin_gcode_printf("%s", X_home_gcode); /*Set pos */
243  marlin_wait_motion(100);
244  return 1;
245 }
Here is the call graph for this function:

◆ ph_restore_Yaxis()

static int ph_restore_Yaxis ( selftest_fans_axis_data_t p_data,
uint8_t state,
int  axis,
int  fr,
int  min,
int  max,
int  dir,
char  achar,
float  pos 
)
static
248  {
249  marlin_gcode_printf("%s", Y_home_gcode); /*Set pos */
250  marlin_wait_motion(100);
251  return 1;
252 }
Here is the call graph for this function:

◆ ph_restore_Zaxis()

static int ph_restore_Zaxis ( selftest_fans_axis_data_t p_data,
uint8_t state,
int  axis,
int  fr,
int  min,
int  max,
int  dir,
char  achar,
float  pos 
)
static
255  {
256  marlin_gcode_printf("%s", Z_home_gcode); /*Set pos */
257  marlin_wait_motion(100);
258  return 1;
259 }
Here is the call graph for this function:

◆ ph_wait_autohome()

static int ph_wait_autohome ( selftest_fans_axis_data_t p_data,
uint8_t state,
int  axis,
int  fr,
int  min,
int  max,
int  dir,
char  achar,
float  pos 
)
static
262  {
264  else return 0;
265 }
Here is the call graph for this function:

◆ wizard_selftest_axis()

void wizard_selftest_axis ( const _cl_st_ax _ths,
selftest_fans_axis_data_t p_data,
uint8_t state,
int  axis,
int  fr,
int  min,
int  max,
int  dir 
)
340  {
341  static uint8_t phase = 0;
342  char achar = _axis_char[axis];
343  float pos = _get_pos(axis);
344  if (*state == _TEST_START) {
345  phase = 0;
346  }
347 
348  if ( ((size_t)phase) >= _ths->sz) {
349  *state = _TEST_FAILED;
350  }
351  else {
352  phase += _ths->p_phases[phase](p_data, state, axis, fr, min, max, dir, achar, pos);
353  }
354 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ 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 
)
356  {
357  if (p_data->state_x == _TEST_START)
358  wizard_init_screen_selftest_fans_axis(id_body, p_screen, p_data);
359  wizard_selftest_axis(&axisX, p_data, &(p_data->state_x), 0,
361  int progress = wizard_timer(&p_screen->timer0, _SELFTEST_X_TIME, &(p_data->state_x), _WIZ_TIMER);
362  window_set_value(p_screen->progress_axis.win.id, (float)progress / 3);
363  wizard_update_test_icon(p_screen->icon_x_axis.win.id, p_data->state_x);
364  return progress;
365 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ 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 
)
367  {
368  if (p_data->state_y == _TEST_START)
369  wizard_init_screen_selftest_fans_axis(id_body, p_screen, p_data);
370  wizard_selftest_axis(&axisY, p_data, &(p_data->state_y), 1,
372  int progress = wizard_timer(&p_screen->timer0, _SELFTEST_Y_TIME, &(p_data->state_y), _WIZ_TIMER);
373  window_set_value(p_screen->progress_axis.win.id, 33.3F + (float)progress / 3);
374  wizard_update_test_icon(p_screen->icon_y_axis.win.id, p_data->state_y);
375  return progress;
376 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ 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 
)
378  {
379  if (p_data->state_z == _TEST_START)
380  wizard_init_screen_selftest_fans_axis(id_body, p_screen, p_data);
381  wizard_selftest_axis(&axisZ, p_data, &(p_data->state_z), 2,
383  int progress = wizard_timer(&p_screen->timer0, _SELFTEST_Z_TIME, &(p_data->state_z), _WIZ_TIMER);
384  window_set_value(p_screen->progress_axis.win.id, 66.6F + (float)progress / 3);
385  wizard_update_test_icon(p_screen->icon_z_axis.win.id, p_data->state_z);
386  return progress;
387 }
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ Tacho_FAN0

uint32_t Tacho_FAN0

◆ Tacho_FAN1

uint32_t Tacho_FAN1

◆ _axis_char

const char _axis_char[4] = { 'X', 'Y', 'Z', 'E' }

◆ phasesX

◆ axisX

const _cl_st_ax axisX
static
Initial value:
= {
sizeof(phasesX)/sizeof(phasesX[0]), phasesX
}

◆ phasesY

◆ axisY

const _cl_st_ax axisY
static
Initial value:
= {
sizeof(phasesY)/sizeof(phasesY[0]), phasesY
}

◆ phasesZ

◆ axisZ

const _cl_st_ax axisZ
static
Initial value:
= {
sizeof(phasesZ)/sizeof(phasesZ[0]),
}
_SELFTEST_Z_TIME
#define _SELFTEST_Z_TIME
Definition: wizard_config.h:31
selftest_fans_axis_data_t::state_y
_TEST_STATE_t state_y
Definition: selftest_fans_axis.h:42
X_home_gcode
constexpr const char X_home_gcode[]
Definition: menu_vars.cpp:54
marlin_wait_motion
int marlin_wait_motion(uint32_t timeout)
Definition: marlin_client.c:187
Y_home_gcode
constexpr const char Y_home_gcode[]
Definition: menu_vars.cpp:71
selftest_fans_axis_data_t::state_z
_TEST_STATE_t state_z
Definition: selftest_fans_axis.h:43
ph_wait_motion
static int ph_wait_motion(selftest_fans_axis_data_t *p_data, uint8_t *state, int axis, int fr, int min, int max, int dir, char achar, float pos)
Definition: selftest_fans_axis.c:163
_SELFTEST_Z_MAX
#define _SELFTEST_Z_MAX
Definition: wizard_config.h:29
_get_pos
static float _get_pos(int axis)
Definition: selftest_fans_axis.c:120
_cl_st_ax::sz
const size_t sz
Definition: selftest_fans_axis.c:133
_SELFTEST_Y_MIN
#define _SELFTEST_Y_MIN
Definition: wizard_config.h:23
MARLIN_VAR_POS_X
#define MARLIN_VAR_POS_X
Definition: marlin_vars.h:15
selftest_fans_axis_screen_t::text_x_axis
window_text_t text_x_axis
Definition: selftest_fans_axis.h:24
_TEST_FAILED
Definition: wizard_types.h:88
window_destroy_children
void window_destroy_children(int16_t id)
Definition: window.c:157
selftest_fans_axis_screen_t::icon_print_fan
window_icon_t icon_print_fan
Definition: selftest_fans_axis.h:28
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
WIZARD_MARGIN_LEFT
#define WIZARD_MARGIN_LEFT
Definition: wizard_ui.h:8
axisY
static const _cl_st_ax axisY
Definition: selftest_fans_axis.c:306
selftest_fans_axis_screen_t::text_print_fan
window_text_t text_print_fan
Definition: selftest_fans_axis.h:22
_SELFTEST_FAN1_MAX
#define _SELFTEST_FAN1_MAX
Definition: wizard_config.h:16
marlin_stop_processing
void marlin_stop_processing(void)
Definition: marlin_client.c:166
max
#define max(a, b)
Definition: wiring_constants.h:40
state
static volatile fsensor_t state
Definition: filament_sensor.c:23
window_set_icon_id
void window_set_icon_id(int16_t id, uint16_t id_res)
Definition: window.c:659
selftest_fans_axis_screen_t::text_z_axis
window_text_t text_z_axis
Definition: selftest_fans_axis.h:26
_SELFTEST_X_MIN
#define _SELFTEST_X_MIN
Definition: wizard_config.h:18
F
#define F(str)
Definition: UHS_macros.h:164
window_show
void window_show(int16_t id)
Definition: window.c:529
_SELFTEST_Y_TIME
#define _SELFTEST_Y_TIME
Definition: wizard_config.h:26
selftest_fans_axis_screen_t::progress_fan
window_progress_t progress_fan
Definition: selftest_fans_axis.h:18
selftest_fans_axis_data_t::axis_max
float axis_max[3]
Definition: selftest_fans_axis.h:46
Z_home_gcode
constexpr const char Z_home_gcode[]
Definition: menu_vars.cpp:88
Tacho_FAN1
uint32_t Tacho_FAN1
Definition: main.c:153
_SELFTEST_X_TIME
#define _SELFTEST_X_TIME
Definition: wizard_config.h:21
ph_prepare_to_move_to_max
static int ph_prepare_to_move_to_max(selftest_fans_axis_data_t *p_data, uint8_t *state, int axis, int fr, int min, int max, int dir, char achar, float pos)
Definition: selftest_fans_axis.c:146
_window_t::id
int16_t id
Definition: window.h:79
_SELFTEST_X_MAX
#define _SELFTEST_X_MAX
Definition: wizard_config.h:19
selftest_fans_axis_data_t::state_x
_TEST_STATE_t state_x
Definition: selftest_fans_axis.h:41
_window_icon_t::win
window_t win
Definition: window_icon.h:12
WIZARD_X_SPACE
#define WIZARD_X_SPACE
Definition: wizard_ui.h:10
wizard_selftest_axis
void wizard_selftest_axis(const _cl_st_ax *_ths, selftest_fans_axis_data_t *p_data, uint8_t *state, int axis, int fr, int min, int max, int dir)
Definition: selftest_fans_axis.c:339
axisX
static const _cl_st_ax axisX
Definition: selftest_fans_axis.c:285
window_set_text
void window_set_text(int16_t id, const char *text)
Definition: window.c:340
ph_finish
static int ph_finish(selftest_fans_axis_data_t *p_data, uint8_t *state, int axis, int fr, int min, int max, int dir, char achar, float pos)
Definition: selftest_fans_axis.c:217
min
#define min(a, b)
Definition: wiring_constants.h:36
marlin_motion
int marlin_motion(void)
Definition: marlin_client.c:182
_SELFTEST_FAN0_MAX
#define _SELFTEST_FAN0_MAX
Definition: wizard_config.h:12
WINDOW_CLS_PROGRESS
#define WINDOW_CLS_PROGRESS
Definition: window.h:20
MARLIN_EVT_CommandEnd
#define MARLIN_EVT_CommandEnd
Definition: marlin_events.h:34
_SELFTEST_Z_MIN
#define _SELFTEST_Z_MIN
Definition: wizard_config.h:28
selftest_fans_axis_screen_t::text_extruder_fan
window_text_t text_extruder_fan
Definition: selftest_fans_axis.h:21
_SELFTEST_Z_FR
#define _SELFTEST_Z_FR
Definition: wizard_config.h:30
_SELFTEST_Y_FR
#define _SELFTEST_Y_FR
Definition: wizard_config.h:25
ph_home_axis
static int ph_home_axis(selftest_fans_axis_data_t *p_data, uint8_t *state, int axis, int fr, int min, int max, int dir, char achar, float pos)
Definition: selftest_fans_axis.c:224
window_set_value
void window_set_value(int16_t id, float value)
Definition: window.c:363
selftest_fans_axis_screen_t::progress_axis
window_progress_t progress_axis
Definition: selftest_fans_axis.h:19
_SELFTEST_FAN1_MIN
#define _SELFTEST_FAN1_MIN
Definition: wizard_config.h:15
marlin_busy
int marlin_busy(void)
Definition: marlin_client.c:152
selftest_fans_axis_screen_t::text_fan_test
window_text_t text_fan_test
Definition: selftest_fans_axis.h:20
phasesX
static const selftest_phase phasesX[]
Definition: selftest_fans_axis.c:268
selftest_fans_axis_screen_t::timer0
uint32_t timer0
Definition: selftest_fans_axis.h:32
selftest_fans_axis_data_t::axis_min
float axis_min[3]
Definition: selftest_fans_axis.h:45
selftest_fans_axis_screen_t::text_y_axis
window_text_t text_y_axis
Definition: selftest_fans_axis.h:25
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
hwio_fan_set_pwm
void hwio_fan_set_pwm(int i_fan, int val)
Definition: hwio_a3ides_2209_02.c:447
selftest_fans_axis_screen_t::icon_x_axis
window_icon_t icon_x_axis
Definition: selftest_fans_axis.h:29
_SELFTEST_FAN1_TIME
#define _SELFTEST_FAN1_TIME
Definition: wizard_config.h:14
uint8_t
const uint8_t[]
Definition: 404_html.c:3
_dbg
#define _dbg(...)
Definition: dbg.h:50
selftest_fans_axis_screen_t::icon_z_axis
window_icon_t icon_z_axis
Definition: selftest_fans_axis.h:31
MARLIN_VAR_MSK
#define MARLIN_VAR_MSK(v_id)
Definition: marlin_vars.h:35
_SELFTEST_Y_MAX
#define _SELFTEST_Y_MAX
Definition: wizard_config.h:24
WINDOW_CLS_ICON
#define WINDOW_CLS_ICON
Definition: window.h:12
_WIZ_TIMER_AUTOPASS
Definition: wizard_ui.h:20
selftest_fans_axis_data_t::state_fan0
_TEST_STATE_t state_fan0
Definition: selftest_fans_axis.h:39
axisZ
static const _cl_st_ax axisZ
Definition: selftest_fans_axis.c:335
WINDOW_CLS_TEXT
#define WINDOW_CLS_TEXT
Definition: window.h:10
_TEST_START
Definition: wizard_types.h:85
_axis_char
const char _axis_char[4]
Definition: selftest_fans_axis.c:117
ph_move_to_min
static int ph_move_to_min(selftest_fans_axis_data_t *p_data, uint8_t *state, int axis, int fr, int min, int max, int dir, char achar, float pos)
Definition: selftest_fans_axis.c:169
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
selftest_fans_axis_data_t::state_fan1
_TEST_STATE_t state_fan1
Definition: selftest_fans_axis.h:40
selftest_fans_axis_screen_t::icon_y_axis
window_icon_t icon_y_axis
Definition: selftest_fans_axis.h:30
wizard_get_test_icon_resource
uint16_t wizard_get_test_icon_resource(uint8_t state)
Definition: wizard_ui.c:10
selftest_fans_axis_screen_t::icon_extruder_fan
window_icon_t icon_extruder_fan
Definition: selftest_fans_axis.h:27
marlin_start_processing
void marlin_start_processing(void)
Definition: marlin_client.c:174
ph_init
static int ph_init(selftest_fans_axis_data_t *p_data, uint8_t *state, int axis, int fr, int min, int max, int dir, char achar, float pos)
Definition: selftest_fans_axis.c:138
_SELFTEST_X_FR
#define _SELFTEST_X_FR
Definition: wizard_config.h:20
ph_restore_Yaxis
static int ph_restore_Yaxis(selftest_fans_axis_data_t *p_data, uint8_t *state, int axis, int fr, int min, int max, int dir, char achar, float pos)
Definition: selftest_fans_axis.c:247
wizard_timer
int wizard_timer(uint32_t *p_timer, uint32_t delay_ms, _TEST_STATE_t *pstate, _WIZ_TIMER_t type)
Definition: wizard_ui.c:58
selftest_fans_axis_screen_t::text_checking_axis
window_text_t text_checking_axis
Definition: selftest_fans_axis.h:23
phasesZ
static const selftest_phase phasesZ[]
Definition: selftest_fans_axis.c:311
_marlin_vars_t::pos
float pos[4]
Definition: marlin_vars.h:82
ph_wait_autohome
static int ph_wait_autohome(selftest_fans_axis_data_t *p_data, uint8_t *state, int axis, int fr, int min, int max, int dir, char achar, float pos)
Definition: selftest_fans_axis.c:261
ph_measure_min
static int ph_measure_min(selftest_fans_axis_data_t *p_data, uint8_t *state, int axis, int fr, int min, int max, int dir, char achar, float pos)
Definition: selftest_fans_axis.c:179
_SELFTEST_FAN0_MIN
#define _SELFTEST_FAN0_MIN
Definition: wizard_config.h:11
ph_measure_max
static int ph_measure_max(selftest_fans_axis_data_t *p_data, uint8_t *state, int axis, int fr, int min, int max, int dir, char achar, float pos)
Definition: selftest_fans_axis.c:198
_window_progress_t::win
window_t win
Definition: window_progress.h:16
Tacho_FAN0
uint32_t Tacho_FAN0
Definition: main.c:152
wizard_update_test_icon
void wizard_update_test_icon(int16_t win_id, uint8_t state)
Definition: wizard_ui.c:24
marlin_gcode_printf
int marlin_gcode_printf(const char *format,...)
Definition: marlin_client.c:206
ph_restore_Xaxis
static int ph_restore_Xaxis(selftest_fans_axis_data_t *p_data, uint8_t *state, int axis, int fr, int min, int max, int dir, char achar, float pos)
Definition: selftest_fans_axis.c:240
_WIZ_TIMER
Definition: wizard_ui.h:19
phasesY
static const selftest_phase phasesY[]
Definition: selftest_fans_axis.c:289
_TEST_PASSED
Definition: wizard_types.h:87
marlin_event_clr
int marlin_event_clr(uint8_t evt_id)
Definition: marlin_client.c:252
ph_home_all_axis
static int ph_home_all_axis(selftest_fans_axis_data_t *p_data, uint8_t *state, int axis, int fr, int min, int max, int dir, char achar, float pos)
Definition: selftest_fans_axis.c:232
_SELFTEST_FAN0_TIME
#define _SELFTEST_FAN0_TIME
Definition: wizard_config.h:10
wizard_init_screen_selftest_fans_axis
void wizard_init_screen_selftest_fans_axis(int16_t id_body, selftest_fans_axis_screen_t *p_screen, selftest_fans_axis_data_t *p_data)
Definition: selftest_fans_axis.c:14
_cl_st_ax::p_phases
const selftest_phase * p_phases
Definition: selftest_fans_axis.c:134
ph_move_to_max
static int ph_move_to_max(selftest_fans_axis_data_t *p_data, uint8_t *state, int axis, int fr, int min, int max, int dir, char achar, float pos)
Definition: selftest_fans_axis.c:153