Prusa MINI Firmware overview
|
#include "marlin_vars.h"
#include <stdio.h>
#include <string.h>
◆ marlin_vars_get_name()
◆ marlin_vars_get_id_by_name()
int marlin_vars_get_id_by_name |
( |
const char * |
var_name | ) |
|
◆ marlin_vars_get_var()
◆ marlin_vars_set_var()
◆ marlin_vars_value_to_str()
187 sprintf(str,
"%u", (
unsigned int)(vars->
motion));
190 sprintf(str,
"%u", (
unsigned int)(vars->
gqueue));
193 sprintf(str,
"%u", (
unsigned int)(vars->
pqueue));
211 sprintf(str,
"%.1f", (
double)(vars->
temp_bed));
217 sprintf(str,
"%.1f", (
double)(vars->
target_bed));
220 sprintf(str,
"%.4f", (
double)(vars->
z_offset));
223 sprintf(str,
"%u", (
unsigned int)(vars->
fan_speed));
226 sprintf(str,
"%u", (
unsigned int)(vars->
print_speed));
229 sprintf(str,
"%u", (
unsigned int)(vars->
flow_factor));
232 sprintf(str,
"%u", (
unsigned int)(vars->
wait_heat));
235 sprintf(str,
"%u", (
unsigned int)(vars->
wait_user));
238 sprintf(str,
"%u", (
unsigned int)(vars->
sd_printing));
◆ marlin_vars_str_to_value()
256 ret = sscanf(str,
"%hhu", &(vars->
motion));
259 ret = sscanf(str,
"%hhu", &(vars->
gqueue));
262 ret = sscanf(str,
"%hhu", &(vars->
pqueue));
280 ret = sscanf(str,
"%f", &(vars->
temp_bed));
289 ret = sscanf(str,
"%f", &(vars->
z_offset));
292 ret = sscanf(str,
"%hhu", &(vars->
fan_speed));
295 ret = sscanf(str,
"%hu", (
unsigned short *)&(vars->
print_speed));
298 ret = sscanf(str,
"%hu", (
unsigned short *)&(vars->
flow_factor));
301 ret = sscanf(str,
"%hhu", &(vars->
wait_heat));
304 ret = sscanf(str,
"%hhu", &(vars->
wait_user));
◆ __var_name
Initial value:= {
"MOTION",
"GQUEUE",
"PQUEUE",
"IPOS_X",
"IPOS_Y",
"IPOS_Z",
"IPOS_E",
"POS_X",
"POS_Y",
"POS_Z",
"POS_E",
"TEMP_NOZ",
"TEMP_BED",
"TTEM_NOZ",
"TTEM_BED",
"Z_OFFSET",
"FANSPEED",
"PRNSPEED",
"FLOWFACT",
"WAITHEAT",
"WAITUSER",
"SD_PRINT",
"SD_PDONE",
"DURATION",
"FSENSOR",
}
#define MARLIN_VAR_IPOS_E
Definition: marlin_vars.h:14
variant8_t variant8_ui8(uint8_t ui8)
Definition: variant8.c:18
#define MARLIN_VAR_TEMP_BED
Definition: marlin_vars.h:20
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 ui8
Definition: variant8.h:36
#define MARLIN_VAR_FANSPEED
Definition: marlin_vars.h:24
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
variant8_t variant8_ui16(uint16_t ui16)
Definition: variant8.c:30
#define MARLIN_VAR_WAITUSER
Definition: marlin_vars.h:28
float temp_nozzle
Definition: marlin_vars.h:83
#define MARLIN_VAR_IPOS_Y
Definition: marlin_vars.h:12
float flt
Definition: variant8.h:31
#define MARLIN_VAR_TEMP_NOZ
Definition: marlin_vars.h:19
#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
#define MARLIN_VAR_WAITHEAT
Definition: marlin_vars.h:27
#define MARLIN_VAR_POS_Z
Definition: marlin_vars.h:17
#define MARLIN_VAR_POS_E
Definition: marlin_vars.h:18
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
#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
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 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
float pos[4]
Definition: marlin_vars.h:82
#define MARLIN_VAR_TTEM_NOZ
Definition: marlin_vars.h:21
uint32_t ui32
Definition: variant8.h:32
variant8_t variant8_flt(float flt)
Definition: variant8.c:48
uint8_t sd_printing
Definition: marlin_vars.h:93
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
int32_t i32
Definition: variant8.h:33