Prusa MINI Firmware overview
|
#include "marlin_server.h"
#include <stdarg.h>
#include "dbg.h"
#include "app.h"
#include "bsod.h"
#include "cmsis_os.h"
#include "string.h"
#include "../Marlin/src/lcd/extensible_ui/ui_api.h"
#include "../Marlin/src/gcode/queue.h"
#include "../Marlin/src/gcode/parser.h"
#include "../Marlin/src/module/planner.h"
#include "../Marlin/src/module/stepper.h"
#include "../Marlin/src/module/temperature.h"
#include "../Marlin/src/module/probe.h"
#include "../Marlin/src/module/configuration_store.h"
#include "../Marlin/src/module/printcounter.h"
#include "../Marlin/src/feature/host_actions.h"
#include "../Marlin/src/feature/babystep.h"
#include "../Marlin/src/feature/pause.h"
#include "../Marlin/src/sd/cardreader.h"
#include "../Marlin/src/libs/nozzle.h"
#include "../Marlin/src/core/language.h"
#include "hwio_a3ides.h"
#include "eeprom.h"
|
void | _add_status_msg (const char *const popup_msg) |
|
int | _send_notify_to_client (osMessageQId queue, variant8_t msg) |
|
int | _send_notify_event_to_client (int client_id, osMessageQId queue, uint8_t evt_id, uint32_t usr32, uint16_t usr16) |
|
uint64_t | _send_notify_events_to_client (int client_id, osMessageQId queue, uint64_t evt_msk) |
|
void | _send_notify_event (uint8_t evt_id, uint32_t usr32, uint16_t usr16) |
|
int | _send_notify_change_to_client (osMessageQId queue, uint8_t var_id, variant8_t var) |
|
uint64_t | _send_notify_changes_to_client (int client_id, osMessageQId queue, uint64_t var_msk) |
|
void | _server_update_gqueue (void) |
|
void | _server_update_pqueue (void) |
|
uint64_t | _server_update_vars (uint64_t force_update_msk) |
|
int | _process_server_request (char *request) |
|
int | _server_set_var (char *name_val_str) |
|
void | marlin_server_init (void) |
|
int | marlin_server_cycle (void) |
|
int | marlin_server_loop (void) |
|
int | marlin_server_idle (void) |
|
int | marlin_server_processing (void) |
|
void | marlin_server_start_processing (void) |
|
void | marlin_server_stop_processing (void) |
|
marlin_vars_t * | marlin_server_vars (void) |
|
void | marlin_server_update (uint64_t update) |
|
void | marlin_server_do_babystep_Z (float offs) |
|
int | marlin_server_enqueue_gcode (const char *gcode) |
|
int | marlin_server_inject_gcode (const char *gcode) |
|
void | marlin_server_settings_save (void) |
|
void | marlin_server_settings_load (void) |
|
void | marlin_server_manage_heater (void) |
|
void | marlin_server_quick_stop (void) |
|
void | marlin_server_print_abort (void) |
|
void | marlin_server_print_pause (void) |
|
void | marlin_server_print_resume (void) |
|
void | marlin_server_park_head (void) |
|
int | marlin_all_axes_homed (void) |
|
int | marlin_all_axes_known (void) |
|
void | ExtUI::onStartup () |
|
void | ExtUI::onIdle () |
|
int | ExtUI::_is_thermal_error (PGM_P const msg) |
|
void | ExtUI::onPrinterKilled (PGM_P const msg, PGM_P const component) |
|
void | ExtUI::onMediaInserted () |
|
void | ExtUI::onMediaError () |
|
void | ExtUI::onMediaRemoved () |
|
void | ExtUI::onPlayTone (const uint16_t frequency, const uint16_t duration) |
|
void | ExtUI::onPrintTimerStarted () |
|
void | ExtUI::onPrintTimerPaused () |
|
void | ExtUI::onPrintTimerStopped () |
|
void | ExtUI::onFilamentRunout (const extruder_t extruder) |
|
void | ExtUI::onUserConfirmRequired (const char *const msg) |
|
void | ExtUI::onStatusChanged (const char *const msg) |
|
void | ExtUI::onFactoryReset () |
|
void | ExtUI::onLoadSettings (char const *) |
|
void | ExtUI::onStoreSettings (char *) |
|
void | ExtUI::onConfigurationStoreWritten (bool success) |
|
void | ExtUI::onConfigurationStoreRead (bool success) |
|
void | ExtUI::onMeshUpdate (const uint8_t xpos, const uint8_t ypos, const float zval) |
|
void | host_action (const char *const pstr, const bool eol) |
|
void | host_action_kill () |
|
void | host_action_safety_timer_expired () |
|
void | host_action_pause (const bool eol) |
|
void | host_action_resume () |
|
void | host_action_cancel () |
|
void | host_action_paused (const bool eol) |
|
void | host_action_resumed () |
|
void | host_response_handler (const uint8_t response) |
|
void | host_action_prompt_begin (const char *const pstr, const bool eol) |
|
void | host_action_prompt_button (const char *const pstr) |
|
void | host_action_prompt_end () |
|
void | host_action_prompt_show () |
|
void | host_prompt_do (const PromptReason type, const char *const pstr, const char *const pbtn) |
|
◆ DBG
◆ DBG_XUI
◆ DBG_REQ
◆ DBG_HOST
◆ HOST_PROMPT_LEN_MAX
#define HOST_PROMPT_LEN_MAX 32 |
◆ HOST_BUTTON_LEN_MAX
#define HOST_BUTTON_LEN_MAX 16 |
◆ HOST_BUTTON_CNT_MAX
#define HOST_BUTTON_CNT_MAX 4 |
◆ MARLIN_IDLE_CNT_BUSY
#define MARLIN_IDLE_CNT_BUSY 2 |
◆ marlin_server_t
◆ _add_status_msg()
103 size_t str_size = strlen(popup_msg);
108 strncpy(message, popup_msg, str_size);
109 message[str_size] =
'\0';
◆ _send_notify_to_client()
◆ _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 |
|
) |
| |
◆ _send_notify_events_to_client()
uint64_t _send_notify_events_to_client |
( |
int |
client_id, |
|
|
osMessageQId |
queue, |
|
|
uint64_t |
evt_msk |
|
) |
| |
410 for (
uint8_t evt_id = 0; evt_id < 64; evt_id++) {
460 uint16_t usr16 = x | ((uint16_t)y << 8);
◆ _send_notify_event()
void _send_notify_event |
( |
uint8_t |
evt_id, |
|
|
uint32_t |
usr32, |
|
|
uint16_t |
usr16 |
|
) |
| |
491 uint64_t mask = ((uint64_t)1 << index);
◆ _send_notify_change_to_client()
◆ _send_notify_changes_to_client()
uint64_t _send_notify_changes_to_client |
( |
int |
client_id, |
|
|
osMessageQId |
queue, |
|
|
uint64_t |
var_msk |
|
) |
| |
508 for (
uint8_t var_id = 0; var_id < 64; var_id++) {
◆ _server_update_gqueue()
◆ _server_update_pqueue()
◆ _server_update_vars()
uint64_t _server_update_vars |
( |
uint64_t |
force_update_msk | ) |
|
540 uint64_t changes = 0;
574 for (
i = 0;
i < 4;
i++)
585 for (
i = 0;
i < 4;
i++)
676 v.
ui8 = card.flag.sdprinting ? 1 : 0;
684 v.
ui8 = card.percentDone();
◆ _process_server_request()
int _process_server_request |
( |
char * |
request | ) |
|
707 int client_id = *(request++) -
'0';
710 DBG_REQ(
"SRV: REQ %c%s",
'0' + client_id, request);
711 if (strncmp(
"!g ", request, 3) == 0) {
713 }
else if (strncmp(
"!ig ", request,
sizeof(
"!ig ") /
sizeof(
char) - 1) == 0) {
714 unsigned long int iptr = strtoul(request +
sizeof(
"!ig ") /
sizeof(
char) - 1,
NULL, 0);
716 }
else if (strcmp(
"!start", request) == 0) {
719 }
else if (strcmp(
"!stop", request) == 0) {
722 }
else if (strncmp(
"!var ", request, 5) == 0) {
725 }
else if (sscanf(request,
"!update %" PRIu64, &msk) == 1) {
728 }
else if (sscanf(request,
"!babystep_Z %f", &offs) == 1) {
731 }
else if (strcmp(
"!save", request) == 0) {
734 }
else if (strcmp(
"!load", request) == 0) {
737 }
else if (strcmp(
"!updt", request) == 0) {
740 }
else if (strcmp(
"!qstop", request) == 0) {
743 }
else if (strcmp(
"!pabort", request) == 0) {
746 }
else if (strcmp(
"!ppause", request) == 0) {
749 }
else if (strcmp(
"!presume", request) == 0) {
752 }
else if (strcmp(
"!park", request) == 0) {
755 }
else if (sscanf(request,
"!hclick %d", &ival) == 1) {
◆ _server_set_var()
int _server_set_var |
( |
char * |
name_val_str | ) |
|
767 char *val_str = strchr(name_val_str,
' ');
◆ marlin_server_init()
◆ marlin_server_cycle()
int marlin_server_cycle |
( |
void |
| ) |
|
172 uint64_t changes = 0;
◆ marlin_server_loop()
int marlin_server_loop |
( |
void |
| ) |
|
◆ marlin_server_idle()
int marlin_server_idle |
( |
void |
| ) |
|
261 if (
parser.command_letter ==
'G')
268 else if (
parser.command_letter ==
'M')
◆ marlin_server_processing()
int marlin_server_processing |
( |
void |
| ) |
|
◆ marlin_server_start_processing()
void marlin_server_start_processing |
( |
void |
| ) |
|
◆ marlin_server_stop_processing()
void marlin_server_stop_processing |
( |
void |
| ) |
|
◆ marlin_server_vars()
◆ marlin_server_update()
void marlin_server_update |
( |
uint64_t |
update | ) |
|
◆ marlin_server_do_babystep_Z()
void marlin_server_do_babystep_Z |
( |
float |
offs | ) |
|
◆ marlin_server_enqueue_gcode()
int marlin_server_enqueue_gcode |
( |
const char * |
gcode | ) |
|
◆ marlin_server_inject_gcode()
int marlin_server_inject_gcode |
( |
const char * |
gcode | ) |
|
◆ marlin_server_settings_save()
void marlin_server_settings_save |
( |
void |
| ) |
|
◆ marlin_server_settings_load()
void marlin_server_settings_load |
( |
void |
| ) |
|
◆ marlin_server_manage_heater()
void marlin_server_manage_heater |
( |
void |
| ) |
|
◆ marlin_server_quick_stop()
◆ marlin_server_print_abort()
345 card.flag.abort_sd_printing =
true;
◆ marlin_server_print_pause()
◆ marlin_server_print_resume()
void marlin_server_print_resume |
( |
void |
| ) |
|
◆ marlin_server_park_head()
368 xyz_pos_t park_point = NOZZLE_PARK_POINT;
369 nozzle.park(2, park_point);
◆ marlin_all_axes_homed()
int marlin_all_axes_homed |
( |
void |
| ) |
|
◆ marlin_all_axes_known()
int marlin_all_axes_known |
( |
void |
| ) |
|
◆ host_action()
Marlin 3D Printer Firmware Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
Based on Sprinter and grbl. Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
◆ host_action_kill()
void host_action_kill |
( |
| ) |
|
◆ host_action_safety_timer_expired()
void host_action_safety_timer_expired |
( |
| ) |
|
1005 DBG_HOST(
"host_action_safety_timer_expired");
◆ host_action_pause()
◆ host_action_resume()
void host_action_resume |
( |
| ) |
|
◆ host_action_cancel()
void host_action_cancel |
( |
| ) |
|
◆ host_action_paused()
◆ host_action_resumed()
void host_action_resumed |
( |
| ) |
|
◆ host_response_handler()
1030 DBG_HOST(
"host_response_handler %d", (
int)response);
◆ host_action_prompt_begin()
1034 DBG_HOST(
"host_action_prompt_begin '%s' %d", pstr, (
int)eol);
◆ host_action_prompt_button()
1040 DBG_HOST(
"host_action_prompt_button '%s'", pstr);
◆ host_action_prompt_end()
void host_action_prompt_end |
( |
| ) |
|
1048 DBG_HOST(
"host_action_prompt_end");
◆ host_action_prompt_show()
void host_action_prompt_show |
( |
| ) |
|
1054 DBG_HOST(
"host_action_prompt_show");
1068 switch (prompt.
type) {
1083 do_pause_e_move(ADVANCED_PAUSE_PURGE_LENGTH, ADVANCED_PAUSE_PURGE_FEEDRATE);
◆ host_prompt_do()
1104 DBG_HOST(
"host_prompt_do %d '%s' '%s'", (
int)
type, pstr, pbtn);
1108 if (strcmp(pstr,
"Reheating") == 0) {
1112 case PROMPT_USER_CONTINUE:
1114 if (strcmp(pstr,
"Reheat Done") == 0) {
◆ host_prompt_reason
PromptReason host_prompt_reason = PROMPT_NOT_DEFINED |
◆ hiwdg
Marlin 3D Printer Firmware Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
Based on Sprinter and grbl. Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
◆ marlin_server_task
◆ marlin_server_queue
◆ marlin_server_sema
◆ marlin_server
◆ marlin_server_idle_cb
◆ msg_stack
◆ host_prompt
◆ host_prompt_button
◆ host_prompt_buttons
◆ host_prompt_button_clicked
◆ marlin_client_task
◆ marlin_client_queue
T z
Definition: types.h:286
#define MARLIN_MAX_CLIENTS
Definition: config.h:96
Definition: marlin_host.h:19
#define MARLIN_VAR_MSK_DEF
Definition: marlin_vars.h:52
marlin_mesh_t mesh
Definition: marlin_server.cpp:71
void _server_update_pqueue(void)
Definition: marlin_server.cpp:527
uint64_t _server_update_vars(uint64_t force_update_msk)
Definition: marlin_server.cpp:537
#define MARLIN_EVT_Startup
Definition: marlin_events.h:8
#define MARLIN_EVT_SafetyTimerExpired
Definition: marlin_events.h:35
uint32_t osMessageAvailableSpace(osMessageQId queue_id)
Get the available space in a message queue.
Definition: cmsis_os.c:1658
Definition: marlin_server.h:26
#define MARLIN_VAR_TEMP_BED
Definition: marlin_vars.h:20
uint64_t notify_changes
Definition: marlin_server.cpp:57
int _server_set_var(char *name_val_str)
Definition: marlin_server.cpp:765
host_prompt_button_t host_prompt_button_clicked
Definition: marlin_server.cpp:128
uint64_t _send_notify_changes_to_client(int client_id, osMessageQId queue, uint64_t var_msk)
Definition: marlin_server.cpp:504
constexpr xyz_pos_t probe_offset
Definition: probe.h:58
static FORCE_INLINE bool axis_is_moving(const AxisEnum axis)
Definition: stepper.h:381
#define MARLIN_EVT_MediaError
Definition: marlin_events.h:12
#define osSemaphore(name)
Definition: cmsis_os.h:709
GCodeQueue queue
Definition: queue.cpp:28
MarlinSettings settings
Definition: configuration_store.cpp:344
variant8_t marlin_vars_get_var(marlin_vars_t *vars, uint8_t var_id)
Definition: marlin_vars.c:50
#define MARLIN_EVT_LoadSettings
Definition: marlin_events.h:22
void marlin_server_print_abort(void)
Definition: marlin_server.cpp:343
uint64_t client_events[MARLIN_MAX_CLIENTS]
Definition: marlin_server.cpp:61
list gcode
Definition: g29_auto.py:44
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
osThreadId marlin_server_task
Definition: marlin_server.cpp:88
char host_prompt[HOST_PROMPT_LEN_MAX]
Definition: marlin_server.cpp:125
#define MARLIN_VAR_MOTION
Definition: marlin_vars.h:8
Stepper stepper
Definition: stepper.cpp:82
uint16_t lcdsim_grab_text(char *text)
Definition: lcdsim.c:93
#define MARLIN_CMD_M
Definition: marlin_events.h:52
float z_offset
Definition: marlin_vars.h:87
static float get_axis_position_mm(const AxisEnum axis)
Definition: planner.cpp:1526
#define MARLIN_VAR_IPOS_X
Definition: marlin_vars.h:11
#define MARLIN_VAR_SD_PDONE
Definition: marlin_vars.h:30
Stopwatch print_job_timer
Definition: printcounter.cpp:63
uint8_t type
Definition: UsbCore.h:184
int marlin_server_enqueue_gcode(const char *gcode)
Definition: marlin_server.cpp:318
uint8_t ui8
Definition: variant8.h:36
#define MARLIN_VAR_FANSPEED
Definition: marlin_vars.h:24
Definition: marlin_host.h:20
uint32_t last_update
Definition: marlin_server.cpp:64
uint16_t flags
Definition: marlin_server.cpp:55
#define MARLIN_SFLG_BUSY
Definition: marlin_server.h:13
uint8_t pqueue_head
Definition: marlin_server.cpp:66
void marlin_server_stop_processing(void)
Definition: marlin_server.cpp:293
#define MARLIN_EVT_MSK_DEF
Definition: marlin_events.h:43
uint8_t i
Definition: screen_test_graph.c:72
uint8_t pqueue
Definition: marlin_vars.h:80
uint8_t type
Definition: variant8.h:25
host_prompt_button_t marlin_host_prompt_button_by_text(const char *text)
Definition: marlin_host.c:44
static volatile uint8_t block_buffer_tail
Definition: planner.h:227
#define MARLIN_VAR_TTEM_BED
Definition: marlin_vars.h:22
osMessageQId marlin_server_queue
Definition: marlin_server.cpp:89
host_prompt_type_t type
Definition: marlin_host.h:47
AxisEnum
Definition: types.h:36
void marlin_server_do_babystep_Z(float offs)
Definition: marlin_server.cpp:313
void marlin_server_settings_save(void)
Definition: marlin_server.cpp:327
uint8_t count
Definition: marlin_server.h:29
uint8_t host_prompt_buttons
Definition: marlin_server.cpp:127
#define MARLIN_CMD_M600
Definition: marlin_events.h:57
static uint8_t length
Definition: queue.h:51
static void manage_heater() _O2
Definition: temperature.cpp:975
static bool stop()
Stop the stopwatch.
Definition: stopwatch.cpp:36
Definition: marlin_host.h:46
static volatile uint8_t block_buffer_head
Definition: planner.h:227
uint8_t xc
Definition: marlin_events.h:104
Definition: marlin_host.h:28
#define MARLIN_EVT_MediaInserted
Definition: marlin_events.h:11
#define MARLIN_EVT_PrintTimerStopped
Definition: marlin_events.h:17
osThreadId osThreadGetId(void)
Return the thread ID of the current running thread.
Definition: cmsis_os.c:283
uint16_t usr16
Definition: variant8.h:27
#define NULL
Definition: usbd_def.h:53
#define MARLIN_SFLG_PENDREQ
Definition: marlin_server.h:14
void marlin_server_park_head(void)
Definition: marlin_server.cpp:365
static bool save()
Definition: configuration_store.cpp:2198
bool wait_for_user
Definition: Marlin.cpp:188
uint64_t client_changes[MARLIN_MAX_CLIENTS]
Definition: marlin_server.cpp:62
variant8_t variant8_user(uint32_t usr32)
Definition: variant8.c:54
QueueHandle_t osMessageQId
Definition: cmsis_os.h:303
#define MARLIN_USR8_VAR_FLG
Definition: marlin_vars.h:59
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_t marlin_server
Definition: marlin_server.cpp:92
uint32_t HAL_GetTick(void)
Provides a tick value in millisecond.
Definition: stm32f4xx_hal.c:339
FORCE_INLINE bool all_axes_known()
Definition: motion.h:45
#define MARLIN_VAR_WAITUSER
Definition: marlin_vars.h:28
#define MARLIN_EVT_Reheat
Definition: marlin_events.h:37
char msg_data[MSG_STACK_SIZE][MSG_MAX_LENGTH]
Definition: marlin_server.h:28
Definition: cmsis_os.h:395
float temp_nozzle
Definition: marlin_vars.h:83
Definition: variant8.h:24
Definition: marlin_server.cpp:54
char host_prompt_button[HOST_BUTTON_CNT_MAX][HOST_PROMPT_LEN_MAX]
Definition: marlin_server.cpp:126
void marlin_server_settings_load(void)
Definition: marlin_server.cpp:331
void _send_notify_event(uint8_t evt_id, uint32_t usr32, uint16_t usr16)
Definition: marlin_server.cpp:481
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
osSemaphoreId marlin_server_sema
Definition: marlin_server.cpp:90
HAL_StatusTypeDef HAL_IWDG_Refresh(IWDG_HandleTypeDef *hiwdg)
#define osSemaphoreDef(name)
Definition: cmsis_os.h:700
int16_t feedrate_percentage
Definition: motion.cpp:139
Definition: marlin_host.h:26
uint64_t notify_events
Definition: marlin_server.cpp:56
#define DBG_REQ(...)
Definition: marlin_server.cpp:41
#define MARLIN_EVT_StoreSettings
Definition: marlin_events.h:23
float flt
Definition: variant8.h:31
#define MARLIN_VAR_TEMP_NOZ
Definition: marlin_vars.h:19
#define BLOCK_BUFFER_SIZE
Definition: Configuration_A3ides_2209_MINI_adv.h:1167
osMessageQId marlin_client_queue[MARLIN_MAX_CLIENTS]
Definition: marlin_client.c:60
#define MARLIN_EVT_CommandEnd
Definition: marlin_events.h:34
#define MARLIN_MAX_REQUEST
Definition: config.h:97
#define MARLIN_VAR_MSK_IPOS_XYZE
Definition: marlin_vars.h:37
uint8_t pqueue
Definition: marlin_server.cpp:68
#define MARLIN_VAR_PQUEUE
Definition: marlin_vars.h:10
char request[MARLIN_MAX_REQUEST]
Definition: marlin_server.cpp:59
#define MARLIN_EVT_PrintTimerPaused
Definition: marlin_events.h:16
#define MARLIN_EVT_StopProcessing
Definition: marlin_events.h:29
#define MARLIN_EVT_CommandBegin
Definition: marlin_events.h:33
float axis_steps_per_mm[XYZE_N]
Definition: planner.h:181
#define MARLIN_VAR_GQUEUE
Definition: marlin_vars.h:9
osStatus osMessagePut(osMessageQId queue_id, uint32_t info, uint32_t millisec)
Put a Message to a Queue.
Definition: cmsis_os.c:1113
static millis_t duration()
Get the running time.
Definition: stopwatch.cpp:108
void
Definition: png.h:1083
function completed; message event occurred.
Definition: cmsis_os.h:237
uint8_t wait_heat
Definition: marlin_vars.h:91
float target_nozzle
Definition: marlin_vars.h:85
int marlin_server_inject_gcode(const char *gcode)
Definition: marlin_server.cpp:322
Definition: marlin_host.h:21
#define MARLIN_VAR_WAITHEAT
Definition: marlin_vars.h:27
int _process_server_request(char *request)
Definition: marlin_server.cpp:702
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
static bool pause()
Pause the stopwatch.
Definition: stopwatch.cpp:52
#define osWaitForever
wait forever timeout value
Definition: cmsis_os.h:230
if(size<=((png_alloc_size_t) -1) - ob)
Definition: pngwrite.c:2176
uint64_t _send_notify_events_to_client(int client_id, osMessageQId queue, uint64_t evt_msk)
Definition: marlin_server.cpp:407
marlin_vars_t vars
Definition: marlin_server.cpp:58
host_prompt_button_t
Definition: marlin_host.h:25
uint8_t wait_user
Definition: marlin_vars.h:92
#define MARLIN_EVT_MeshUpdate
Definition: marlin_events.h:24
static bool enqueue_one(const char *cmd)
Definition: queue.cpp:157
float temp_bed
Definition: marlin_vars.h:84
const uint8_t[]
Definition: 404_html.c:3
float z[MARLIN_MAX_MESH_POINTS]
Definition: marlin_events.h:103
#define MARLIN_VAR_MSK(v_id)
Definition: marlin_vars.h:35
uint8_t idle_cnt
Definition: marlin_server.cpp:65
#define VARIANT8_EMPTY
Definition: variant8.h:8
#define MARLIN_VAR_PRNSPEED
Definition: marlin_vars.h:25
#define MARLIN_EVT_HostPrompt
Definition: marlin_events.h:26
uint64_t mesh_point_notsent[MARLIN_MAX_CLIENTS]
Definition: marlin_server.cpp:72
#define MSG_MAX_LENGTH
Definition: marlin_server.h:19
#define MARLIN_EVT_FactoryReset
Definition: marlin_events.h:21
#define MARLIN_VAR_SD_PRINT
Definition: marlin_vars.h:29
int request_len
Definition: marlin_server.cpp:60
#define MARLIN_SFLG_STARTED
Definition: marlin_server.h:11
#define MARLIN_CMD_G
Definition: marlin_events.h:51
uint16_t print_speed
Definition: marlin_vars.h:89
static void quick_stop()
Definition: planner.cpp:1475
#define MARLIN_VAR_DURATION
Definition: marlin_vars.h:31
uint8_t yc
Definition: marlin_events.h:105
#define MARLIN_EVT_StatusChanged
Definition: marlin_events.h:20
void marlin_server_print_resume(void)
Definition: marlin_server.cpp:359
uint32_t print_duration
Definition: marlin_vars.h:95
uint8_t sd_percent_done
Definition: marlin_vars.h:94
#define MARLIN_VAR_MSK_POS_XYZE
Definition: marlin_vars.h:40
uint16_t flow_factor
Definition: marlin_vars.h:90
static status_t status
Definition: filament_sensor.c:37
#define MARLIN_UPDATE_PERIOD
Definition: marlin_server.h:17
#define MARLIN_EVT_Ready
Definition: marlin_events.h:31
#define bsod(fmt,...)
Definition: bsod.h:20
#define HOST_BUTTON_CNT_MAX
Definition: marlin_server.cpp:49
uint8_t gqueue
Definition: marlin_vars.h:79
#define MARLIN_EVT_StartProcessing
Definition: marlin_events.h:28
uint8_t pqueue_tail
Definition: marlin_server.cpp:67
void _server_update_gqueue(void)
Definition: marlin_server.cpp:520
osMessageQId osMessageCreate(const osMessageQDef_t *queue_def, osThreadId thread_id)
Create and Initialize a Message Queue.
Definition: cmsis_os.c:1086
#define osMessageQ(name)
Access a Message Queue Definition.
Definition: cmsis_os.h:829
void marlin_server_start_processing(void)
Definition: marlin_server.cpp:288
uint8_t usr8
Definition: variant8.h:26
void marlin_server_manage_heater(void)
Definition: marlin_server.cpp:335
static FORCE_INLINE bool load()
Definition: configuration_store.h:79
host_prompt_type_t marlin_host_prompt_by_text(const char *text)
Definition: marlin_host.c:29
#define MARLIN_CMD_NONE
Definition: marlin_events.h:50
float pos[4]
Definition: marlin_vars.h:82
#define DBG_HOST
Definition: marlin_server.cpp:43
#define MARLIN_EVT_MediaRemoved
Definition: marlin_events.h:13
static int32_t position(const AxisEnum axis)
Definition: stepper.cpp:2214
#define MARLIN_VAR_TTEM_NOZ
Definition: marlin_vars.h:21
IWDG_HandleTypeDef hiwdg
Definition: watchdog.h:24
union osEvent::@54 value
event value
int marlin_server_cycle(void)
Definition: marlin_server.cpp:168
#define MSG_STACK_SIZE
Definition: marlin_server.h:18
static void inject_P(PGM_P const pgcode)
Definition: queue.cpp:206
uint32_t ui32
Definition: variant8.h:32
#define MARLIN_CMD_M701
Definition: marlin_events.h:58
Definition: marlin_host.h:27
uint8_t gqueue
Definition: marlin_server.cpp:69
int marlin_vars_str_to_value(marlin_vars_t *vars, uint8_t var_id, const char *str)
Definition: marlin_vars.c:251
#define MARLIN_EVT_Busy
Definition: marlin_events.h:30
bool wait_for_heatup
Definition: Marlin.cpp:184
#define MARLIN_EVT_Acknowledge
Definition: marlin_events.h:38
#define MARLIN_IDLE_CNT_BUSY
Definition: marlin_server.cpp:237
variant8_t variant8_flt(float flt)
Definition: variant8.c:48
static planner_settings_t settings
Definition: planner.h:251
void marlin_server_quick_stop(void)
Definition: marlin_server.cpp:339
uint32_t v
message as 32-bit value
Definition: cmsis_os.h:398
void marlin_server_print_pause(void)
Definition: marlin_server.cpp:353
uint8_t sd_printing
Definition: marlin_vars.h:93
Nozzle nozzle
Definition: nozzle.cpp:29
void idle()
Definition: Marlin.cpp:629
int _send_notify_change_to_client(osMessageQId queue, uint8_t var_id, variant8_t var)
Definition: marlin_server.cpp:498
float target_bed
Definition: marlin_vars.h:86
uint32_t command
Definition: marlin_server.cpp:70
#define MARLIN_SFLG_PROCESS
Definition: marlin_server.h:12
Temperature thermalManager
Definition: temperature.cpp:89
int32_t ipos[4]
Definition: marlin_vars.h:81
uint32_t marlin_host_prompt_encode(marlin_host_prompt_t *prompt)
Definition: marlin_host.c:52
static void add_steps(const AxisEnum axis, const int16_t distance)
#define MARLIN_EVT_PrintTimerStarted
Definition: marlin_events.h:15
void marlin_server_update(uint64_t update)
Definition: marlin_server.cpp:303
int _send_notify_to_client(osMessageQId queue, variant8_t msg)
Definition: marlin_server.cpp:385
#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
#define MARLIN_EVT_FilamentRunout
Definition: marlin_events.h:18
Planner planner
Definition: planner.cpp:111
FORCE_INLINE bool all_axes_homed()
Definition: motion.h:44
parser
Definition: createSpeedLookupTable.py:14
#define osMessageQDef(name, queue_sz, type)
Create a Message Queue Definition.
Definition: cmsis_os.h:818
int marlin_vars_get_id_by_name(const char *var_name)
Definition: marlin_vars.c:42
int32_t i32
Definition: variant8.h:33