Prusa MINI Firmware overview
|
#include "firstlay.h"
#include "dbg.h"
#include "config.h"
#include "stm32f4xx_hal.h"
#include "marlin_client.h"
#include "wizard_config.h"
#include "wizard_ui.h"
#include "wizard_types.h"
#include "wizard_progress_bar.h"
#include <stdio.h>
#include <string.h>
#include "guitypes.h"
#include "menu_vars.h"
#include "filament.h"
◆ V__GCODES_HEAD_BEGIN
#define V__GCODES_HEAD_BEGIN |
Value:"M107", \
"G90", \
"M83",
◆ V__GCODES_HEAD_END
#define V__GCODES_HEAD_END |
Value:"G28", \
"G29", \
"G21", \
"G90", \
"M83",
◆ _get_progress()
◆ _set_gcode_first_lines()
void _set_gcode_first_lines |
( |
| ) |
|
◆ _run_gcode_line()
int _run_gcode_line |
( |
uint32_t * |
p_line, |
|
|
const char * |
gcodes[], |
|
|
size_t |
gcodes_count |
|
) |
| |
455 size_t gcodes_in_this_run = 0;
460 if ((*p_line) < gcodes_count) {
461 ++gcodes_in_this_run;
◆ _wizard_firstlay_Z_step()
262 float _step_last = p_screen->
Z_offset;
◆ wizard_init_screen_firstlay()
97 p_screen->term.term = &(p_screen->terminal);
◆ wizard_firstlay_print()
162 switch (p_screen->
state) {
200 if (remaining_lines < 1) {
220 if (remaining_lines < 1) {
◆ wizard_firstlay_event_dn()
◆ wizard_firstlay_event_up()
◆ V2_gcodes_head_PLA
const char * V2_gcodes_head_PLA |
Initial value:= {
"M104 S215",
"M140 S60",
"M190 S60",
"M109 S215",
}
◆ V2_gcodes_head_PETG
const char * V2_gcodes_head_PETG |
Initial value:= {
"M104 S230",
"M140 S85",
"M190 S85",
"M109 S230",
}
◆ V2_gcodes_head_ASA
const char * V2_gcodes_head_ASA |
Initial value:= {
"M104 S260",
"M140 S100",
"M190 S100",
"M109 S260",
}
◆ V2_gcodes_head_FLEX
const char * V2_gcodes_head_FLEX |
Initial value:= {
"M104 S240",
"M140 S50",
"M190 S50",
"M109 S240",
}
◆ V2_gcodes_body
const char * V2_gcodes_body |
◆ V2_gcodes_head_PLA_sz
◆ V2_gcodes_head_PETG_sz
◆ V2_gcodes_head_ASA_sz
◆ V2_gcodes_head_FLEX_sz
◆ V2_gcodes_body_sz
◆ commands_in_queue_size
const size_t commands_in_queue_size = 8 |
◆ commands_in_queue_use_max
const size_t commands_in_queue_use_max = 6 |
◆ max_gcodes_in_one_run
const size_t max_gcodes_in_one_run = 20 |
◆ line_head
◆ line_body
◆ head_gcode
◆ body_gcode
◆ head_gcode_sz
size_t head_gcode_sz = -1 |
|
static |
◆ body_gcode_sz
size_t body_gcode_sz = -1 |
|
static |
◆ gcode_sz
◆ G28_pos
◆ G29_pos
◆ _wizard_firstlay_text
const char* _wizard_firstlay_text |
|
static |
Initial value:= "Once the printer \n"
"starts extruding \n"
"plastic, adjust \n"
"the nozzle height \n"
"by turning the knob\n"
"until the filament \n"
"sticks to the print\n"
"sheet."
_FL_STATE state
Definition: firstlay.h:32
window_text_t text_Z_pos
Definition: firstlay.h:45
static uint32_t line_head
Definition: firstlay.c:35
Definition: firstlay.h:25
const size_t V2_gcodes_head_PETG_sz
Definition: firstlay.c:25
window_numb_t spin_baby_step
Definition: firstlay.h:47
#define FIRSTLAY_SCREEN_TERM_Y
Definition: firstlay.h:29
void _set_gcode_first_lines()
Definition: firstlay.c:444
#define WINDOW_CLS_TERM
Definition: window.h:17
static size_t head_gcode_sz
Definition: firstlay.c:40
#define WINDOW_CLS_NUMB
Definition: window.h:11
const char * V2_gcodes_head_FLEX[]
Definition: firstlay.c:21
Definition: wizard_types.h:88
Definition: firstlay.h:24
const char * V2_gcodes_head_ASA[]
Definition: firstlay.c:20
void window_destroy_children(int16_t id)
Definition: window.c:157
Definition: firstlay.h:22
void window_set_format(int16_t id, const char *format)
Definition: window.c:403
color_t color_text
Definition: window_numb.h:20
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
uint16_t x
Definition: guitypes.h:65
#define WIZARD_MARGIN_LEFT
Definition: wizard_ui.h:8
#define IDR_FNT_NORMAL
Definition: resource.h:10
static const char ** head_gcode
Definition: firstlay.c:38
void marlin_do_babysteps_Z(float offs)
Definition: marlin_client.c:433
Definition: filament.h:28
_TEST_STATE_t state_print
Definition: firstlay.h:67
void _wizard_firstlay_Z_step(firstlay_screen_t *p_screen)
Definition: firstlay.c:257
#define FIRSTLAY_SCREEN_TERM_X
Definition: firstlay.h:28
window_progress_t progress
Definition: firstlay.h:33
void window_show(int16_t id)
Definition: window.c:529
static const char * _wizard_firstlay_text
Definition: firstlay.c:52
Definition: filament.h:27
int marlin_error_clr(uint8_t err_id)
Definition: marlin_client.c:324
Definition: guitypes.h:64
int16_t id
Definition: window.h:79
const size_t V2_gcodes_head_FLEX_sz
Definition: firstlay.c:27
#define COLOR_GRAY
Definition: guitypes.h:50
#define MARLIN_ERR_ProbingFailed
Definition: marlin_errors.h:9
static const char ** body_gcode
Definition: firstlay.c:39
#define WIZARD_X_SPACE
Definition: wizard_ui.h:10
void window_set_text(int16_t id, const char *text)
Definition: window.c:340
#define COLOR_ORANGE
Definition: guitypes.h:57
uint8_t marlin_get_gqueue(void)
Definition: marlin_client.c:381
float Z_offset_request
Definition: firstlay.h:50
#define WINDOW_CLS_PROGRESS
Definition: window.h:20
uint16_t y
Definition: guitypes.h:66
const char * V2_gcodes_head_PETG[]
Definition: firstlay.c:19
#define V__GCODES_HEAD_END
Definition: firstlay.c:288
#define MSGBOX_BTN_RETRYCANCEL
Definition: window_msgbox.h:25
Definition: wizard_types.h:86
static size_t gcode_sz
Definition: firstlay.c:42
static size_t G28_pos
Definition: firstlay.c:43
void window_set_value(int16_t id, float value)
Definition: window.c:363
FILAMENT_t get_filament()
Definition: filament.cpp:41
const char * V2_gcodes_body[]
Definition: firstlay.c:22
static size_t body_gcode_sz
Definition: firstlay.c:41
Definition: filament.h:30
static size_t G29_pos
Definition: firstlay.c:44
void marlin_gcode(const char *gcode)
Definition: marlin_client.c:195
int _run_gcode_line(uint32_t *p_line, const char *gcodes[], size_t gcodes_count)
Definition: firstlay.c:450
float Z_offset
Definition: firstlay.h:49
#define WINDOW_CLS_TEXT
Definition: window.h:10
window_text_t text_state
Definition: firstlay.h:35
Definition: wizard_types.h:85
font_t * resource_font(uint16_t id)
Definition: guitypes.c:186
#define MSGBOX_RES_RETRY
Definition: window_msgbox.h:42
void term_init(term_t *pt, uint8_t cols, uint8_t rows, uint8_t *buff)
Definition: term.c:6
window_text_t text_direction_arrow
Definition: firstlay.h:46
const size_t V2_gcodes_body_sz
Definition: firstlay.c:28
int16_t window_create_ptr(int16_t cls_id, int16_t id_parent, rect_ui16_t rect, void *ptr)
Definition: window.c:102
#define IDR_FNT_SMALL
Definition: resource.h:9
#define V__GCODES_HEAD_BEGIN
Definition: firstlay.c:283
static uint32_t line_body
Definition: firstlay.c:36
const char * V2_gcodes_head_PLA[]
Definition: firstlay.c:18
font_t * font
Definition: window_text.h:19
int wizard_msgbox(const char *text, uint16_t flags, uint16_t id_icon)
Definition: wizard_ui.c:42
int marlin_error(uint8_t err_id)
Definition: marlin_client.c:304
const size_t V2_gcodes_head_PLA_sz
Definition: firstlay.c:24
const size_t V2_gcodes_head_ASA_sz
Definition: firstlay.c:26
int _get_progress()
Definition: firstlay.c:435
Definition: firstlay.h:23
point_ui16_t font_meas_text(font_t *pf, const char *str)
Definition: guitypes.c:97
void wizard_init_screen_firstlay(int16_t id_body, firstlay_screen_t *p_screen, firstlay_data_t *p_data)
Definition: firstlay.c:67
window_t win
Definition: window_progress.h:16
window_t win
Definition: window_numb.h:18
window_t win
Definition: window_text.h:16
Definition: wizard_types.h:87
int term_printf(term_t *pt, const char *fmt,...)
Definition: term.c:178
Definition: filament.h:29