Prusa MINI Firmware overview
marlin_server.h
Go to the documentation of this file.
1 // marlin_server.h
2 #ifndef _MARLIN_SERVER_H
3 #define _MARLIN_SERVER_H
4 
5 #include "marlin_events.h"
6 #include "marlin_vars.h"
7 #include "marlin_errors.h"
8 #include "marlin_host.h"
9 
10 // server flags
11 #define MARLIN_SFLG_STARTED 0x0001 // server started (set in marlin_server_init)
12 #define MARLIN_SFLG_PROCESS 0x0002 // loop processing in main thread is enabled
13 #define MARLIN_SFLG_BUSY 0x0004 // loop is busy
14 #define MARLIN_SFLG_PENDREQ 0x0008 // pending request
15 
16 // server variable update interval [ms]
17 #define MARLIN_UPDATE_PERIOD 100
18 #define MSG_STACK_SIZE 8 //status message stack size
19 #define MSG_MAX_LENGTH 21 //status message max length
20 
22 
23 #pragma pack(push)
24 #pragma pack(1)
25 
26 typedef struct msg_stack {
27 
30 
31 } msg_stack_t;
32 
33 #pragma pack(pop)
34 
35 #ifdef __cplusplus
36 extern "C" {
37 #endif //__cplusplus
38 
39 extern msg_stack_t msg_stack;
40 
41 // callback for idle operation inside marlin (called from ExtUI handler onIdle)
43 
44 //-----------------------------------------------------------------------------
45 // server side functions (can be called from server thread only)
46 
47 // initialize server side - must be called at beginning in server thread
48 extern void marlin_server_init(void);
49 
50 // server loop - must be called periodically in server thread
51 extern int marlin_server_loop(void);
52 
53 // returns enabled status of loop processing
54 extern int marlin_server_processing(void);
55 
56 // direct start loop processing
57 extern void marlin_server_start_processing(void);
58 
59 // direct stop loop processing + disable heaters and safe state
60 extern void marlin_server_stop_processing(void);
61 
62 // update variables at server side, defined by 'update' mask and send notification to all clients
63 extern void marlin_server_update(uint64_t update);
64 
65 // direct call of babystep.add_steps(Z_AXIS, ...)
66 extern void marlin_server_do_babystep_Z(float offs);
67 
68 // direct call of 'enqueue_and_echo_command', returns 1 if command enqueued, otherwise 0
69 extern int marlin_server_enqueue_gcode(const char *gcode);
70 
71 // direct call of 'inject_P', returns 1 if command enqueued, otherwise 0
72 extern int marlin_server_inject_gcode(const char *gcode);
73 
74 // direct call of settings.save()
75 extern void marlin_server_settings_save(void);
76 
77 // direct call of settings.load()
78 extern void marlin_server_settings_load(void);
79 
80 // direct call of thermalManager.manage_heater()
81 extern void marlin_server_manage_heater(void);
82 
83 // direct call of planner.quick_stop()
84 extern void marlin_server_quick_stop(void);
85 
86 //
87 extern void marlin_server_print_abort(void);
88 
89 //
90 extern void marlin_server_print_pause(void);
91 
92 //
93 extern void marlin_server_print_resume(void);
94 
95 //
96 extern void marlin_server_park_head(void);
97 
98 //
99 extern int marlin_all_axes_homed(void);
100 
101 //
102 extern int marlin_all_axes_known(void);
103 
104 #ifdef __cplusplus
105 }
106 #endif //__cplusplus
107 
108 #endif //_MARLIN_SERVER_H
XYZval::z
T z
Definition: types.h:286
MARLIN_MAX_CLIENTS
#define MARLIN_MAX_CLIENTS
Definition: config.h:96
GET_TEXT
#define GET_TEXT(MSG)
Definition: multi_language.h:72
marlin_client_task
osThreadId marlin_client_task[MARLIN_MAX_CLIENTS]
Definition: marlin_client.c:59
lcdsim.h
HOST_PROMPT_Paused
Definition: marlin_host.h:19
MARLIN_VAR_MSK_DEF
#define MARLIN_VAR_MSK_DEF
Definition: marlin_vars.h:52
_marlin_server_t::mesh
marlin_mesh_t mesh
Definition: marlin_server.cpp:71
marlin_server.h
_server_update_pqueue
void _server_update_pqueue(void)
Definition: marlin_server.cpp:527
_server_update_vars
uint64_t _server_update_vars(uint64_t force_update_msk)
Definition: marlin_server.cpp:537
MARLIN_EVT_Startup
#define MARLIN_EVT_Startup
Definition: marlin_events.h:8
host_action_prompt_end
void host_action_prompt_end()
Definition: marlin_server.cpp:1047
ExtUI::onPlayTone
void onPlayTone(const uint16_t frequency, const uint16_t duration)
Definition: marlin_server.cpp:874
MARLIN_EVT_SafetyTimerExpired
#define MARLIN_EVT_SafetyTimerExpired
Definition: marlin_events.h:35
osMessageAvailableSpace
uint32_t osMessageAvailableSpace(osMessageQId queue_id)
Get the available space in a message queue.
Definition: cmsis_os.c:1658
host_action
void host_action(const char *const pstr, const bool eol)
Definition: marlin_server.cpp:959
msg_stack
Definition: marlin_server.h:26
MARLIN_VAR_TEMP_BED
#define MARLIN_VAR_TEMP_BED
Definition: marlin_vars.h:20
_marlin_server_t::notify_changes
uint64_t notify_changes
Definition: marlin_server.cpp:57
_add_status_msg
void _add_status_msg(const char *const popup_msg)
Definition: marlin_server.cpp:101
_server_set_var
int _server_set_var(char *name_val_str)
Definition: marlin_server.cpp:765
host_prompt_button_clicked
host_prompt_button_t host_prompt_button_clicked
Definition: marlin_server.cpp:128
host_response_handler
void host_response_handler(const uint8_t response)
Definition: marlin_server.cpp:1029
_send_notify_changes_to_client
uint64_t _send_notify_changes_to_client(int client_id, osMessageQId queue, uint64_t var_msk)
Definition: marlin_server.cpp:504
probe_offset
constexpr xyz_pos_t probe_offset
Definition: probe.h:58
osThreadId
TaskHandle_t osThreadId
Definition: cmsis_os.h:283
Stepper::axis_is_moving
static FORCE_INLINE bool axis_is_moving(const AxisEnum axis)
Definition: stepper.h:381
MARLIN_EVT_MediaError
#define MARLIN_EVT_MediaError
Definition: marlin_events.h:12
osSemaphore
#define osSemaphore(name)
Definition: cmsis_os.h:709
host_action_resumed
void host_action_resumed()
Definition: marlin_server.cpp:1025
queue
GCodeQueue queue
Definition: queue.cpp:28
settings
MarlinSettings settings
Definition: configuration_store.cpp:344
marlin_vars_get_var
variant8_t marlin_vars_get_var(marlin_vars_t *vars, uint8_t var_id)
Definition: marlin_vars.c:50
X_AXIS
Definition: types.h:37
MARLIN_EVT_LoadSettings
#define MARLIN_EVT_LoadSettings
Definition: marlin_events.h:22
marlin_server_print_abort
void marlin_server_print_abort(void)
Definition: marlin_server.cpp:343
_marlin_server_t::client_events
uint64_t client_events[MARLIN_MAX_CLIENTS]
Definition: marlin_server.cpp:61
ExtUI::onMediaInserted
void onMediaInserted()
Definition: marlin_server.cpp:859
g29_auto.gcode
list gcode
Definition: g29_auto.py:44
_variant8_t::ui16
uint16_t ui16
Definition: variant8.h:34
MARLIN_VAR_FLOWFACT
#define MARLIN_VAR_FLOWFACT
Definition: marlin_vars.h:26
eeprom.h
marlin_server_stop_processing
void marlin_server_stop_processing(void)
Definition: marlin_server.cpp:293
MARLIN_VAR_POS_X
#define MARLIN_VAR_POS_X
Definition: marlin_vars.h:15
host_prompt_do
void host_prompt_do(const PromptReason type, const char *const pstr, const char *const pbtn)
Definition: marlin_server.cpp:1103
marlin_server_task
osThreadId marlin_server_task
Definition: marlin_server.cpp:88
host_prompt
char host_prompt[HOST_PROMPT_LEN_MAX]
Definition: marlin_server.cpp:125
MARLIN_VAR_MOTION
#define MARLIN_VAR_MOTION
Definition: marlin_vars.h:8
stepper
Stepper stepper
Definition: stepper.cpp:82
IWDG_HandleTypeDef
IWDG Handle Structure definition.
Definition: stm32f4xx_hal_iwdg.h:76
lcdsim_grab_text
uint16_t lcdsim_grab_text(char *text)
Definition: lcdsim.c:93
MARLIN_CMD_M
#define MARLIN_CMD_M
Definition: marlin_events.h:52
_marlin_vars_t::z_offset
float z_offset
Definition: marlin_vars.h:87
Planner::get_axis_position_mm
static float get_axis_position_mm(const AxisEnum axis)
Definition: planner.cpp:1526
MARLIN_VAR_IPOS_X
#define MARLIN_VAR_IPOS_X
Definition: marlin_vars.h:11
MARLIN_VAR_SD_PDONE
#define MARLIN_VAR_SD_PDONE
Definition: marlin_vars.h:30
print_job_timer
Stopwatch print_job_timer
Definition: printcounter.cpp:63
ExtUI::onIdle
void onIdle()
Definition: marlin_server.cpp:816
marlin_server_t
struct _marlin_server_t marlin_server_t
type
uint8_t type
Definition: UsbCore.h:184
marlin_server_enqueue_gcode
int marlin_server_enqueue_gcode(const char *gcode)
Definition: marlin_server.cpp:318
_variant8_t::ui8
uint8_t ui8
Definition: variant8.h:36
MARLIN_VAR_FANSPEED
#define MARLIN_VAR_FANSPEED
Definition: marlin_vars.h:24
HOST_PROMPT_FilamentRunout
Definition: marlin_host.h:20
marlin_all_axes_homed
int marlin_all_axes_homed(void)
Definition: marlin_server.cpp:373
bsod.h
_marlin_server_t::last_update
uint32_t last_update
Definition: marlin_server.cpp:64
PGM_P
#define PGM_P
Definition: pgmspace.h:30
_marlin_server_t::flags
uint16_t flags
Definition: marlin_server.cpp:55
MARLIN_SFLG_BUSY
#define MARLIN_SFLG_BUSY
Definition: marlin_server.h:13
marlin_server_enqueue_gcode
int marlin_server_enqueue_gcode(const char *gcode)
Definition: marlin_server.cpp:318
_marlin_server_t::pqueue_head
uint8_t pqueue_head
Definition: marlin_server.cpp:66
marlin_server_stop_processing
void marlin_server_stop_processing(void)
Definition: marlin_server.cpp:293
MARLIN_EVT_MSK_DEF
#define MARLIN_EVT_MSK_DEF
Definition: marlin_events.h:43
_marlin_mesh_t
Definition: marlin_events.h:102
babystep
Babystep babystep
i
uint8_t i
Definition: screen_test_graph.c:72
_marlin_vars_t::pqueue
uint8_t pqueue
Definition: marlin_vars.h:80
_variant8_t::type
uint8_t type
Definition: variant8.h:25
ExtUI::onUserConfirmRequired
void onUserConfirmRequired(const char *const msg)
Definition: marlin_server.cpp:899
marlin_host_prompt_button_by_text
host_prompt_button_t marlin_host_prompt_button_by_text(const char *text)
Definition: marlin_host.c:44
Planner::block_buffer_tail
static volatile uint8_t block_buffer_tail
Definition: planner.h:227
MARLIN_VAR_TTEM_BED
#define MARLIN_VAR_TTEM_BED
Definition: marlin_vars.h:22
marlin_server_queue
osMessageQId marlin_server_queue
Definition: marlin_server.cpp:89
_marlin_host_prompt_t::type
host_prompt_type_t type
Definition: marlin_host.h:47
AxisEnum
AxisEnum
Definition: types.h:36
marlin_server_do_babystep_Z
void marlin_server_do_babystep_Z(float offs)
Definition: marlin_server.cpp:313
marlin_server_settings_save
void marlin_server_settings_save(void)
Definition: marlin_server.cpp:327
msg_stack::count
uint8_t count
Definition: marlin_server.h:29
host_prompt_buttons
uint8_t host_prompt_buttons
Definition: marlin_server.cpp:127
MARLIN_CMD_M600
#define MARLIN_CMD_M600
Definition: marlin_events.h:57
GCodeQueue::length
static uint8_t length
Definition: queue.h:51
marlin_all_axes_known
int marlin_all_axes_known(void)
Definition: marlin_server.cpp:377
Temperature::manage_heater
static void manage_heater() _O2
Definition: temperature.cpp:975
ExtUI::onPrintTimerPaused
void onPrintTimerPaused()
Definition: marlin_server.cpp:884
general_error
void general_error(const char *error, const char *module)
Marlin stopped.
Definition: bsod.c:174
Stopwatch::stop
static bool stop()
Stop the stopwatch.
Definition: stopwatch.cpp:36
_marlin_host_prompt_t
Definition: marlin_host.h:46
Planner::block_buffer_head
static volatile uint8_t block_buffer_head
Definition: planner.h:227
dbg.h
_marlin_mesh_t::xc
uint8_t xc
Definition: marlin_events.h:104
marlin_server_idle
int marlin_server_idle(void)
Definition: marlin_server.cpp:254
HOST_PROMPT_BTN_PurgeMore
Definition: marlin_host.h:28
MARLIN_EVT_MediaInserted
#define MARLIN_EVT_MediaInserted
Definition: marlin_events.h:11
MARLIN_EVT_PrintTimerStopped
#define MARLIN_EVT_PrintTimerStopped
Definition: marlin_events.h:17
osThreadGetId
osThreadId osThreadGetId(void)
Return the thread ID of the current running thread.
Definition: cmsis_os.c:283
_variant8_t::usr16
uint16_t usr16
Definition: variant8.h:27
marlin_server_inject_gcode
int marlin_server_inject_gcode(const char *gcode)
Definition: marlin_server.cpp:322
NULL
#define NULL
Definition: usbd_def.h:53
MARLIN_SFLG_PENDREQ
#define MARLIN_SFLG_PENDREQ
Definition: marlin_server.h:14
marlin_server_park_head
void marlin_server_park_head(void)
Definition: marlin_server.cpp:365
MarlinSettings::save
static bool save()
Definition: configuration_store.cpp:2198
host_action_safety_timer_expired
void host_action_safety_timer_expired()
Definition: marlin_server.cpp:1004
ExtUI::onStartup
void onStartup()
Definition: marlin_server.cpp:811
wait_for_user
bool wait_for_user
Definition: Marlin.cpp:188
_marlin_server_t::client_changes
uint64_t client_changes[MARLIN_MAX_CLIENTS]
Definition: marlin_server.cpp:62
variant8_user
variant8_t variant8_user(uint32_t usr32)
Definition: variant8.c:54
ExtUI::onMediaError
void onMediaError()
Definition: marlin_server.cpp:864
osMessageQId
QueueHandle_t osMessageQId
Definition: cmsis_os.h:303
MARLIN_USR8_VAR_FLG
#define MARLIN_USR8_VAR_FLG
Definition: marlin_vars.h:59
osMessageGet
osEvent osMessageGet(osMessageQId queue_id, uint32_t millisec)
Get a Message or Wait for a Message from a Queue.
Definition: cmsis_os.c:1145
marlin_server
marlin_server_t marlin_server
Definition: marlin_server.cpp:92
marlin_host.h
msg_stack_t
struct msg_stack msg_stack_t
marlin_events.h
HAL_GetTick
uint32_t HAL_GetTick(void)
Provides a tick value in millisecond.
Definition: stm32f4xx_hal.c:339
osSemaphoreId
SemaphoreHandle_t osSemaphoreId
Definition: cmsis_os.h:295
all_axes_known
FORCE_INLINE bool all_axes_known()
Definition: motion.h:45
MARLIN_VAR_WAITUSER
#define MARLIN_VAR_WAITUSER
Definition: marlin_vars.h:28
MARLIN_ERR_ProbingFailed
#define MARLIN_ERR_ProbingFailed
Definition: marlin_errors.h:9
marlin_server_print_resume
void marlin_server_print_resume(void)
Definition: marlin_server.cpp:359
MARLIN_EVT_Reheat
#define MARLIN_EVT_Reheat
Definition: marlin_events.h:37
msg_stack::msg_data
char msg_data[MSG_STACK_SIZE][MSG_MAX_LENGTH]
Definition: marlin_server.h:28
osEvent
Definition: cmsis_os.h:395
_marlin_vars_t::temp_nozzle
float temp_nozzle
Definition: marlin_vars.h:83
_variant8_t
Definition: variant8.h:24
_marlin_server_t
Definition: marlin_server.cpp:54
host_prompt_button
char host_prompt_button[HOST_BUTTON_CNT_MAX][HOST_PROMPT_LEN_MAX]
Definition: marlin_server.cpp:126
marlin_server_settings_load
void marlin_server_settings_load(void)
Definition: marlin_server.cpp:331
_send_notify_event
void _send_notify_event(uint8_t evt_id, uint32_t usr32, uint16_t usr16)
Definition: marlin_server.cpp:481
osSemaphoreCreate
osSemaphoreId osSemaphoreCreate(const osSemaphoreDef_t *semaphore_def, int32_t count)
Create and Initialize a Semaphore object used for managing resources.
Definition: cmsis_os.c:755
marlin_server_sema
osSemaphoreId marlin_server_sema
Definition: marlin_server.cpp:90
HAL_IWDG_Refresh
HAL_StatusTypeDef HAL_IWDG_Refresh(IWDG_HandleTypeDef *hiwdg)
osSemaphoreDef
#define osSemaphoreDef(name)
Definition: cmsis_os.h:700
feedrate_percentage
int16_t feedrate_percentage
Definition: motion.cpp:139
ExtUI::onPrinterKilled
void onPrinterKilled(PGM_P const msg, PGM_P const component)
Definition: marlin_server.cpp:849
HOST_PROMPT_BTN_None
Definition: marlin_host.h:26
_marlin_server_t::notify_events
uint64_t notify_events
Definition: marlin_server.cpp:56
ExtUI::onPrintTimerStarted
void onPrintTimerStarted()
Definition: marlin_server.cpp:879
DBG_REQ
#define DBG_REQ(...)
Definition: marlin_server.cpp:41
ExtUI::onConfigurationStoreWritten
void onConfigurationStoreWritten(bool success)
Definition: marlin_server.cpp:937
marlin_server_print_abort
void marlin_server_print_abort(void)
Definition: marlin_server.cpp:343
MARLIN_EVT_StoreSettings
#define MARLIN_EVT_StoreSettings
Definition: marlin_events.h:23
_variant8_t::flt
float flt
Definition: variant8.h:31
MARLIN_VAR_TEMP_NOZ
#define MARLIN_VAR_TEMP_NOZ
Definition: marlin_vars.h:19
BLOCK_BUFFER_SIZE
#define BLOCK_BUFFER_SIZE
Definition: Configuration_A3ides_2209_MINI_adv.h:1167
marlin_client_queue
osMessageQId marlin_client_queue[MARLIN_MAX_CLIENTS]
Definition: marlin_client.c:60
host_action_cancel
void host_action_cancel()
Definition: marlin_server.cpp:1017
MARLIN_EVT_CommandEnd
#define MARLIN_EVT_CommandEnd
Definition: marlin_events.h:34
DBG_XUI
#define DBG_XUI
Definition: marlin_server.cpp:37
MARLIN_MAX_REQUEST
#define MARLIN_MAX_REQUEST
Definition: config.h:97
MARLIN_VAR_MSK_IPOS_XYZE
#define MARLIN_VAR_MSK_IPOS_XYZE
Definition: marlin_vars.h:37
_marlin_server_t::pqueue
uint8_t pqueue
Definition: marlin_server.cpp:68
MARLIN_VAR_PQUEUE
#define MARLIN_VAR_PQUEUE
Definition: marlin_vars.h:10
_marlin_server_t::request
char request[MARLIN_MAX_REQUEST]
Definition: marlin_server.cpp:59
MARLIN_EVT_PrintTimerPaused
#define MARLIN_EVT_PrintTimerPaused
Definition: marlin_events.h:16
MARLIN_EVT_StopProcessing
#define MARLIN_EVT_StopProcessing
Definition: marlin_events.h:29
marlin_server_processing
int marlin_server_processing(void)
Definition: marlin_server.cpp:284
MARLIN_EVT_CommandBegin
#define MARLIN_EVT_CommandBegin
Definition: marlin_events.h:33
planner_settings_t::axis_steps_per_mm
float axis_steps_per_mm[XYZE_N]
Definition: planner.h:181
MARLIN_VAR_GQUEUE
#define MARLIN_VAR_GQUEUE
Definition: marlin_vars.h:9
osMessagePut
osStatus osMessagePut(osMessageQId queue_id, uint32_t info, uint32_t millisec)
Put a Message to a Queue.
Definition: cmsis_os.c:1113
Stopwatch::duration
static millis_t duration()
Get the running time.
Definition: stopwatch.cpp:108
ExtUI::onMeshUpdate
void onMeshUpdate(const uint8_t xpos, const uint8_t ypos, const float zval)
Definition: marlin_server.cpp:945
void
void
Definition: png.h:1083
marlin_server_idle_t
void() marlin_server_idle_t(void)
Definition: marlin_server.h:21
ExtUI::onStoreSettings
void onStoreSettings(char *)
Definition: marlin_server.cpp:932
ExtUI
Definition: fake_uiapi.cpp:9
osEventMessage
function completed; message event occurred.
Definition: cmsis_os.h:237
MARLIN_EVT_Message
#define MARLIN_EVT_Message
Definition: marlin_events.h:36
_marlin_vars_t::wait_heat
uint8_t wait_heat
Definition: marlin_vars.h:91
ExtUI::onLoadSettings
void onLoadSettings(char const *)
Definition: marlin_server.cpp:927
_marlin_vars_t::target_nozzle
float target_nozzle
Definition: marlin_vars.h:85
marlin_server_park_head
void marlin_server_park_head(void)
Definition: marlin_server.cpp:365
marlin_server_inject_gcode
int marlin_server_inject_gcode(const char *gcode)
Definition: marlin_server.cpp:322
HOST_PROMPT_LoadFilament
Definition: marlin_host.h:21
MARLIN_VAR_WAITHEAT
#define MARLIN_VAR_WAITHEAT
Definition: marlin_vars.h:27
_process_server_request
int _process_server_request(char *request)
Definition: marlin_server.cpp:702
marlin_server_vars
marlin_vars_t * marlin_server_vars(void)
Definition: marlin_server.cpp:299
_send_notify_event_to_client
int _send_notify_event_to_client(int client_id, osMessageQId queue, uint8_t evt_id, uint32_t usr32, uint16_t usr16)
Definition: marlin_server.cpp:397
marlin_server_start_processing
void marlin_server_start_processing(void)
Definition: marlin_server.cpp:288
Stopwatch::pause
static bool pause()
Pause the stopwatch.
Definition: stopwatch.cpp:52
osWaitForever
#define osWaitForever
wait forever timeout value
Definition: cmsis_os.h:230
if
if(size<=((png_alloc_size_t) -1) - ob)
Definition: pngwrite.c:2176
marlin_server_settings_save
void marlin_server_settings_save(void)
Definition: marlin_server.cpp:327
ExtUI::onFactoryReset
void onFactoryReset()
Definition: marlin_server.cpp:922
_send_notify_events_to_client
uint64_t _send_notify_events_to_client(int client_id, osMessageQId queue, uint64_t evt_msk)
Definition: marlin_server.cpp:407
_marlin_server_t::vars
marlin_vars_t vars
Definition: marlin_server.cpp:58
marlin_all_axes_known
int marlin_all_axes_known(void)
Definition: marlin_server.cpp:377
host_prompt_button_t
host_prompt_button_t
Definition: marlin_host.h:25
_marlin_vars_t::wait_user
uint8_t wait_user
Definition: marlin_vars.h:92
MARLIN_EVT_MeshUpdate
#define MARLIN_EVT_MeshUpdate
Definition: marlin_events.h:24
GCodeQueue::enqueue_one
static bool enqueue_one(const char *cmd)
Definition: queue.cpp:157
_marlin_vars_t::temp_bed
float temp_bed
Definition: marlin_vars.h:84
marlin_vars.h
HOST_PROMPT_LEN_MAX
#define HOST_PROMPT_LEN_MAX
Definition: marlin_server.cpp:47
uint8_t
const uint8_t[]
Definition: 404_html.c:3
marlin_server_manage_heater
void marlin_server_manage_heater(void)
Definition: marlin_server.cpp:335
marlin_all_axes_homed
int marlin_all_axes_homed(void)
Definition: marlin_server.cpp:373
_marlin_mesh_t::z
float z[MARLIN_MAX_MESH_POINTS]
Definition: marlin_events.h:103
MARLIN_VAR_MSK
#define MARLIN_VAR_MSK(v_id)
Definition: marlin_vars.h:35
_marlin_server_t::idle_cnt
uint8_t idle_cnt
Definition: marlin_server.cpp:65
Babystep::task
static void task()
VARIANT8_EMPTY
#define VARIANT8_EMPTY
Definition: variant8.h:8
MARLIN_VAR_PRNSPEED
#define MARLIN_VAR_PRNSPEED
Definition: marlin_vars.h:25
MARLIN_EVT_HostPrompt
#define MARLIN_EVT_HostPrompt
Definition: marlin_events.h:26
host_action_kill
void host_action_kill()
Definition: marlin_server.cpp:996
marlin_server_init
void marlin_server_init(void)
Definition: marlin_server.cpp:154
_marlin_server_t::mesh_point_notsent
uint64_t mesh_point_notsent[MARLIN_MAX_CLIENTS]
Definition: marlin_server.cpp:72
MSG_MAX_LENGTH
#define MSG_MAX_LENGTH
Definition: marlin_server.h:19
MARLIN_EVT_FactoryReset
#define MARLIN_EVT_FactoryReset
Definition: marlin_events.h:21
marlin_server_loop
int marlin_server_loop(void)
Definition: marlin_server.cpp:239
MARLIN_VAR_SD_PRINT
#define MARLIN_VAR_SD_PRINT
Definition: marlin_vars.h:29
_marlin_server_t::request_len
int request_len
Definition: marlin_server.cpp:60
Y_AXIS
Definition: types.h:38
MARLIN_SFLG_STARTED
#define MARLIN_SFLG_STARTED
Definition: marlin_server.h:11
_marlin_vars_t::print_speed
uint16_t print_speed
Definition: marlin_vars.h:89
MARLIN_CMD_G
#define MARLIN_CMD_G
Definition: marlin_events.h:51
Planner::quick_stop
static void quick_stop()
Definition: planner.cpp:1475
marlin_server_do_babystep_Z
void marlin_server_do_babystep_Z(float offs)
Definition: marlin_server.cpp:313
MARLIN_VAR_DURATION
#define MARLIN_VAR_DURATION
Definition: marlin_vars.h:31
marlin_server_quick_stop
void marlin_server_quick_stop(void)
Definition: marlin_server.cpp:339
_marlin_server_t::client_events_notsent
variant8_t client_events_notsent[MARLIN_MAX_CLIENTS][4]
Definition: marlin_server.cpp:63
marlin_server_print_pause
void marlin_server_print_pause(void)
Definition: marlin_server.cpp:353
_marlin_mesh_t::yc
uint8_t yc
Definition: marlin_events.h:105
MARLIN_EVT_StatusChanged
#define MARLIN_EVT_StatusChanged
Definition: marlin_events.h:20
marlin_server_print_resume
void marlin_server_print_resume(void)
Definition: marlin_server.cpp:359
Z_AXIS
Definition: types.h:39
_marlin_vars_t::print_duration
uint32_t print_duration
Definition: marlin_vars.h:95
_marlin_vars_t::sd_percent_done
uint8_t sd_percent_done
Definition: marlin_vars.h:94
MARLIN_VAR_MSK_POS_XYZE
#define MARLIN_VAR_MSK_POS_XYZE
Definition: marlin_vars.h:40
_marlin_vars_t::flow_factor
uint16_t flow_factor
Definition: marlin_vars.h:90
host_action_prompt_button
void host_action_prompt_button(const char *const pstr)
Definition: marlin_server.cpp:1039
status
static status_t status
Definition: filament_sensor.c:37
ExtUI::onMediaRemoved
void onMediaRemoved()
Definition: marlin_server.cpp:869
app.h
MARLIN_UPDATE_PERIOD
#define MARLIN_UPDATE_PERIOD
Definition: marlin_server.h:17
marlin_server_update
void marlin_server_update(uint64_t update)
Definition: marlin_server.cpp:303
marlin_server_loop
int marlin_server_loop(void)
Definition: marlin_server.cpp:239
MARLIN_EVT_Ready
#define MARLIN_EVT_Ready
Definition: marlin_events.h:31
bsod
#define bsod(fmt,...)
Definition: bsod.h:20
HOST_BUTTON_CNT_MAX
#define HOST_BUTTON_CNT_MAX
Definition: marlin_server.cpp:49
_marlin_vars_t
Definition: marlin_vars.h:77
_marlin_vars_t::gqueue
uint8_t gqueue
Definition: marlin_vars.h:79
MARLIN_EVT_StartProcessing
#define MARLIN_EVT_StartProcessing
Definition: marlin_events.h:28
_marlin_server_t::pqueue_tail
uint8_t pqueue_tail
Definition: marlin_server.cpp:67
_server_update_gqueue
void _server_update_gqueue(void)
Definition: marlin_server.cpp:520
ExtUI::onConfigurationStoreRead
void onConfigurationStoreRead(bool success)
Definition: marlin_server.cpp:941
osMessageCreate
osMessageQId osMessageCreate(const osMessageQDef_t *queue_def, osThreadId thread_id)
Create and Initialize a Message Queue.
Definition: cmsis_os.c:1086
MSG_ERR_PROBING_FAILED
#define MSG_ERR_PROBING_FAILED
Definition: language.h:297
host_action_paused
void host_action_paused(const bool eol)
Definition: marlin_server.cpp:1021
marlin_server_idle_cb
marlin_server_idle_t * marlin_server_idle_cb
Definition: marlin_server.cpp:94
marlin_errors.h
osMessageQ
#define osMessageQ(name)
Access a Message Queue Definition.
Definition: cmsis_os.h:829
marlin_server_start_processing
void marlin_server_start_processing(void)
Definition: marlin_server.cpp:288
_variant8_t::usr8
uint8_t usr8
Definition: variant8.h:26
marlin_server_manage_heater
void marlin_server_manage_heater(void)
Definition: marlin_server.cpp:335
MarlinSettings::load
static FORCE_INLINE bool load()
Definition: configuration_store.h:79
marlin_server_idle_cb
marlin_server_idle_t * marlin_server_idle_cb
Definition: marlin_server.cpp:94
marlin_host_prompt_by_text
host_prompt_type_t marlin_host_prompt_by_text(const char *text)
Definition: marlin_host.c:29
MARLIN_CMD_NONE
#define MARLIN_CMD_NONE
Definition: marlin_events.h:50
MARLIN_EVT_PlayTone
#define MARLIN_EVT_PlayTone
Definition: marlin_events.h:14
marlin_server_init
void marlin_server_init(void)
Definition: marlin_server.cpp:154
ExtUI::onFilamentRunout
void onFilamentRunout(const extruder_t extruder)
Definition: marlin_server.cpp:894
host_action_pause
void host_action_pause(const bool eol)
Definition: marlin_server.cpp:1009
MARLIN_EVT_Error
#define MARLIN_EVT_Error
Definition: marlin_events.h:32
_marlin_vars_t::pos
float pos[4]
Definition: marlin_vars.h:82
hwio_a3ides.h
DBG_HOST
#define DBG_HOST
Definition: marlin_server.cpp:43
MARLIN_EVT_MediaRemoved
#define MARLIN_EVT_MediaRemoved
Definition: marlin_events.h:13
Stepper::position
static int32_t position(const AxisEnum axis)
Definition: stepper.cpp:2214
MARLIN_VAR_TTEM_NOZ
#define MARLIN_VAR_TTEM_NOZ
Definition: marlin_vars.h:21
hiwdg
IWDG_HandleTypeDef hiwdg
Definition: watchdog.h:24
osEvent::value
union osEvent::@54 value
event value
marlin_server_cycle
int marlin_server_cycle(void)
Definition: marlin_server.cpp:168
XYZval< float >
MSG_STACK_SIZE
#define MSG_STACK_SIZE
Definition: marlin_server.h:18
GCodeQueue::inject_P
static void inject_P(PGM_P const pgcode)
Definition: queue.cpp:206
_variant8_t::ui32
uint32_t ui32
Definition: variant8.h:32
MARLIN_CMD_M701
#define MARLIN_CMD_M701
Definition: marlin_events.h:58
E_AXIS
Definition: types.h:40
HOST_PROMPT_BTN_Continue
Definition: marlin_host.h:27
_marlin_server_t::gqueue
uint8_t gqueue
Definition: marlin_server.cpp:69
marlin_vars_str_to_value
int marlin_vars_str_to_value(marlin_vars_t *vars, uint8_t var_id, const char *str)
Definition: marlin_vars.c:251
MARLIN_EVT_Busy
#define MARLIN_EVT_Busy
Definition: marlin_events.h:30
wait_for_heatup
bool wait_for_heatup
Definition: Marlin.cpp:184
marlin_server_settings_load
void marlin_server_settings_load(void)
Definition: marlin_server.cpp:331
MARLIN_EVT_Acknowledge
#define MARLIN_EVT_Acknowledge
Definition: marlin_events.h:38
MARLIN_IDLE_CNT_BUSY
#define MARLIN_IDLE_CNT_BUSY
Definition: marlin_server.cpp:237
variant8_flt
variant8_t variant8_flt(float flt)
Definition: variant8.c:48
Planner::settings
static planner_settings_t settings
Definition: planner.h:251
ExtUI::onStatusChanged
void onStatusChanged(const char *const msg)
Definition: marlin_server.cpp:904
host_action_prompt_show
void host_action_prompt_show()
Definition: marlin_server.cpp:1053
marlin_server_quick_stop
void marlin_server_quick_stop(void)
Definition: marlin_server.cpp:339
osEvent::v
uint32_t v
message as 32-bit value
Definition: cmsis_os.h:398
marlin_server_print_pause
void marlin_server_print_pause(void)
Definition: marlin_server.cpp:353
ExtUI::onPrintTimerStopped
void onPrintTimerStopped()
Definition: marlin_server.cpp:889
temp_error
void temp_error(const char *error, const char *module, float t_noz, float tt_noz, float t_bed, float tt_bed)
Definition: bsod.c:207
_marlin_vars_t::sd_printing
uint8_t sd_printing
Definition: marlin_vars.h:93
nozzle
Nozzle nozzle
Definition: nozzle.cpp:29
idle
void idle()
Definition: Marlin.cpp:629
_send_notify_change_to_client
int _send_notify_change_to_client(osMessageQId queue, uint8_t var_id, variant8_t var)
Definition: marlin_server.cpp:498
cmsis_os.h
Header of cmsis_os.c A new set of APIs are added in addition to existing ones, these APIs are specifi...
_marlin_vars_t::target_bed
float target_bed
Definition: marlin_vars.h:86
_marlin_server_t::command
uint32_t command
Definition: marlin_server.cpp:70
MARLIN_SFLG_PROCESS
#define MARLIN_SFLG_PROCESS
Definition: marlin_server.h:12
thermalManager
Temperature thermalManager
Definition: temperature.cpp:89
_marlin_vars_t::ipos
int32_t ipos[4]
Definition: marlin_vars.h:81
marlin_host_prompt_encode
uint32_t marlin_host_prompt_encode(marlin_host_prompt_t *prompt)
Definition: marlin_host.c:52
host_action_resume
void host_action_resume()
Definition: marlin_server.cpp:1013
Babystep::add_steps
static void add_steps(const AxisEnum axis, const int16_t distance)
MARLIN_EVT_PrintTimerStarted
#define MARLIN_EVT_PrintTimerStarted
Definition: marlin_events.h:15
marlin_server_update
void marlin_server_update(uint64_t update)
Definition: marlin_server.cpp:303
_send_notify_to_client
int _send_notify_to_client(osMessageQId queue, variant8_t msg)
Definition: marlin_server.cpp:385
MARLIN_VAR_Z_OFFSET
#define MARLIN_VAR_Z_OFFSET
Definition: marlin_vars.h:23
ExtUI::_is_thermal_error
int _is_thermal_error(PGM_P const msg)
Definition: marlin_server.cpp:823
MARLIN_ERR_TMCDriverError
#define MARLIN_ERR_TMCDriverError
Definition: marlin_errors.h:8
_marlin_vars_t::motion
uint8_t motion
Definition: marlin_vars.h:78
_marlin_vars_t::fan_speed
uint8_t fan_speed
Definition: marlin_vars.h:88
MARLIN_EVT_FilamentRunout
#define MARLIN_EVT_FilamentRunout
Definition: marlin_events.h:18
host_action_prompt_begin
void host_action_prompt_begin(const char *const pstr, const bool eol)
Definition: marlin_server.cpp:1033
planner
Planner planner
Definition: planner.cpp:111
host_prompt_reason
PromptReason host_prompt_reason
Definition: marlin_server.cpp:77
all_axes_homed
FORCE_INLINE bool all_axes_homed()
Definition: motion.h:44
createSpeedLookupTable.parser
parser
Definition: createSpeedLookupTable.py:14
osMessageQDef
#define osMessageQDef(name, queue_sz, type)
Create a Message Queue Definition.
Definition: cmsis_os.h:818
msg_stack
msg_stack_t msg_stack
Definition: marlin_server.cpp:99
marlin_vars_get_id_by_name
int marlin_vars_get_id_by_name(const char *var_name)
Definition: marlin_vars.c:42
MARLIN_EVT_UserConfirmRequired
#define MARLIN_EVT_UserConfirmRequired
Definition: marlin_events.h:19
_variant8_t::i32
int32_t i32
Definition: variant8.h:33
marlin_server_processing
int marlin_server_processing(void)
Definition: marlin_server.cpp:284