Prusa MINI Firmware overview
|
Go to the documentation of this file.
8 #define MARLIN_VAR_MOTION 0x00 // R: uint8, method stepper.axis_is_moving
9 #define MARLIN_VAR_GQUEUE 0x01 // R: uint8, method queue.length
10 #define MARLIN_VAR_PQUEUE 0x02 // R: uint8, variables planner.block_buffer_head/tail
11 #define MARLIN_VAR_IPOS_X 0x03 // RW: int32, variable stepper.count_position
12 #define MARLIN_VAR_IPOS_Y 0x04 // RW: ==||==
13 #define MARLIN_VAR_IPOS_Z 0x05 // RW: ==||==
14 #define MARLIN_VAR_IPOS_E 0x06 // RW: ==||==
15 #define MARLIN_VAR_POS_X 0x07 // RW: float, planner.getAxisPosition_mm(), setAxisPosition_mm()
16 #define MARLIN_VAR_POS_Y 0x08 // RW: ==||==
17 #define MARLIN_VAR_POS_Z 0x09 // RW: ==||==
18 #define MARLIN_VAR_POS_E 0x0a // RW: ==||==
19 #define MARLIN_VAR_TEMP_NOZ 0x0b // R: float, thermalManager.temp_hotend[0].current
20 #define MARLIN_VAR_TEMP_BED 0x0c // R: float, thermalManager.temp_bed.current
21 #define MARLIN_VAR_TTEM_NOZ 0x0d // RW: float, thermalManager.temp_hotend[0].target, thermalManager.setTargetHotend()
22 #define MARLIN_VAR_TTEM_BED 0x0e // RW: float, thermalManager.temp_bed.target, thermalManager.setTargetBed()
23 #define MARLIN_VAR_Z_OFFSET 0x0f // R: float, zprobe_zoffset
24 #define MARLIN_VAR_FANSPEED 0x10 // RW: uint8, thermalManager.fan_speed[0], thermalManager.set_fan_speed()
25 #define MARLIN_VAR_PRNSPEED 0x11 // RW: uint16, feedrate_percentage
26 #define MARLIN_VAR_FLOWFACT 0x12 // RW: uint16, planner.flow_percentage
27 #define MARLIN_VAR_WAITHEAT 0x13 // RW: uint8, Marlin, wait_for_heatup
28 #define MARLIN_VAR_WAITUSER 0x14 // RW: uint8, Marlin, wait_for_user
29 #define MARLIN_VAR_SD_PRINT 0x15 // R: uint8, card.flag.sdprinting
30 #define MARLIN_VAR_SD_PDONE 0x16 // R: uint8, card.percentDone()
31 #define MARLIN_VAR_DURATION 0x17 // R: uint32, print_job_timer.duration()
32 #define MARLIN_VAR_MAX MARLIN_VAR_DURATION
35 #define MARLIN_VAR_MSK(v_id) ((uint64_t)1 << (v_id))
37 #define MARLIN_VAR_MSK_IPOS_XYZE ( \
38 MARLIN_VAR_MSK(MARLIN_VAR_IPOS_X) | MARLIN_VAR_MSK(MARLIN_VAR_IPOS_Y) | MARLIN_VAR_MSK(MARLIN_VAR_IPOS_Z) | MARLIN_VAR_MSK(MARLIN_VAR_IPOS_E))
40 #define MARLIN_VAR_MSK_POS_XYZE ( \
41 MARLIN_VAR_MSK(MARLIN_VAR_POS_X) | MARLIN_VAR_MSK(MARLIN_VAR_POS_Y) | MARLIN_VAR_MSK(MARLIN_VAR_POS_Z) | MARLIN_VAR_MSK(MARLIN_VAR_POS_E))
43 #define MARLIN_VAR_MSK_TEMP_CURR ( \
44 MARLIN_VAR_MSK(MARLIN_VAR_TEMP_NOZ) | MARLIN_VAR_MSK(MARLIN_VAR_TEMP_BED))
46 #define MARLIN_VAR_MSK_TEMP_TARG ( \
47 MARLIN_VAR_MSK(MARLIN_VAR_TTEM_NOZ) | MARLIN_VAR_MSK(MARLIN_VAR_TTEM_BED))
49 #define MARLIN_VAR_MSK_TEMP_ALL ( \
50 MARLIN_VAR_MSK(MARLIN_VAR_TEMP_NOZ) | MARLIN_VAR_MSK(MARLIN_VAR_TEMP_BED) | MARLIN_VAR_MSK(MARLIN_VAR_TTEM_NOZ) | MARLIN_VAR_MSK(MARLIN_VAR_TTEM_BED))
52 #define MARLIN_VAR_MSK_DEF ( \
53 MARLIN_VAR_MSK(MARLIN_VAR_MOTION) | MARLIN_VAR_MSK(MARLIN_VAR_GQUEUE) | MARLIN_VAR_MSK_POS_XYZE | MARLIN_VAR_MSK_TEMP_ALL | MARLIN_VAR_MSK(MARLIN_VAR_SD_PRINT) | MARLIN_VAR_MSK(MARLIN_VAR_SD_PDONE) | MARLIN_VAR_MSK(MARLIN_VAR_DURATION))
55 #define MARLIN_VAR_MSK_ALL ( \
56 MARLIN_VAR_MSK(MARLIN_VAR_MOTION) | MARLIN_VAR_MSK(MARLIN_VAR_GQUEUE) | MARLIN_VAR_MSK(MARLIN_VAR_PQUEUE) | MARLIN_VAR_MSK_IPOS_XYZE | MARLIN_VAR_MSK_POS_XYZE | MARLIN_VAR_MSK_TEMP_ALL | MARLIN_VAR_MSK(MARLIN_VAR_Z_OFFSET) | MARLIN_VAR_MSK(MARLIN_VAR_FANSPEED) | MARLIN_VAR_MSK(MARLIN_VAR_PRNSPEED) | MARLIN_VAR_MSK(MARLIN_VAR_FLOWFACT) | MARLIN_VAR_MSK(MARLIN_VAR_WAITHEAT) | MARLIN_VAR_MSK(MARLIN_VAR_WAITUSER) | MARLIN_VAR_MSK(MARLIN_VAR_SD_PRINT) | MARLIN_VAR_MSK(MARLIN_VAR_SD_PDONE) | MARLIN_VAR_MSK(MARLIN_VAR_DURATION))
59 #define MARLIN_USR8_VAR_FLG 0x80 // usr8 - variable flag (bit7 set)
60 #define MARLIN_USR8_MSK_ID 0x7f // usr8 - event/variable id mask
62 #define MARLINE_VAR_NAME_MAX 16 //var_name max length
64 #define MARLIN_VAR_INDEX_X 0
65 #define MARLIN_VAR_INDEX_Y 1
66 #define MARLIN_VAR_INDEX_Z 2
67 #define MARLIN_VAR_INDEX_E 3
68 #define MARLIN_VAR_MOTION_MSK_X (1 << MARLIN_VAR_INDEX_X)
69 #define MARLIN_VAR_MOTION_MSK_Y (1 << MARLIN_VAR_INDEX_Y)
70 #define MARLIN_VAR_MOTION_MSK_Z (1 << MARLIN_VAR_INDEX_Z)
71 #define MARLIN_VAR_MOTION_MSK_E (1 << MARLIN_VAR_INDEX_E)
158 #endif //_MARLIN_VARS_H
#define MARLIN_VAR_IPOS_E
Definition: marlin_vars.h:14
variant8_t variant8_ui8(uint8_t ui8)
Definition: variant8.c:18
const char * marlin_vars_get_name(uint8_t var_id)
Definition: marlin_vars.c:36
#define MARLIN_VAR_TEMP_BED
Definition: marlin_vars.h:20
uint8_t var_sd_printing
Definition: marlin_vars.h:123
uint8_t var_wait_heat
Definition: marlin_vars.h:121
variant8_t marlin_vars_get_var(marlin_vars_t *vars, uint8_t var_id)
Definition: marlin_vars.c:50
uint16_t ui16
Definition: variant8.h:34
#define MARLIN_VAR_FLOWFACT
Definition: marlin_vars.h:26
#define MARLIN_VAR_POS_X
Definition: marlin_vars.h:15
#define MARLIN_VAR_MOTION
Definition: marlin_vars.h:8
float z_offset
Definition: marlin_vars.h:87
#define MARLIN_VAR_IPOS_X
Definition: marlin_vars.h:11
#define MARLIN_VAR_SD_PDONE
Definition: marlin_vars.h:30
uint8_t var_motion
Definition: marlin_vars.h:102
uint8_t ui8
Definition: variant8.h:36
#define MARLIN_VAR_FANSPEED
Definition: marlin_vars.h:24
uint8_t var_ipos_x
Definition: marlin_vars.h:105
uint8_t var_z_offset
Definition: marlin_vars.h:117
void marlin_vars_value_to_str(marlin_vars_t *vars, uint8_t var_id, char *str)
Definition: marlin_vars.c:183
uint8_t i
Definition: screen_test_graph.c:72
uint8_t pqueue
Definition: marlin_vars.h:80
#define MARLIN_VAR_TTEM_BED
Definition: marlin_vars.h:22
uint8_t var_temp_bed
Definition: marlin_vars.h:114
uint8_t var_pos_x
Definition: marlin_vars.h:109
uint8_t var_wait_user
Definition: marlin_vars.h:122
variant8_t variant8_ui16(uint16_t ui16)
Definition: variant8.c:30
int marlin_vars_get_id_by_name(const char *var_name)
Definition: marlin_vars.c:42
#define MARLIN_VAR_WAITUSER
Definition: marlin_vars.h:28
void marlin_vars_set_var(marlin_vars_t *vars, uint8_t var_id, variant8_t var)
Definition: marlin_vars.c:105
float temp_nozzle
Definition: marlin_vars.h:83
uint8_t var_flow_factor
Definition: marlin_vars.h:120
Definition: variant8.h:24
#define MARLIN_VAR_IPOS_Y
Definition: marlin_vars.h:12
float flt
Definition: variant8.h:31
int marlin_vars_str_to_value(marlin_vars_t *vars, uint8_t var_id, const char *str)
Definition: marlin_vars.c:251
void marlin_vars_value_to_str(marlin_vars_t *vars, uint8_t var_id, char *str)
Definition: marlin_vars.c:183
#define MARLIN_VAR_TEMP_NOZ
Definition: marlin_vars.h:19
uint8_t var_gqueue
Definition: marlin_vars.h:103
#define MARLIN_VAR_PQUEUE
Definition: marlin_vars.h:10
#define MARLIN_VAR_GQUEUE
Definition: marlin_vars.h:9
const char * __var_name[]
Definition: marlin_vars.c:8
uint8_t wait_heat
Definition: marlin_vars.h:91
float target_nozzle
Definition: marlin_vars.h:85
uint8_t var_print_speed
Definition: marlin_vars.h:119
#define MARLIN_VAR_WAITHEAT
Definition: marlin_vars.h:27
void marlin_vars_set_var(marlin_vars_t *vars, uint8_t var_id, variant8_t var)
Definition: marlin_vars.c:105
uint8_t var_target_bed
Definition: marlin_vars.h:116
uint8_t var_fan_speed
Definition: marlin_vars.h:118
union _marlin_changes_t marlin_changes_t
#define MARLIN_VAR_POS_Z
Definition: marlin_vars.h:17
#define MARLIN_VAR_POS_E
Definition: marlin_vars.h:18
uint8_t var_pos_e
Definition: marlin_vars.h:112
uint8_t wait_user
Definition: marlin_vars.h:92
float temp_bed
Definition: marlin_vars.h:84
variant8_t variant8_empty(void)
Definition: variant8.c:10
const uint8_t[]
Definition: 404_html.c:3
uint64_t var_reserved
Definition: marlin_vars.h:126
uint8_t var_temp_nozzle
Definition: marlin_vars.h:113
const char * marlin_vars_get_name(uint8_t var_id)
Definition: marlin_vars.c:36
#define MARLIN_VAR_PRNSPEED
Definition: marlin_vars.h:25
#define MARLIN_VAR_SD_PRINT
Definition: marlin_vars.h:29
uint16_t print_speed
Definition: marlin_vars.h:89
#define MARLIN_VAR_DURATION
Definition: marlin_vars.h:31
variant8_t variant8_ui32(uint32_t ui32)
Definition: variant8.c:42
variant8_t marlin_vars_get_var(marlin_vars_t *vars, uint8_t var_id)
Definition: marlin_vars.c:50
uint32_t print_duration
Definition: marlin_vars.h:95
uint8_t sd_percent_done
Definition: marlin_vars.h:94
uint16_t flow_factor
Definition: marlin_vars.h:90
uint8_t var_pqueue
Definition: marlin_vars.h:104
Definition: marlin_vars.h:77
uint8_t gqueue
Definition: marlin_vars.h:79
variant8_t variant8_i32(int32_t i32)
Definition: variant8.c:36
#define MARLIN_VAR_IPOS_Z
Definition: marlin_vars.h:13
#define MARLIN_VAR_POS_Y
Definition: marlin_vars.h:16
struct _marlin_vars_t marlin_vars_t
float pos[4]
Definition: marlin_vars.h:82
#define MARLIN_VAR_TTEM_NOZ
Definition: marlin_vars.h:21
uint8_t var_target_nozzle
Definition: marlin_vars.h:115
uint8_t var_pos_z
Definition: marlin_vars.h:111
Definition: marlin_vars.h:98
uint32_t ui32
Definition: variant8.h:32
uint8_t var_ipos_e
Definition: marlin_vars.h:108
uint8_t var_ipos_y
Definition: marlin_vars.h:106
int marlin_vars_str_to_value(marlin_vars_t *vars, uint8_t var_id, const char *str)
Definition: marlin_vars.c:251
uint8_t var_sd_percent_done
Definition: marlin_vars.h:124
variant8_t variant8_flt(float flt)
Definition: variant8.c:48
uint8_t var_pos_y
Definition: marlin_vars.h:110
uint8_t var_ipos_z
Definition: marlin_vars.h:107
uint8_t var_print_duration
Definition: marlin_vars.h:125
uint8_t sd_printing
Definition: marlin_vars.h:93
uint64_t var
Definition: marlin_vars.h:99
float target_bed
Definition: marlin_vars.h:86
int32_t ipos[4]
Definition: marlin_vars.h:81
#define MARLIN_VAR_MAX
Definition: marlin_vars.h:32
#define MARLIN_VAR_Z_OFFSET
Definition: marlin_vars.h:23
uint8_t motion
Definition: marlin_vars.h:78
uint8_t fan_speed
Definition: marlin_vars.h:88
int marlin_vars_get_id_by_name(const char *var_name)
Definition: marlin_vars.c:42
int32_t i32
Definition: variant8.h:33