Prusa MINI Firmware overview
gcode.h
Go to the documentation of this file.
1 /**
2  * Marlin 3D Printer Firmware
3  * Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4  *
5  * Based on Sprinter and grbl.
6  * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
7  *
8  * This program is free software: you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation, either version 3 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program. If not, see <http://www.gnu.org/licenses/>.
20  *
21  */
22 #pragma once
23 
24 /**
25  * gcode.h - Temporary container for all gcode handlers
26  */
27 
28 /**
29  * -----------------
30  * G-Codes in Marlin
31  * -----------------
32  *
33  * Helpful G-code references:
34  * - http://marlinfw.org/meta/gcode
35  * - https://reprap.org/wiki/G-code
36  * - http://linuxcnc.org/docs/html/gcode.html
37  *
38  * Help to document Marlin's G-codes online:
39  * - https://github.com/MarlinFirmware/MarlinDocumentation
40  *
41  * -----------------
42  *
43  * "G" Codes
44  *
45  * G0 -> G1
46  * G1 - Coordinated Movement X Y Z E
47  * G2 - CW ARC
48  * G3 - CCW ARC
49  * G4 - Dwell S<seconds> or P<milliseconds>
50  * G5 - Cubic B-spline with XYZE destination and IJPQ offsets
51  * G10 - Retract filament according to settings of M207 (Requires FWRETRACT)
52  * G11 - Retract recover filament according to settings of M208 (Requires FWRETRACT)
53  * G12 - Clean tool (Requires NOZZLE_CLEAN_FEATURE)
54  * G17 - Select Plane XY (Requires CNC_WORKSPACE_PLANES)
55  * G18 - Select Plane ZX (Requires CNC_WORKSPACE_PLANES)
56  * G19 - Select Plane YZ (Requires CNC_WORKSPACE_PLANES)
57  * G20 - Set input units to inches (Requires INCH_MODE_SUPPORT)
58  * G21 - Set input units to millimeters (Requires INCH_MODE_SUPPORT)
59  * G26 - Mesh Validation Pattern (Requires G26_MESH_VALIDATION)
60  * G27 - Park Nozzle (Requires NOZZLE_PARK_FEATURE)
61  * G28 - Home one or more axes
62  * G29 - Start or continue the bed leveling probe procedure (Requires bed leveling)
63  * G30 - Single Z probe, probes bed at X Y location (defaults to current XY location)
64  * G31 - Dock sled (Z_PROBE_SLED only)
65  * G32 - Undock sled (Z_PROBE_SLED only)
66  * G33 - Delta Auto-Calibration (Requires DELTA_AUTO_CALIBRATION)
67  * G34 - Z Stepper automatic alignment using probe: I<iterations> T<accuracy> A<amplification> (Requires Z_STEPPER_AUTO_ALIGN)
68  * G38 - Probe in any direction using the Z_MIN_PROBE (Requires G38_PROBE_TARGET)
69  * G42 - Coordinated move to a mesh point (Requires MESH_BED_LEVELING, AUTO_BED_LEVELING_BLINEAR, or AUTO_BED_LEVELING_UBL)
70  * G80 - Cancel current motion mode (Requires GCODE_MOTION_MODES)
71  * G90 - Use Absolute Coordinates
72  * G91 - Use Relative Coordinates
73  * G92 - Set current position to coordinates given
74  *
75  * "M" Codes
76  *
77  * M0 - Unconditional stop - Wait for user to press a button on the LCD (Only if ULTRA_LCD is enabled)
78  * M1 -> M0
79  * M3 - Turn ON Laser | Spindle (clockwise), set Power | Speed. (Requires SPINDLE_FEATURE or LASER_FEATURE)
80  * M4 - Turn ON Laser | Spindle (counter-clockwise), set Power | Speed. (Requires SPINDLE_FEATURE or LASER_FEATURE)
81  * M5 - Turn OFF Laser | Spindle. (Requires SPINDLE_FEATURE or LASER_FEATURE)
82  * M7 - Turn mist coolant ON. (Requires COOLANT_CONTROL)
83  * M8 - Turn flood coolant ON. (Requires COOLANT_CONTROL)
84  * M9 - Turn coolant OFF. (Requires COOLANT_CONTROL)
85  * M12 - Set up closed loop control system. (Requires EXTERNAL_CLOSED_LOOP_CONTROLLER)
86  * M16 - Expected printer check. (Requires EXPECTED_PRINTER_CHECK)
87  * M17 - Enable/Power all stepper motors
88  * M18 - Disable all stepper motors; same as M84
89  * M20 - List SD card. (Requires SDSUPPORT)
90  * M21 - Init SD card. (Requires SDSUPPORT)
91  * M22 - Release SD card. (Requires SDSUPPORT)
92  * M23 - Select SD file: "M23 /path/file.gco". (Requires SDSUPPORT)
93  * M24 - Start/resume SD print. (Requires SDSUPPORT)
94  * M25 - Pause SD print. (Requires SDSUPPORT)
95  * M26 - Set SD position in bytes: "M26 S12345". (Requires SDSUPPORT)
96  * M27 - Report SD print status. (Requires SDSUPPORT)
97  * OR, with 'S<seconds>' set the SD status auto-report interval. (Requires AUTO_REPORT_SD_STATUS)
98  * OR, with 'C' get the current filename.
99  * M28 - Start SD write: "M28 /path/file.gco". (Requires SDSUPPORT)
100  * M29 - Stop SD write. (Requires SDSUPPORT)
101  * M30 - Delete file from SD: "M30 /path/file.gco"
102  * M31 - Report time since last M109 or SD card start to serial.
103  * M32 - Select file and start SD print: "M32 [S<bytepos>] !/path/file.gco#". (Requires SDSUPPORT)
104  * Use P to run other files as sub-programs: "M32 P !filename#"
105  * The '#' is necessary when calling from within sd files, as it stops buffer prereading
106  * M33 - Get the longname version of a path. (Requires LONG_FILENAME_HOST_SUPPORT)
107  * M34 - Set SD Card sorting options. (Requires SDCARD_SORT_ALPHA)
108  * M42 - Change pin status via gcode: M42 P<pin> S<value>. LED pin assumed if P is omitted.
109  * M43 - Display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins
110  * M48 - Measure Z Probe repeatability: M48 P<points> X<pos> Y<pos> V<level> E<engage> L<legs> S<chizoid>. (Requires Z_MIN_PROBE_REPEATABILITY_TEST)
111  * M73 - Set the progress percentage. (Requires LCD_SET_PROGRESS_MANUALLY)
112  * M75 - Start the print job timer.
113  * M76 - Pause the print job timer.
114  * M77 - Stop the print job timer.
115  * M78 - Show statistical information about the print jobs. (Requires PRINTCOUNTER)
116  * M80 - Turn on Power Supply. (Requires PSU_CONTROL)
117  * M81 - Turn off Power Supply. (Requires PSU_CONTROL)
118  * M82 - Set E codes absolute (default).
119  * M83 - Set E codes relative while in Absolute (G90) mode.
120  * M84 - Disable steppers until next move, or use S<seconds> to specify an idle
121  * duration after which steppers should turn off. S0 disables the timeout.
122  * M85 - Set inactivity shutdown timer with parameter S<seconds>. To disable set zero (default)
123  * M86 - Set Safety Timer expiration time (S<seconds>). Set to zero to disable the timer.
124  * M92 - Set planner.settings.axis_steps_per_mm for one or more axes.
125  * M100 - Watch Free Memory (for debugging) (Requires M100_FREE_MEMORY_WATCHER)
126  * M104 - Set extruder target temp.
127  * M105 - Report current temperatures.
128  * M106 - Set print fan speed.
129  * M107 - Print fan off.
130  * M108 - Break out of heating loops (M109, M190, M303). With no controller, breaks out of M0/M1. (Requires EMERGENCY_PARSER)
131  * M109 - S<temp> Wait for extruder current temp to reach target temp. ** Wait only when heating! **
132  * R<temp> Wait for extruder current temp to reach target temp. ** Wait for heating or cooling. **
133  * If AUTOTEMP is enabled, S<mintemp> B<maxtemp> F<factor>. Exit autotemp by any M109 without F
134  * M110 - Set the current line number. (Used by host printing)
135  * M111 - Set debug flags: "M111 S<flagbits>". See flag bits defined in enum.h.
136  * M112 - Full Shutdown.
137  * M113 - Get or set the timeout interval for Host Keepalive "busy" messages. (Requires HOST_KEEPALIVE_FEATURE)
138  * M114 - Report current position.
139  * M115 - Report capabilities. (Extended capabilities requires EXTENDED_CAPABILITIES_REPORT)
140  * M117 - Display a message on the controller screen. (Requires an LCD)
141  * M118 - Display a message in the host console.
142  * M119 - Report endstops status.
143  * M120 - Enable endstops detection.
144  * M121 - Disable endstops detection.
145  * M122 - Debug stepper (Requires at least one _DRIVER_TYPE defined as TMC2130/2160/5130/5160/2208/2209/2660 or L6470)
146  * M125 - Save current position and move to filament change position. (Requires PARK_HEAD_ON_PAUSE)
147  * M126 - Solenoid Air Valve Open. (Requires BARICUDA)
148  * M127 - Solenoid Air Valve Closed. (Requires BARICUDA)
149  * M128 - EtoP Open. (Requires BARICUDA)
150  * M129 - EtoP Closed. (Requires BARICUDA)
151  * M140 - Set bed target temp. S<temp>
152  * M141 - Set heated chamber target temp. S<temp> (Requires a chamber heater)
153  * M145 - Set heatup values for materials on the LCD. H<hotend> B<bed> F<fan speed> for S<material> (0=PLA, 1=ABS)
154  * M149 - Set temperature units. (Requires TEMPERATURE_UNITS_SUPPORT)
155  * M150 - Set Status LED Color as R<red> U<green> B<blue> P<bright>. Values 0-255. (Requires BLINKM, RGB_LED, RGBW_LED, NEOPIXEL_LED, PCA9533, or PCA9632).
156  * M155 - Auto-report temperatures with interval of S<seconds>. (Requires AUTO_REPORT_TEMPERATURES)
157  * M163 - Set a single proportion for a mixing extruder. (Requires MIXING_EXTRUDER)
158  * M164 - Commit the mix and save to a virtual tool (current, or as specified by 'S'). (Requires MIXING_EXTRUDER)
159  * M165 - Set the mix for the mixing extruder (and current virtual tool) with parameters ABCDHI. (Requires MIXING_EXTRUDER and DIRECT_MIXING_IN_G1)
160  * M166 - Set the Gradient Mix for the mixing extruder. (Requires GRADIENT_MIX)
161  * M190 - S<temp> Wait for bed current temp to reach target temp. ** Wait only when heating! **
162  * R<temp> Wait for bed current temp to reach target temp. ** Wait for heating or cooling. **
163  * M200 - Set filament diameter, D<diameter>, setting E axis units to cubic. (Use S0 to revert to linear units.)
164  * M201 - Set max acceleration in units/s^2 for print moves: "M201 X<accel> Y<accel> Z<accel> E<accel>"
165  * M202 - Set max acceleration in units/s^2 for travel moves: "M202 X<accel> Y<accel> Z<accel> E<accel>" ** UNUSED IN MARLIN! **
166  * M203 - Set maximum feedrate: "M203 X<fr> Y<fr> Z<fr> E<fr>" in units/sec.
167  * M204 - Set default acceleration in units/sec^2: P<printing> R<extruder_only> T<travel>
168  * M205 - Set advanced settings. Current units apply:
169  S<print> T<travel> minimum speeds
170  B<minimum segment time>
171  X<max X jerk>, Y<max Y jerk>, Z<max Z jerk>, E<max E jerk>
172  * M206 - Set additional homing offset. (Disabled by NO_WORKSPACE_OFFSETS or DELTA)
173  * M207 - Set Retract Length: S<length>, Feedrate: F<units/min>, and Z lift: Z<distance>. (Requires FWRETRACT)
174  * M208 - Set Recover (unretract) Additional (!) Length: S<length> and Feedrate: F<units/min>. (Requires FWRETRACT)
175  * M209 - Turn Automatic Retract Detection on/off: S<0|1> (For slicers that don't support G10/11). (Requires FWRETRACT_AUTORETRACT)
176  Every normal extrude-only move will be classified as retract depending on the direction.
177  * M211 - Enable, Disable, and/or Report software endstops: S<0|1> (Requires MIN_SOFTWARE_ENDSTOPS or MAX_SOFTWARE_ENDSTOPS)
178  * M217 - Set filament swap parameters: "M217 S<length> P<feedrate> R<feedrate>". (Requires SINGLENOZZLE)
179  * M218 - Set/get a tool offset: "M218 T<index> X<offset> Y<offset>". (Requires 2 or more extruders)
180  * M220 - Set Feedrate Percentage: "M220 S<percent>" (i.e., "FR" on the LCD)
181  * M221 - Set Flow Percentage: "M221 S<percent>"
182  * M226 - Wait until a pin is in a given state: "M226 P<pin> S<state>"
183  * M240 - Trigger a camera to take a photograph. (Requires PHOTO_GCODE)
184  * M250 - Set LCD contrast: "M250 C<contrast>" (0-63). (Requires LCD support)
185  * M260 - i2c Send Data (Requires EXPERIMENTAL_I2CBUS)
186  * M261 - i2c Request Data (Requires EXPERIMENTAL_I2CBUS)
187  * M280 - Set servo position absolute: "M280 P<index> S<angle|µs>". (Requires servos)
188  * M281 - Set servo min|max position: "M281 P<index> L<min> U<max>". (Requires EDITABLE_SERVO_ANGLES)
189  * M290 - Babystepping (Requires BABYSTEPPING)
190  * M300 - Play beep sound S<frequency Hz> P<duration ms>
191  * M301 - Set PID parameters P I and D. (Requires PIDTEMP)
192  * M302 - Allow cold extrudes, or set the minimum extrude S<temperature>. (Requires PREVENT_COLD_EXTRUSION)
193  * M303 - PID relay autotune S<temperature> sets the target temperature. Default 150C. (Requires PIDTEMP)
194  * M304 - Set bed PID parameters P I and D. (Requires PIDTEMPBED)
195  * M305 - Set user thermistor parameters R T and P. (Requires TEMP_SENSOR_x 1000)
196  * M350 - Set microstepping mode. (Requires digital microstepping pins.)
197  * M351 - Toggle MS1 MS2 pins directly. (Requires digital microstepping pins.)
198  * M355 - Set Case Light on/off and set brightness. (Requires CASE_LIGHT_PIN)
199  * M380 - Activate solenoid on active extruder. (Requires EXT_SOLENOID)
200  * M381 - Disable all solenoids. (Requires EXT_SOLENOID)
201  * M400 - Finish all moves.
202  * M401 - Deploy and activate Z probe. (Requires a probe)
203  * M402 - Deactivate and stow Z probe. (Requires a probe)
204  * M403 - Set filament type for PRUSA MMU2
205  * M404 - Display or set the Nominal Filament Width: "W<diameter>". (Requires FILAMENT_WIDTH_SENSOR)
206  * M405 - Enable Filament Sensor flow control. "M405 D<delay_cm>". (Requires FILAMENT_WIDTH_SENSOR)
207  * M406 - Disable Filament Sensor flow control. (Requires FILAMENT_WIDTH_SENSOR)
208  * M407 - Display measured filament diameter in millimeters. (Requires FILAMENT_WIDTH_SENSOR)
209  * M410 - Quickstop. Abort all planned moves.
210  * M412 - Enable / Disable Filament Runout Detection. (Requires FILAMENT_RUNOUT_SENSOR)
211  * M413 - Enable / Disable Power-Loss Recovery. (Requires POWER_LOSS_RECOVERY)
212  * M420 - Enable/Disable Leveling (with current values) S1=enable S0=disable (Requires MESH_BED_LEVELING or ABL)
213  * M421 - Set a single Z coordinate in the Mesh Leveling grid. X<units> Y<units> Z<units> (Requires MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, or AUTO_BED_LEVELING_UBL)
214  * M422 - Set Z Stepper automatic alignment position using probe. X<units> Y<units> A<axis> (Requires Z_STEPPER_AUTO_ALIGN)
215  * M425 - Enable/Disable and tune backlash correction. (Requires BACKLASH_COMPENSATION and BACKLASH_GCODE)
216  * M428 - Set the home_offset based on the current_position. Nearest edge applies. (Disabled by NO_WORKSPACE_OFFSETS or DELTA)
217  * M500 - Store parameters in EEPROM. (Requires EEPROM_SETTINGS)
218  * M501 - Restore parameters from EEPROM. (Requires EEPROM_SETTINGS)
219  * M502 - Revert to the default "factory settings". ** Does not write them to EEPROM! **
220  * M503 - Print the current settings (in memory): "M503 S<verbose>". S0 specifies compact output.
221  * M504 - Validate EEPROM contents. (Requires EEPROM_SETTINGS)
222  * M524 - Abort the current SD print job started with M24. (Requires SDSUPPORT)
223  * M540 - Enable/disable SD card abort on endstop hit: "M540 S<state>". (Requires SD_ABORT_ON_ENDSTOP_HIT)
224  * M569 - Enable stealthChop on an axis. (Requires at least one _DRIVER_TYPE to be TMC2130/2160/2208/2209/5130/5160)
225  * M600 - Pause for filament change: "M600 X<pos> Y<pos> Z<raise> E<first_retract> L<later_retract>". (Requires ADVANCED_PAUSE_FEATURE)
226  * M603 - Configure filament change: "M603 T<tool> U<unload_length> L<load_length>". (Requires ADVANCED_PAUSE_FEATURE)
227  * M605 - Set Dual X-Carriage movement mode: "M605 S<mode> [X<x_offset>] [R<temp_offset>]". (Requires DUAL_X_CARRIAGE)
228  * M665 - Set delta configurations: "M665 H<delta height> L<diagonal rod> R<delta radius> S<segments/s> B<calibration radius> X<Alpha angle trim> Y<Beta angle trim> Z<Gamma angle trim> (Requires DELTA)
229  * M666 - Set/get offsets for delta (Requires DELTA) or dual endstops (Requires [XYZ]_DUAL_ENDSTOPS).
230  * M701 - Load filament (Requires FILAMENT_LOAD_UNLOAD_GCODES)
231  * M702 - Unload filament (Requires FILAMENT_LOAD_UNLOAD_GCODES)
232  * M810-M819 - Define/execute a G-code macro (Requires GCODE_MACROS)
233  * M851 - Set Z probe's XYZ offsets in current units. (Negative values: X=left, Y=front, Z=below)
234  * M852 - Set skew factors: "M852 [I<xy>] [J<xz>] [K<yz>]". (Requires SKEW_CORRECTION_GCODE, and SKEW_CORRECTION_FOR_Z for IJ)
235  * M860 - Report the position of position encoder modules.
236  * M861 - Report the status of position encoder modules.
237  * M862 - Perform an axis continuity test for position encoder modules.
238  * M863 - Perform steps-per-mm calibration for position encoder modules.
239  * M864 - Change position encoder module I2C address.
240  * M865 - Check position encoder module firmware version.
241  * M866 - Report or reset position encoder module error count.
242  * M867 - Enable/disable or toggle error correction for position encoder modules.
243  * M868 - Report or set position encoder module error correction threshold.
244  * M869 - Report position encoder module error.
245  * M876 - Handle Prompt Response. (Requires HOST_PROMPT_SUPPORT and not EMERGENCY_PARSER)
246  * M900 - Get or Set Linear Advance K-factor. (Requires LIN_ADVANCE)
247  * M906 - Set or get motor current in milliamps using axis codes X, Y, Z, E. Report values if no axis codes given. (Requires at least one _DRIVER_TYPE defined as TMC2130/2160/5130/5160/2208/2209/2660 or L6470)
248  * M907 - Set digital trimpot motor current using axis codes. (Requires a board with digital trimpots)
249  * M908 - Control digital trimpot directly. (Requires DAC_STEPPER_CURRENT or DIGIPOTSS_PIN)
250  * M909 - Print digipot/DAC current value. (Requires DAC_STEPPER_CURRENT)
251  * M910 - Commit digipot/DAC value to external EEPROM via I2C. (Requires DAC_STEPPER_CURRENT)
252  * M911 - Report stepper driver overtemperature pre-warn condition. (Requires at least one _DRIVER_TYPE defined as TMC2130/2160/5130/5160/2208/2209/2660)
253  * M912 - Clear stepper driver overtemperature pre-warn condition flag. (Requires at least one _DRIVER_TYPE defined as TMC2130/2160/5130/5160/2208/2209/2660)
254  * M913 - Set HYBRID_THRESHOLD speed. (Requires HYBRID_THRESHOLD)
255  * M914 - Set StallGuard sensitivity. (Requires SENSORLESS_HOMING or SENSORLESS_PROBING)
256  * M916 - L6470 tuning: Increase KVAL_HOLD until thermal warning. (Requires at least one _DRIVER_TYPE L6470)
257  * M917 - L6470 tuning: Find minimum current thresholds. (Requires at least one _DRIVER_TYPE L6470)
258  * M918 - L6470 tuning: Increase speed until max or error. (Requires at least one _DRIVER_TYPE L6470)
259  * M951 - Set Magnetic Parking Extruder parameters. (Requires MAGNETIC_PARKING_EXTRUDER)
260  * M7219 - Control Max7219 Matrix LEDs. (Requires MAX7219_GCODE)
261  *
262  * M360 - SCARA calibration: Move to cal-position ThetaA (0 deg calibration)
263  * M361 - SCARA calibration: Move to cal-position ThetaB (90 deg calibration - steps per degree)
264  * M362 - SCARA calibration: Move to cal-position PsiA (0 deg calibration)
265  * M363 - SCARA calibration: Move to cal-position PsiB (90 deg calibration - steps per degree)
266  * M364 - SCARA calibration: Move to cal-position PSIC (90 deg to Theta calibration position)
267  *
268  * ************ Custom codes - This can change to suit future G-code regulations
269  * G425 - Calibrate using a conductive object. (Requires CALIBRATION_GCODE)
270  * M928 - Start SD logging: "M928 filename.gco". Stop with M29. (Requires SDSUPPORT)
271  * M997 - Perform in-application firmware update
272  * M999 - Restart after being stopped by error
273  *
274  * "T" Codes
275  *
276  * T0-T3 - Select an extruder (tool) by index: "T<n> F<units/min>"
277  *
278  */
279 
280 #include "../inc/MarlinConfig.h"
281 #include "parser.h"
282 
283 #if ENABLED(I2C_POSITION_ENCODERS)
284  #include "../feature/I2CPositionEncoder.h"
285 #endif
286 
288 
289 class GcodeSuite {
290 public:
291 
293 
294  static inline bool axis_is_relative(const AxisEnum a) {
295  if (a == E_AXIS) {
296  if (TEST(axis_relative, E_MODE_REL)) return true;
297  if (TEST(axis_relative, E_MODE_ABS)) return false;
298  }
299  return TEST(axis_relative, a);
300  }
301  static inline void set_relative_mode(const bool rel) {
302  axis_relative = rel ? _BV(REL_X) | _BV(REL_Y) | _BV(REL_Z) | _BV(REL_E) : 0;
303  }
304  static inline void set_e_relative() {
307  }
308  static inline void set_e_absolute() {
311  }
312 
313  #if ENABLED(CNC_WORKSPACE_PLANES)
314  /**
315  * Workspace planes only apply to G2/G3 moves
316  * (and "canned cycles" - not a current feature)
317  */
318  enum WorkspacePlane : char { PLANE_XY, PLANE_ZX, PLANE_YZ };
319  static WorkspacePlane workspace_plane;
320  #endif
321 
322  #define MAX_COORDINATE_SYSTEMS 9
323  #if ENABLED(CNC_COORDINATE_SYSTEMS)
324  static int8_t active_coordinate_system;
325  static xyz_pos_t coordinate_system[MAX_COORDINATE_SYSTEMS];
326  static bool select_coordinate_system(const int8_t _new);
327  #endif
328 
331 
332  static int8_t get_target_extruder_from_command();
333  static int8_t get_target_e_stepper_from_command();
334  static void get_destination_from_command();
335 
336  static void process_parsed_command(const bool no_ok=false);
337  static void process_next_command();
338 
339  // Execute G-code in-place, preserving current G-code parameters
340  static void process_subcommands_now_P(PGM_P pgcode);
341  static void process_subcommands_now(char * gcode);
342 
343  static inline void home_all_axes() { process_subcommands_now_P(PSTR("G28")); }
344 
345  #if ENABLED(HOST_KEEPALIVE_FEATURE)
346  /**
347  * States for managing Marlin and host communication
348  * Marlin sends messages if blocked or busy
349  */
350  enum MarlinBusyState : char {
351  NOT_BUSY, // Not in a handler
352  IN_HANDLER, // Processing a GCode
353  IN_PROCESS, // Known to be blocking command input (as in G29)
354  PAUSED_FOR_USER, // Blocking pending any input
355  PAUSED_FOR_INPUT // Blocking pending text input (concept)
356  };
357 
358  static MarlinBusyState busy_state;
359  static uint8_t host_keepalive_interval;
360 
361  static void host_keepalive();
362 
363  #define KEEPALIVE_STATE(N) REMEMBER(_KA_, gcode.busy_state, gcode.N)
364  #else
365  #define KEEPALIVE_STATE(N) NOOP
366  #endif
367 
368  static void dwell(millis_t time);
369 
370 private:
371 
372  static void G0_G1(
373  #if IS_SCARA || defined(G0_FEEDRATE)
374  const bool fast_move=false
375  #endif
376  );
377 
378  #if ENABLED(ARC_SUPPORT)
379  static void G2_G3(const bool clockwise);
380  #endif
381 
382  static void G4();
383 
384  #if ENABLED(BEZIER_CURVE_SUPPORT)
385  static void G5();
386  #endif
387 
388  #if ENABLED(FWRETRACT)
389  static void G10();
390  static void G11();
391  #endif
392 
393  #if ENABLED(NOZZLE_CLEAN_FEATURE)
394  static void G12();
395  #endif
396 
397  #if ENABLED(CNC_WORKSPACE_PLANES)
398  static void G17();
399  static void G18();
400  static void G19();
401  #endif
402 
403  #if ENABLED(INCH_MODE_SUPPORT)
404  static void G20();
405  static void G21();
406  #endif
407 
408  #if ENABLED(G26_MESH_VALIDATION)
409  static void G26();
410  #endif
411 
412  #if ENABLED(NOZZLE_PARK_FEATURE)
413  static void G27();
414  #endif
415 
416  static void G28(const bool always_home_all);
417 
418  #if HAS_LEVELING
419  #if ENABLED(G29_RETRY_AND_RECOVER)
420  static void G29_with_retry();
421  #define G29_TYPE bool
422  #else
423  #define G29_TYPE void
424  #endif
425  static G29_TYPE G29();
426  #endif
427 
428  #if HAS_BED_PROBE
429  static void G30();
430  #if ENABLED(Z_PROBE_SLED)
431  static void G31();
432  static void G32();
433  #endif
434  #endif
435 
436  #if ENABLED(DELTA_AUTO_CALIBRATION)
437  static void G33();
438  #endif
439 
440  #if ENABLED(Z_STEPPER_AUTO_ALIGN)
441  static void G34();
442  static void M422();
443  #endif
444 
445  #if ENABLED(G38_PROBE_TARGET)
446  static void G38(const int8_t subcode);
447  #endif
448 
449  #if HAS_MESH
450  static void G42();
451  #endif
452 
453  #if ENABLED(CNC_COORDINATE_SYSTEMS)
454  static void G53();
455  static void G54();
456  static void G55();
457  static void G56();
458  static void G57();
459  static void G58();
460  static void G59();
461  #endif
462 
463  #if ENABLED(GCODE_MOTION_MODES)
464  static void G80();
465  #endif
466 
467  static void G92();
468 
469  #if ENABLED(CALIBRATION_GCODE)
470  static void G425();
471  #endif
472 
473  #if HAS_RESUME_CONTINUE
474  static void M0_M1();
475  #endif
476 
477  #if HAS_CUTTER
478  static void M3_M4(const bool is_M4);
479  static void M5();
480  #endif
481 
482  #if ENABLED(COOLANT_CONTROL)
483  #if ENABLED(COOLANT_MIST)
484  static void M7();
485  #endif
486  #if ENABLED(COOLANT_FLOOD)
487  static void M8();
488  #endif
489  static void M9();
490  #endif
491 
492  #if ENABLED(EXTERNAL_CLOSED_LOOP_CONTROLLER)
493  static void M12();
494  #endif
495 
496  #if ENABLED(EXPECTED_PRINTER_CHECK)
497  static void M16();
498  #endif
499 
500  static void M17();
501 
502  static void M18_M84();
503 
504  #if ENABLED(SDSUPPORT)
505  static void M20();
506  static void M21();
507  static void M22();
508  static void M23();
509  static void M24();
510  static void M25();
511  static void M26();
512  static void M27();
513  static void M28();
514  static void M29();
515  static void M30();
516  #endif
517 
518  static void M31();
519 
520  #if ENABLED(SDSUPPORT)
521  static void M32();
522  #if ENABLED(LONG_FILENAME_HOST_SUPPORT)
523  static void M33();
524  #endif
525  #if BOTH(SDCARD_SORT_ALPHA, SDSORT_GCODE)
526  static void M34();
527  #endif
528  #endif
529 
530  static void M42();
531 
532  #if ENABLED(PINS_DEBUGGING)
533  static void M43();
534  #endif
535 
536  #if ENABLED(Z_MIN_PROBE_REPEATABILITY_TEST)
537  static void M48();
538  #endif
539 
540  #if ENABLED(LCD_SET_PROGRESS_MANUALLY)
541  static void M73();
542  #endif
543 
544 #if ENABLED(M73_PRUSA)
545  static void M73_PE();
546 #endif
547 
548  static void M75();
549  static void M76();
550  static void M77();
551 
552  #if ENABLED(PRINTCOUNTER)
553  static void M78();
554  #endif
555 
556  #if HAS_POWER_SWITCH
557  static void M80();
558  #endif
559 
560  static void M81();
561  static void M82();
562  static void M83();
563  static void M85();
564  static void M86();
565  static void M92();
566 
567  #if ENABLED(M100_FREE_MEMORY_WATCHER)
568  static void M100();
569  #endif
570 
571  #if EXTRUDERS
572  static void M104();
573  static void M109();
574  #endif
575 
576  static void M105();
577 
578  #if FAN_COUNT > 0
579  static void M106();
580  static void M107();
581  #endif
582 
583  #if DISABLED(EMERGENCY_PARSER)
584  static void M108();
585  static void M112();
586  static void M410();
587  #if ENABLED(HOST_PROMPT_SUPPORT)
588  static void M876();
589  #endif
590  #endif
591 
592  static void M110();
593  static void M111();
594 
595  #if ENABLED(HOST_KEEPALIVE_FEATURE)
596  static void M113();
597  #endif
598 
599  static void M114();
600  static void M115();
601  static void M117();
602  static void M118();
603  static void M119();
604  static void M120();
605  static void M121();
606 
607  #if ENABLED(PARK_HEAD_ON_PAUSE)
608  static void M125();
609  #endif
610 
611  #if ENABLED(BARICUDA)
612  #if HAS_HEATER_1
613  static void M126();
614  static void M127();
615  #endif
616  #if HAS_HEATER_2
617  static void M128();
618  static void M129();
619  #endif
620  #endif
621 
622  #if HAS_HEATED_BED
623  static void M140();
624  static void M190();
625  #endif
626 
627  #if HAS_HEATED_CHAMBER
628  static void M141();
629  static void M191();
630  #endif
631 
632  #if HOTENDS && HAS_LCD_MENU
633  static void M145();
634  #endif
635 
636  #if ENABLED(TEMPERATURE_UNITS_SUPPORT)
637  static void M149();
638  #endif
639 
640  #if HAS_COLOR_LEDS
641  static void M150();
642  #endif
643 
644  #if ENABLED(AUTO_REPORT_TEMPERATURES) && HAS_TEMP_SENSOR
645  static void M155();
646  #endif
647 
648  #if ENABLED(MIXING_EXTRUDER)
649  static void M163();
650  static void M164();
651  #if ENABLED(DIRECT_MIXING_IN_G1)
652  static void M165();
653  #endif
654  #if ENABLED(GRADIENT_MIX)
655  static void M166();
656  #endif
657  #endif
658 
659  static void M200();
660  static void M201();
661 
662  #if 0
663  static void M202(); // Not used for Sprinter/grbl gen6
664  #endif
665 
666  static void M203();
667  static void M204();
668  static void M205();
669 
670  #if HAS_M206_COMMAND
671  static void M206();
672  #endif
673 
674  #if ENABLED(FWRETRACT)
675  static void M207();
676  static void M208();
677  #if ENABLED(FWRETRACT_AUTORETRACT)
678  static void M209();
679  #endif
680  #endif
681 
682  static void M211();
683 
684  #if EXTRUDERS > 1
685  static void M217();
686  #endif
687 
688  #if HAS_HOTEND_OFFSET
689  static void M218();
690  #endif
691 
692  static void M220();
693 
694  #if EXTRUDERS
695  static void M221();
696  #endif
697 
698  static void M226();
699 
700  #if ENABLED(PHOTO_GCODE)
701  static void M240();
702  #endif
703 
704  #if HAS_LCD_CONTRAST
705  static void M250();
706  #endif
707 
708  #if ENABLED(EXPERIMENTAL_I2CBUS)
709  static void M260();
710  static void M261();
711  #endif
712 
713  #if HAS_SERVOS
714  static void M280();
715  #if ENABLED(EDITABLE_SERVO_ANGLES)
716  static void M281();
717  #endif
718  #endif
719 
720  #if ENABLED(BABYSTEPPING)
721  static void M290();
722  #endif
723 
724  #if HAS_BUZZER
725  static void M300();
726  #endif
727 
728  #if ENABLED(PIDTEMP)
729  static void M301();
730  #endif
731 
732  #if ENABLED(PREVENT_COLD_EXTRUSION)
733  static void M302();
734  #endif
735 
736  #if HAS_PID_HEATING
737  static void M303();
738  #endif
739 
740  #if ENABLED(PIDTEMPBED)
741  static void M304();
742  #endif
743 
744  #if HAS_USER_THERMISTORS
745  static void M305();
746  #endif
747 
748  #if HAS_MICROSTEPS
749  static void M350();
750  static void M351();
751  #endif
752 
753  #if HAS_CASE_LIGHT
754  static void M355();
755  #endif
756 
757  #if ENABLED(MORGAN_SCARA)
758  static bool M360();
759  static bool M361();
760  static bool M362();
761  static bool M363();
762  static bool M364();
763  #endif
764 
765  #if EITHER(EXT_SOLENOID, MANUAL_SOLENOID_CONTROL)
766  static void M380();
767  static void M381();
768  #endif
769 
770  static void M400();
771 
772  #if HAS_BED_PROBE
773  static void M401();
774  static void M402();
775  #endif
776 
777  #if ENABLED(PRUSA_MMU2)
778  static void M403();
779  #endif
780 
781  #if ENABLED(FILAMENT_WIDTH_SENSOR)
782  static void M404();
783  static void M405();
784  static void M406();
785  static void M407();
786  #endif
787 
788  #if HAS_FILAMENT_SENSOR
789  static void M412();
790  #endif
791 
792  #if HAS_LEVELING
793  static void M420();
794  static void M421();
795  #endif
796 
797  #if ENABLED(BACKLASH_GCODE)
798  static void M425();
799  #endif
800 
801  #if HAS_M206_COMMAND
802  static void M428();
803  #endif
804 
805  static void M500();
806  static void M501();
807  static void M502();
808  #if DISABLED(DISABLE_M503)
809  static void M503();
810  #endif
811  #if ENABLED(EEPROM_SETTINGS)
812  static void M504();
813  #endif
814 
815  #if ENABLED(SDSUPPORT)
816  static void M524();
817  #endif
818 
819  #if ENABLED(SD_ABORT_ON_ENDSTOP_HIT)
820  static void M540();
821  #endif
822 
823  #if ENABLED(BAUD_RATE_GCODE)
824  static void M575();
825  #endif
826 
827  #if ENABLED(ADVANCED_PAUSE_FEATURE)
828  static void M600();
829  static void M603();
830  #endif
831 
832  #if HAS_DUPLICATION_MODE
833  static void M605();
834  #endif
835 
836  #if IS_KINEMATIC
837  static void M665();
838  #endif
839 
840  #if ENABLED(DELTA) || HAS_EXTRA_ENDSTOPS
841  static void M666();
842  #endif
843 
844  #if ENABLED(FILAMENT_LOAD_UNLOAD_GCODES)
845  static void M701();
846  static void M702();
847  #endif
848 
849  #if ENABLED(GCODE_MACROS)
850  static void M810_819();
851  #endif
852 
853  #if HAS_BED_PROBE
854  static void M851();
855  #endif
856 
857  #if ENABLED(SKEW_CORRECTION_GCODE)
858  static void M852();
859  #endif
860 
861  #if ENABLED(I2C_POSITION_ENCODERS)
862  FORCE_INLINE static void M860() { I2CPEM.M860(); }
863  FORCE_INLINE static void M861() { I2CPEM.M861(); }
864  FORCE_INLINE static void M862() { I2CPEM.M862(); }
865  FORCE_INLINE static void M863() { I2CPEM.M863(); }
866  FORCE_INLINE static void M864() { I2CPEM.M864(); }
867  FORCE_INLINE static void M865() { I2CPEM.M865(); }
868  FORCE_INLINE static void M866() { I2CPEM.M866(); }
869  FORCE_INLINE static void M867() { I2CPEM.M867(); }
870  FORCE_INLINE static void M868() { I2CPEM.M868(); }
871  FORCE_INLINE static void M869() { I2CPEM.M869(); }
872  #endif
873 
874  #if ENABLED(LIN_ADVANCE)
875  static void M900();
876  #endif
877 
878  #if HAS_TRINAMIC
879  static void M122();
880  static void M906();
881  #if HAS_STEALTHCHOP
882  static void M569();
883  #endif
884  #if ENABLED(MONITOR_DRIVER_STATUS)
885  static void M911();
886  static void M912();
887  #endif
888  #if ENABLED(HYBRID_THRESHOLD)
889  static void M913();
890  #endif
891  #if USE_SENSORLESS
892  static void M914();
893  #endif
894  #endif
895 
896  #if HAS_DRIVER(L6470)
897  static void M122();
898  static void M906();
899  static void M916();
900  static void M917();
901  static void M918();
902  #endif
903 
904  #if HAS_DIGIPOTSS || HAS_MOTOR_CURRENT_PWM || EITHER(DIGIPOT_I2C, DAC_STEPPER_CURRENT)
905  static void M907();
906  #if HAS_DIGIPOTSS || ENABLED(DAC_STEPPER_CURRENT)
907  static void M908();
908  #if ENABLED(DAC_STEPPER_CURRENT)
909  static void M909();
910  static void M910();
911  #endif
912  #endif
913  #endif
914 
915  #if ENABLED(SDSUPPORT)
916  static void M928();
917  #endif
918 
919  #if ENABLED(MAGNETIC_PARKING_EXTRUDER)
920  static void M951();
921  #endif
922 
923  #if ENABLED(PLATFORM_M997_SUPPORT)
924  static void M997();
925  #endif
926 
927  static void M999();
928 
929  #if ENABLED(POWER_LOSS_RECOVERY)
930  static void M413();
931  static void M1000();
932  #endif
933 
934  #if ENABLED(MAX7219_GCODE)
935  static void M7219();
936  #endif
937 
938  static void T(const uint8_t tool_index);
939 
940 };
941 
942 extern GcodeSuite gcode;
delta_clip_start_height
float delta_clip_start_height
enable_solenoid
void enable_solenoid(const uint8_t num)
Definition: solenoid.cpp:75
WITHIN
#define WITHIN(N, L, H)
Definition: macros.h:195
PENDING
#define PENDING(NOW, SOON)
Definition: millis_t.h:28
XYZval::z
T z
Definition: types.h:286
enable_solenoid_on_active_extruder
void enable_solenoid_on_active_extruder()
Definition: solenoid.cpp:77
GET_TEXT
#define GET_TEXT(MSG)
Definition: multi_language.h:72
Planner::set_max_jerk
static void set_max_jerk(const AxisEnum axis, float targetValue)
Definition: planner.cpp:2855
z_values
bed_mesh_t z_values
RAW_Y_POSITION
#define RAW_Y_POSITION(POS)
Definition: motion.h:282
incremental_LSF
void incremental_LSF(struct linear_fit_data *lsf, const float &x, const float &y, const float &z)
Definition: least_squares_fit.h:72
LEDLights::set_color
static void set_color(const LEDColor &color)
SERIAL_CHAR
#define SERIAL_CHAR(x)
Definition: serial.h:69
Y_MIN_POS
#define Y_MIN_POS
Definition: Configuration_A3ides_2209_MINI.h:985
MIXING_VIRTUAL_TOOLS
#define MIXING_VIRTUAL_TOOLS
Definition: mixing.h:47
XYval::asFloat
FI XYval< float > asFloat()
Definition: types.h:201
_sbrk
char * _sbrk(int incr)
Definition: syscalls.c:105
BLTouch::_reset
static FORCE_INLINE void _reset()
Definition: bltouch.h:77
REL_Y
Definition: gcode.h:287
reset_bed_level
void reset_bed_level()
MSG_DEBUG_COMMUNICATION
#define MSG_DEBUG_COMMUNICATION
Definition: language.h:307
delta_segments_per_second
float delta_segments_per_second
NOLESS
#define NOLESS(v, n)
Definition: macros.h:127
NUM_DIGITAL_PINS
constexpr uint16_t NUM_DIGITAL_PINS
Definition: pinmapping.h:32
FilamentWidthSensor::enable
static void enable(const bool ena)
Definition: filwidth.h:43
SET_BIT_TO
#define SET_BIT_TO(N, B, TF)
Definition: macros.h:82
PORT_REDIRECT
#define PORT_REDIRECT(p)
Definition: serial.h:66
unified_bed_leveling::G29
static void G29() _O0
backlash
Backlash backlash
XYZval::a
T a
Definition: types.h:287
XYZEval
Definition: types.h:101
X_CENTER
#define X_CENTER
Definition: Conditionals_post.h:76
linear_fit_data::D
float D
Definition: least_squares_fit.h:40
sq
#define sq(x)
Definition: wiring_constants.h:83
XYZEval::z
T z
Definition: types.h:383
Planner::synchronize
static void synchronize()
Definition: planner.cpp:1556
enable_e_steppers
void enable_e_steppers()
Definition: Marlin.cpp:279
dac_current_raw
void dac_current_raw(uint8_t channel, uint16_t val)
mbl
mesh_bed_leveling mbl
host_action_prompt_end
void host_action_prompt_end()
Definition: marlin_server.cpp:1047
MSG_Z_MOVE_COMP
#define MSG_Z_MOVE_COMP
Definition: language.h:180
FAN1_PIN
#define FAN1_PIN
Definition: pins_AZSMZ_MINI.h:87
axis_limits_t::max
xyz_pos_t max
Definition: motion.h:139
GcodeSuite::set_e_relative
static void set_e_relative()
Definition: gcode.h:304
SERIAL_ECHO
#define SERIAL_ECHO(x)
Definition: serial.h:70
MACHINE_NAME
#define MACHINE_NAME
Definition: Version.h:76
MakeLEDColor
#define MakeLEDColor(R, G, B, W, I)
Definition: leds.h:124
Temperature::hotEnoughToExtrude
static FORCE_INLINE bool hotEnoughToExtrude(const uint8_t e)
Definition: temperature.h:318
marlin_debug_flags
uint8_t marlin_debug_flags
Definition: serial.cpp:26
print_xyz
void print_xyz(const float &x, const float &y, const float &z, PGM_P const prefix, PGM_P const suffix)
Definition: serial.cpp:70
L6470_Marlin::get_status
static uint16_t get_status(const uint8_t axis)
mesh_bed_leveling::index_to_xpos
static float index_to_xpos[GRID_MAX_POINTS_X]
Definition: mesh_bed_leveling.h:43
randomSeed
void randomSeed(uint32_t dwSeed)
Definition: WMath.cpp:25
OUT_WRITE
#define OUT_WRITE(IO, V)
Definition: fastio.h:108
ptr_int_t
uint16_t ptr_int_t
Definition: hex_print_routines.h:46
unified_bed_leveling::adjust_mesh_to_mean
static void adjust_mesh_to_mean(const bool cflag, const float value)
SpindleLaser::set_enabled
static void set_enabled(const bool enable)
Definition: spindle_laser.h:58
planner_settings_t::min_feedrate_mm_s
feedRate_t min_feedrate_mm_s
Definition: planner.h:186
GcodeSuite::process_subcommands_now_P
static void process_subcommands_now_P(PGM_P pgcode)
Definition: gcode.cpp:859
mixer
Mixer mixer
GCodeQueue::flush_and_request_resend
static void flush_and_request_resend()
Definition: queue.cpp:268
GcodeSuite::process_parsed_command
static void process_parsed_command(const bool no_ok=false)
Definition: gcode.cpp:195
MSG_DEBUG_DRYRUN
#define MSG_DEBUG_DRYRUN
Definition: language.h:306
XYZval::x
T x
Definition: types.h:286
G29_RETURN
#define G29_RETURN(b)
Definition: G29.cpp:79
report_M92
void report_M92(const bool echo=true, const int8_t e=-1)
Definition: M92.cpp:26
DEPLOY_PROBE
#define DEPLOY_PROBE()
Definition: probe.h:60
_delay_ms
void _delay_ms(int delay)
Definition: HAL.h:143
strchr_P
const char * strchr_P(const char *s, int c)
Definition: Marduino.h:57
matrix_3x3::create_look_at
static matrix_3x3 create_look_at(const vector_3 &target)
Definition: vector_3.cpp:114
Max7219::fill
static void fill()
axis_limits_t::min
xyz_pos_t min
Definition: motion.h:139
PrintJobRecovery::info
static job_recovery_info_t info
Definition: power_loss_recovery.h:111
MSG_DEBUG_INFO
#define MSG_DEBUG_INFO
Definition: language.h:304
PrintJobRecovery::exists
static bool exists()
Definition: power_loss_recovery.h:145
disable_e_steppers
void disable_e_steppers()
Definition: Marlin.cpp:293
planner_settings_t::max_feedrate_mm_s
feedRate_t max_feedrate_mm_s[XYZE_N]
Definition: planner.h:182
MIXER_DIRECT_SET_TOOL
Definition: mixing.h:54
probe_offset
constexpr xyz_pos_t probe_offset
Definition: probe.h:58
Max7219::clear
static void clear()
GcodeSuite::get_target_extruder_from_command
static int8_t get_target_extruder_from_command()
Definition: gcode.cpp:79
GCodeQueue::ok_to_send
static void ok_to_send()
Definition: queue.cpp:242
NEAR_ZERO
#define NEAR_ZERO(x)
Definition: macros.h:270
Planner::bed_level_matrix
static matrix_3x3 bed_level_matrix
Definition: planner.h:278
MYSERIAL0
#define MYSERIAL0
Definition: HAL.h:89
XYZval::reset
FI void reset()
Definition: types.h:294
L6470_Marlin::spi_abort
static volatile bool spi_abort
Definition: L6470_Marlin.h:44
PROGMEM
#define PROGMEM
Definition: pgmspace.h:29
print_hex_address
void print_hex_address(const void *const w)
Definition: hex_print_routines.cpp:79
E4
Definition: L6470_Marlin.h:30
E1
Definition: L6470_Marlin.h:30
queue
GCodeQueue queue
Definition: queue.cpp:28
FAN2_PIN
#define FAN2_PIN
Definition: pins_CHEAPTRONICv2.h:92
settings
MarlinSettings settings
Definition: configuration_store.cpp:344
LOW
#define LOW
Definition: wiring_constants.h:70
GcodeSuite
Definition: gcode.h:289
PR_OUTER_VAR
#define PR_OUTER_VAR
Definition: G29.cpp:69
X_AXIS
Definition: types.h:37
unified_bed_leveling::display_map
static void display_map(const int) _O0
pin_is_protected
bool pin_is_protected(const pin_t pin)
Definition: Marlin.cpp:258
PR_INNER_VAR
#define PR_INNER_VAR
Definition: G29.cpp:71
RECIPROCAL
#define RECIPROCAL(x)
Definition: macros.h:273
digipot_i2c_set_current
void digipot_i2c_set_current(const uint8_t channel, const float current)
g29_auto.gcode
list gcode
Definition: g29_auto.py:44
INPUT_PULLUP
#define INPUT_PULLUP
Definition: wiring_constants.h:48
DEBUG_EOL
#define DEBUG_EOL()
Definition: debug_out.h:86
Backlash::correction
static constexpr uint8_t correction
Definition: backlash.h:41
DEBUG_ECHOLNPGM
#define DEBUG_ECHOLNPGM(...)
Definition: debug_out.h:79
stepper_inactive_time
millis_t stepper_inactive_time
Definition: Marlin.cpp:197
enable_all_steppers
void enable_all_steppers()
Definition: Marlin.cpp:283
MSG_DEBUG_OFF
#define MSG_DEBUG_OFF
Definition: language.h:302
host_prompt_do
void host_prompt_do(const PromptReason type, const char *const pstr, const char *const pbtn)
Definition: marlin_server.cpp:1103
IS_SD_PRINTING
#define IS_SD_PRINTING()
Definition: cardreader.h:295
stepper
Stepper stepper
Definition: stepper.cpp:82
remember_feedrate_scaling_off
void remember_feedrate_scaling_off()
Definition: motion.cpp:475
planner_settings_t::retract_acceleration
float retract_acceleration
Definition: planner.h:183
MSG_SKEW_MIN
#define MSG_SKEW_MIN
Definition: language.h:201
gcode.h
_MAX
#define _MAX(V...)
Definition: macros.h:346
Planner::get_axis_position_mm
static float get_axis_position_mm(const AxisEnum axis)
Definition: planner.cpp:1526
Planner::max_acceleration_steps_per_s2
static uint32_t max_acceleration_steps_per_s2[XYZE_N]
Definition: planner.h:253
do_blocking_move_to_z
void do_blocking_move_to_z(const float &rz, const feedRate_t &fr_mm_s)
Definition: motion.cpp:450
incremental_LSF_reset
void incremental_LSF_reset(struct linear_fit_data *lsf)
Definition: least_squares_fit.h:47
REL_X
Definition: gcode.h:287
print_job_timer
Stopwatch print_job_timer
Definition: printcounter.cpp:63
Planner::leveling_active
static bool leveling_active
Definition: planner.h:276
SERIAL_ECHOPAIR
#define SERIAL_ECHOPAIR(V...)
Definition: serial.h:114
mesh_bed_leveling::probe_index_x
static int8_t probe_index_x(const float &x)
Definition: mesh_bed_leveling.h:88
type
uint8_t type
Definition: UsbCore.h:184
do_blocking_move_to_xy
void do_blocking_move_to_xy(const float &rx, const float &ry, const feedRate_t &fr_mm_s)
Definition: motion.cpp:454
g29_auto.start
start
Definition: g29_auto.py:150
E0
Definition: L6470_Marlin.h:30
servo
HAL_SERVO_LIB servo[NUM_SERVOS]
extDigitalRead
#define extDigitalRead(IO)
Definition: fastio.h:92
vector_3::get_normal
vector_3 get_normal() const
Definition: vector_3.cpp:61
mesh_bed_leveling::zigzag
static void zigzag(const int8_t index, int8_t &px, int8_t &py)
Definition: mesh_bed_leveling.h:63
MARLIN_DEBUG_LEVELING
Definition: serial.h:40
PrintJobRecovery::resume
static void resume()
Z_HOME_DIR
#define Z_HOME_DIR
Definition: Configuration_A3ides_2209_MINI.h:975
Planner::calculate_volumetric_multipliers
static void calculate_volumetric_multipliers()
disable_Z
#define disable_Z()
Definition: Marlin.h:143
MSG_ERR_MESH_XY
#define MSG_ERR_MESH_XY
Definition: language.h:206
Endstops::validate_homing_move
static FORCE_INLINE void validate_homing_move()
Definition: endstops.h:144
Stepper::set_z2_lock
static FORCE_INLINE void set_z2_lock(const bool state)
Definition: stepper.h:422
dtostrf
char * dtostrf(double __val, signed char __width, unsigned char __prec, char *__s)
L6470_Marlin::error_status_decode
static void error_status_decode(const uint16_t status, const uint8_t axis)
E_MODE_ABS
Definition: gcode.h:287
PGM_P
#define PGM_P
Definition: pgmspace.h:30
XYZEval::e
T e
Definition: types.h:383
Mixer::set_collector
static FORCE_INLINE void set_collector(const uint8_t c, const float f)
Definition: mixing.h:106
set_axis_is_at_home
void set_axis_is_at_home(const AxisEnum axis)
Definition: motion.cpp:1361
G26_CLICK_CAN_CANCEL
#define G26_CLICK_CAN_CANCEL
Definition: temperature.h:155
mesh_bed_leveling::reset
static void reset()
I2CPEM
I2CPositionEncodersMgr I2CPEM
HYPOT2
#define HYPOT2(x, y)
Definition: macros.h:100
print_hex_byte
void print_hex_byte(const uint8_t b)
Definition: hex_print_routines.cpp:77
MSG_BUSY_PAUSED_FOR_INPUT
#define MSG_BUSY_PAUSED_FOR_INPUT
Definition: language.h:179
i
uint8_t i
Definition: screen_test_graph.c:72
SERIAL_ECHOLNPAIR_F
#define SERIAL_ECHOLNPAIR_F(V...)
Definition: serial.h:177
unified_bed_leveling::storage_slot
static int8_t storage_slot
Definition: ubl.h:106
_MIN
#define _MIN(V...)
Definition: macros.h:333
STRINGIFY
#define STRINGIFY(M)
Definition: macros.h:73
Y
Definition: L6470_Marlin.h:30
L6470_ERROR_MASK
#define L6470_ERROR_MASK
Definition: L6470_Marlin.h:32
GcodeSuite::previous_move_ms
static millis_t previous_move_ms
Definition: gcode.h:329
leveling_is_valid
bool leveling_is_valid()
max
#define max(a, b)
Definition: wiring_constants.h:40
state
static volatile fsensor_t state
Definition: filament_sensor.c:23
FIL_RUNOUT2_PIN
#define FIL_RUNOUT2_PIN
Definition: pins_GT2560_V3.h:83
GET_PIN_MAP_PIN
pin_t GET_PIN_MAP_PIN(const int16_t ind)
Endstops::enable
static void enable(const bool onoff=true)
Definition: endstops.cpp:291
unscalePID_d
#define unscalePID_d(d)
Definition: temperature.h:152
AxisEnum
AxisEnum
Definition: types.h:36
I2CPositionEncodersMgr::M865
static void M865()
disable_Y
#define disable_Y()
Definition: Marlin.h:104
destination
xyze_pos_t destination
Definition: motion.cpp:110
BED_MAXTEMP
#define BED_MAXTEMP
Definition: Configuration_A3ides_2209_MINI.h:396
kill
void kill(PGM_P const lcd_error, PGM_P const lcd_component, const bool steppers_off)
Definition: Marlin.cpp:718
Max7219::led_toggle
static void led_toggle(const uint8_t x, const uint8_t y)
millis
uint32_t millis(void)
Definition: wiring_time.c:29
SUICIDE_PIN
#define SUICIDE_PIN
Definition: pins_GT2560_REV_A.h:95
Backlash::has_any_measurement
static bool has_any_measurement()
Definition: backlash.h:80
enable_Z
#define enable_Z()
Definition: Marlin.h:142
protected_pin_err
void protected_pin_err()
Definition: Marlin.cpp:268
CIRCLE_AREA
#define CIRCLE_AREA(R)
Definition: macros.h:102
SET_OUTPUT
#define SET_OUTPUT(IO)
Definition: fastio.h:101
PrintJobRecovery::queue_index_r
static uint8_t queue_index_r
Queue index of the active command.
Definition: power_loss_recovery.h:113
linear_fit_data
Definition: least_squares_fit.h:39
LIMIT
#define LIMIT(v, n1, n2)
Definition: macros.h:139
NEAR
#define NEAR(x, y)
Definition: macros.h:271
PrintJobRecovery::purge
static void purge()
max7219
Max7219 max7219
xy_pos_t
xy_float_t xy_pos_t
Definition: types.h:159
PLANNER_XY_FEEDRATE
#define PLANNER_XY_FEEDRATE()
Definition: planner.h:969
__bss_end
#define __bss_end
Definition: HAL.h:147
DEBUG_ECHOLNPAIR
#define DEBUG_ECHOLNPAIR(...)
Definition: debug_out.h:82
recovery
PrintJobRecovery recovery
SERIAL_ECHO_START
#define SERIAL_ECHO_START()
Definition: serial.h:179
Stopwatch::stop
static bool stop()
Stop the stopwatch.
Definition: stopwatch.cpp:36
max_inactive_time
millis_t max_inactive_time
Definition: Marlin.cpp:196
SERIAL_ECHOLN
#define SERIAL_ECHOLN(x)
Definition: serial.h:72
DEBUG_ECHO_START
#define DEBUG_ECHO_START()
Definition: debug_out.h:72
MSG_ERR_M420_FAILED
#define MSG_ERR_M420_FAILED
Definition: language.h:209
linear_fit_data::B
float B
Definition: least_squares_fit.h:40
delta_height
float delta_height
feedRate_t
float feedRate_t
Definition: types.h:80
Z3
Definition: L6470_Marlin.h:30
sprintf_P
#define sprintf_P(s,...)
Definition: pgmspace.h:72
BLTouch::_stow
static FORCE_INLINE void _stow()
Definition: bltouch.h:89
XYZval::set
FI void set(const T px)
Definition: types.h:290
soft_endstops_enabled
bool soft_endstops_enabled
Definition: motion.cpp:486
SERIAL_ECHO_SP
#define SERIAL_ECHO_SP(C)
Definition: serial.h:186
set_closedloop
void set_closedloop(const byte val)
KEEPALIVE_STATE
#define KEEPALIVE_STATE(N)
Definition: gcode.h:365
mmu2
MMU2 mmu2
pgm_read_ptr
#define pgm_read_ptr(addr)
Definition: pgmspace.h:113
extruder_duplication_enabled
bool extruder_duplication_enabled
Definition: motion.cpp:876
I2CPositionEncodersMgr::M860
static void M860()
REAL
Definition: ubl.h:35
PWM_PIN
bool PWM_PIN(const pin_t p)
skew_factor_t::yz
const float yz
Definition: planner.h:206
MSG_ZPROBE_OUT_SER
#define MSG_ZPROBE_OUT_SER
Definition: language.h:298
strlen_P
#define strlen_P(s)
Definition: pgmspace.h:61
mesh_bed_leveling::report_mesh
static void report_mesh()
Max7219::led_set
static void led_set(const uint8_t x, const uint8_t y, const bool on)
scalePID_d
#define scalePID_d(d)
Definition: temperature.h:151
delta_endstop_adj
abc_float_t delta_endstop_adj
MarlinSettings::save
static bool save()
Definition: configuration_store.cpp:2198
MarlinSettings::reset
static void reset()
Definition: configuration_store.cpp:2208
AxisRelative
AxisRelative
Definition: gcode.h:287
mesh_bed_leveling::z_values
static float z_values[GRID_MAX_POINTS_X][GRID_MAX_POINTS_Y]
Definition: mesh_bed_leveling.h:43
COOLANT_MIST_PIN
#define COOLANT_MIST_PIN
Definition: pins_RAMBO.h:159
homing_needed
FORCE_INLINE bool homing_needed()
Definition: motion.h:49
wait_for_user
bool wait_for_user
Definition: Marlin.cpp:188
DEBUG_ECHOPGM
#define DEBUG_ECHOPGM(...)
Definition: debug_out.h:78
cutter
SpindleLaser cutter
Definition: spindle_laser.cpp:33
Z
Definition: L6470_Marlin.h:30
Running
bool Running
Definition: Marlin.cpp:181
E_MODE_REL
Definition: gcode.h:287
strcpy_P
#define strcpy_P(dest, src)
Definition: pgmspace.h:56
LINEAR_UNIT
#define LINEAR_UNIT(V)
Definition: parser.h:299
MAX7219_LINES
#define MAX7219_LINES
Definition: Max7219_Debug_LEDs.h:53
X_MIN_POS
#define X_MIN_POS
Definition: Configuration_A3ides_2209_MINI.h:984
NOMORE
#define NOMORE(v, n)
Definition: macros.h:133
createSpeedLookupTable.end
end
Definition: createSpeedLookupTable.py:33
PR_INNER_END
#define PR_INNER_END
Definition: G29.cpp:72
BLTouch::_set_SW_mode
static FORCE_INLINE void _set_SW_mode()
Definition: bltouch.h:81
Z_MAX_POS
#define Z_MAX_POS
Definition: Configuration_A3ides_2209_MINI.h:989
SET_INPUT_PULLUP
#define SET_INPUT_PULLUP(IO)
Definition: fastio.h:100
MOVE_SERVO
#define MOVE_SERVO(I, P)
Definition: servo.h:93
disable_all_solenoids
void disable_all_solenoids()
Definition: solenoid.cpp:79
MSG_DEBUG_PREFIX
#define MSG_DEBUG_PREFIX
Definition: language.h:301
Backlash::distance_mm
static const xyz_float_t distance_mm
Definition: backlash.h:42
RAW_Z_POSITION
#define RAW_Z_POSITION(POS)
Definition: motion.h:283
pin_t
int8_t pin_t
Definition: HAL.h:65
ABS
#define ABS(a)
Definition: macros.h:266
unified_bed_leveling::find_closest_mesh_point_of_type
static mesh_index_pair find_closest_mesh_point_of_type(const MeshPointType, const xy_pos_t &, const bool=false, MeshFlags *done_flags=nullptr) _O0
Endstops::not_homing
static void not_homing()
Definition: endstops.cpp:297
Y_CENTER
#define Y_CENTER
Definition: Conditionals_post.h:77
random
long random(long howbig)
Definition: WMath.cpp:31
MSG_BUSY_PAUSED_FOR_USER
#define MSG_BUSY_PAUSED_FOR_USER
Definition: language.h:178
E_AXIS_N
#define E_AXIS_N(E)
Definition: Conditionals_LCD.h:454
all_axes_known
FORCE_INLINE bool all_axes_known()
Definition: motion.h:45
MSG_INVALID_E_STEPPER
#define MSG_INVALID_E_STEPPER
Definition: language.h:168
MSG_DEBUG_ECHO
#define MSG_DEBUG_ECHO
Definition: language.h:303
queue.h
ZERO
#define ZERO(a)
Definition: macros.h:201
DIGIPOT_I2C_NUM_CHANNELS
#define DIGIPOT_I2C_NUM_CHANNELS
Definition: Configuration_A3ides_2209_MINI_adv.h:700
bltouch
BLTouch bltouch
PrintJobRecovery::valid
static bool valid()
Definition: power_loss_recovery.h:167
Planner::refresh_positioning
static void refresh_positioning()
Definition: planner.cpp:2806
GCodeQueue::command_buffer
static char command_buffer[BUFSIZE][MAX_CMD_SIZE]
Definition: queue.h:54
prepare_internal_move_to_destination
void prepare_internal_move_to_destination(const feedRate_t &fr_mm_s=0.0f)
Definition: motion.h:186
delta_diagonal_rod
float delta_diagonal_rod
FORCE_INLINE
#define FORCE_INLINE
Definition: macros.h:40
Planner::finish_and_disable
static void finish_and_disable()
Definition: planner.cpp:1517
Y_MAX_POS
#define Y_MAX_POS
Definition: Configuration_A3ides_2209_MINI.h:988
SERIAL_ECHO_MSG
#define SERIAL_ECHO_MSG(S)
Definition: serial.h:183
XYZval::b
T b
Definition: types.h:287
RADIANS
#define RADIANS(d)
Definition: macros.h:98
tool_change
void tool_change(const uint8_t new_tool, bool no_move)
Definition: tool_change.cpp:771
PSTR
#define PSTR(str)
Definition: pgmspace.h:31
set_bed_leveling_enabled
void set_bed_leveling_enabled(const bool enable=true)
GcodeSuite::set_e_absolute
static void set_e_absolute()
Definition: gcode.h:308
bilinear_start
xy_int_t bilinear_start
L6470
L6470_Marlin L6470
current_position
xyze_pos_t current_position
Definition: motion.cpp:102
case_light_on
bool case_light_on
Definition: caselight.cpp:28
feedrate_percentage
int16_t feedrate_percentage
Definition: motion.cpp:139
E3
Definition: L6470_Marlin.h:30
recalc_delta_settings
void recalc_delta_settings()
CASE_LIGHT_PIN
#define CASE_LIGHT_PIN
Definition: pins_GT2560_V3.h:144
XYval::set
FI void set(const T px)
Definition: types.h:189
COOLANT_FLOOD_PIN
#define COOLANT_FLOOD_PIN
Definition: pins_RAMBO.h:160
position_is_reachable
bool position_is_reachable(const float &rx, const float &ry)
Definition: motion.h:325
SpindleLaser::set_power
static void set_power(const cutter_power_t pwr)
Definition: spindle_laser.h:54
neo
Marlin_NeoPixel neo
min
#define min(a, b)
Definition: wiring_constants.h:36
I2CPositionEncodersMgr::M867
static void M867()
Stepper::digipot_current
static void digipot_current(const uint8_t driver, const int16_t current)
Definition: stepper.cpp:2495
NUMBER_PINS_TOTAL
#define NUMBER_PINS_TOTAL
Definition: pinsDebug.h:27
XYZE_PARAM
#define XYZE_PARAM
MeshReport
Definition: mesh_bed_leveling.h:27
LROUND
#define LROUND(x)
Definition: macros.h:285
Z_CLEARANCE_BETWEEN_PROBES
#define Z_CLEARANCE_BETWEEN_PROBES
Definition: Configuration_A3ides_2209_MINI.h:893
dac_commit_eeprom
void dac_commit_eeprom()
E2
Definition: L6470_Marlin.h:30
X2
Definition: L6470_Marlin.h:30
RAW_X_POSITION
#define RAW_X_POSITION(POS)
Definition: motion.h:281
ar_init
static constexpr xyze_bool_t ar_init
Definition: gcode.cpp:53
LOGICAL_TO_NATIVE
#define LOGICAL_TO_NATIVE(POS, AXIS)
Definition: motion.h:270
apply_rotation_xyz
void apply_rotation_xyz(const matrix_3x3 &matrix, float &_x, float &_y, float &_z)
Definition: vector_3.cpp:88
PR_OUTER_END
#define PR_OUTER_END
Definition: G29.cpp:70
SpindleLaser::set_direction
static void set_direction(const bool)
Definition: spindle_laser.h:85
MarlinSettings::report
static FORCE_INLINE void report(const bool=false)
Definition: configuration_store.h:88
COUNT
#define COUNT(a)
Definition: macros.h:200
I2CPositionEncodersMgr::M864
static void M864()
line_to_current_position
void line_to_current_position(const feedRate_t &fr_mm_s)
Definition: motion.cpp:285
OUTPUT
#define OUTPUT
Definition: wiring_constants.h:47
set_current_from_steppers_for_axis
void set_current_from_steppers_for_axis(const AxisEnum axis)
Definition: motion.cpp:263
filwidth
FilamentWidthSensor filwidth
MSG_DEBUG_ERRORS
#define MSG_DEBUG_ERRORS
Definition: language.h:305
do_blocking_move_to
void do_blocking_move_to(const float rx, const float ry, const float rz, const feedRate_t &fr_mm_s)
Definition: motion.cpp:344
MeshSetZOffset
Definition: mesh_bed_leveling.h:31
FilamentWidthSensor::nominal_mm
static float nominal_mm
Definition: filwidth.h:33
GCodeQueue::index_r
static uint8_t index_r
Definition: queue.h:51
Stepper::set_directions
static void set_directions()
Definition: stepper.cpp:354
serialprintln_onoff
void serialprintln_onoff(const bool onoff)
Definition: serial.cpp:58
sync_plan_position
void sync_plan_position()
Definition: motion.cpp:216
LOOP_L_N
#define LOOP_L_N(VAR, N)
Definition: types.h:58
unscalePID_i
#define unscalePID_i(i)
Definition: temperature.h:150
LOOP_XYZ
#define LOOP_XYZ(VAR)
Definition: types.h:60
isnan
#define isnan
Definition: Arduino.h:55
planner_settings_t::travel_acceleration
float travel_acceleration
Definition: planner.h:183
MeshNext
Definition: mesh_bed_leveling.h:29
GcodeSuite::dwell
static void dwell(millis_t time)
Definition: gcode.cpp:149
gcode
GcodeSuite gcode
Definition: gcode.cpp:29
UNUSED_E
#define UNUSED_E(E)
Definition: Conditionals_LCD.h:455
FLOOR
#define FLOOR(x)
Definition: macros.h:284
planner_settings_t::axis_steps_per_mm
float axis_steps_per_mm[XYZE_N]
Definition: planner.h:181
MSG_ERR_M421_PARAMETERS
#define MSG_ERR_M421_PARAMETERS
Definition: language.h:204
MSG_HOTEND_OFFSET
#define MSG_HOTEND_OFFSET
Definition: language.h:217
bilinear_grid_spacing
xy_int_t bilinear_grid_spacing
DISABLED
#define DISABLED(V...)
Definition: macros.h:178
sync_plan_position_e
void sync_plan_position_e()
Definition: motion.cpp:221
GcodeSuite::home_all_axes
static void home_all_axes()
Definition: gcode.h:343
ExtUI::onMeshUpdate
void onMeshUpdate(const uint8_t xpos, const uint8_t ypos, const float zval)
Definition: marlin_server.cpp:945
position_is_reachable_by_probe
FORCE_INLINE bool position_is_reachable_by_probe(const xy_int_t &pos)
Definition: motion.h:358
X_BED_SIZE
#define X_BED_SIZE
Definition: Configuration_A3ides_2209_MINI.h:980
INPUT
#define INPUT
Definition: wiring_constants.h:46
void
void
Definition: png.h:1083
Backlash::get_measurement
static float get_measurement(const AxisEnum a)
Definition: backlash.h:56
probe_min_x
float probe_min_x()
Definition: probe.h:103
GcodeSuite::axis_is_relative
static bool axis_is_relative(const AxisEnum a)
Definition: gcode.h:294
XYZval::asLogical
FI XYZval< float > asLogical() const
Definition: types.h:307
runout
FilamentMonitor runout
vector_3::cross
static vector_3 cross(const vector_3 &a, const vector_3 &b)
Definition: vector_3.cpp:54
TFilamentMonitor::reset
static void reset()
Definition: runout.h:76
report_pin_state_extended
void report_pin_state_extended(pin_t pin, bool ignore, bool extended=false, const char *start_string="")
Definition: pinsDebug.h:112
BLTouch::_deploy
static FORCE_INLINE void _deploy()
Definition: bltouch.h:88
XY_PROBE_SPEED
#define XY_PROBE_SPEED
Definition: Configuration_A3ides_2209_MINI.h:865
MSG_DEBUG_LEVELING
#define MSG_DEBUG_LEVELING
Definition: language.h:308
HEATER_0_MAXTEMP
#define HEATER_0_MAXTEMP
Definition: Configuration_A3ides_2209_MINI.h:390
planner_settings_t::acceleration
float acceleration
Definition: planner.h:183
XYZEval::x
T x
Definition: types.h:383
constrain
#define constrain(amt, low, high)
Definition: wiring_constants.h:79
baricuda_valve_pressure
uint8_t baricuda_valve_pressure
MSG_SOFT_ENDSTOPS
#define MSG_SOFT_ENDSTOPS
Definition: language.h:219
SERIAL_ECHO_F
#define SERIAL_ECHO_F(V...)
Definition: serial.h:71
ALL_AXES
Definition: types.h:48
WRITE
#define WRITE(IO, V)
Definition: fastio.h:96
planner_settings_t::max_acceleration_mm_per_s2
uint32_t max_acceleration_mm_per_s2[XYZE_N]
Definition: planner.h:179
Stepper::microstep_ms
static void microstep_ms(const uint8_t driver, const int8_t ms1, const int8_t ms2, const int8_t ms3)
Definition: stepper.cpp:2701
SERIAL_ECHOPGM
#define SERIAL_ECHOPGM(S)
Definition: serial.h:173
Z_MIN_PROBE_ENDSTOP_INVERTING
#define Z_MIN_PROBE_ENDSTOP_INVERTING
Definition: Configuration_A3ides_2209_MINI.h:611
Planner::reset_acceleration_rates
static void reset_acceleration_rates()
Definition: planner.cpp:2788
L6470_Marlin::set_param
static void set_param(uint8_t axis, uint8_t param, uint32_t value)
HOST_ACTION_COMMANDS
#define HOST_ACTION_COMMANDS
Definition: Configuration_A3ides_2209_MINI_adv.h:2118
Planner::buffer_line
static bool buffer_line(const float &rx, const float &ry, const float &rz, const float &e, const feedRate_t &fr_mm_s, const uint8_t extruder, const float millimeters=0.0)
Definition: planner.cpp:2663
feedrate_mm_s
feedRate_t feedrate_mm_s
Definition: motion.cpp:138
GET_PIN_MAP_INDEX
int16_t GET_PIN_MAP_INDEX(const pin_t pin)
if
if(size<=((png_alloc_size_t) -1) - ob)
Definition: pngwrite.c:2176
mesh_bed_leveling::set_z
static void set_z(const int8_t px, const int8_t py, const float &z)
Definition: mesh_bed_leveling.h:61
MSG_BUSY_PROCESSING
#define MSG_BUSY_PROCESSING
Definition: language.h:177
NUM_SERIAL
#define NUM_SERIAL
Definition: HAL.h:100
Stepper::digitalPotWrite
static void digitalPotWrite(const int16_t address, const int16_t value)
SERIAL_ECHOLNPAIR
#define SERIAL_ECHOLNPAIR(V...)
Definition: serial.h:144
get_homing_bump_feedrate
feedRate_t get_homing_bump_feedrate(const AxisEnum axis)
Definition: motion.cpp:1076
L6470_Marlin::get_user_input
static bool get_user_input(uint8_t &driver_count, uint8_t axis_index[3], char axis_mon[3][3], float &position_max, float &position_min, float &final_feedrate, uint8_t &kval_hold, bool over_current_flag, uint8_t &OCD_TH_val, uint8_t &STALL_TH_val, uint16_t &over_current_threshold)
enable_X
#define enable_X()
Definition: Marlin.h:76
XYval
Definition: types.h:99
createSpeedLookupTable.a
list a
Definition: createSpeedLookupTable.py:29
enable_Y
#define enable_Y()
Definition: Marlin.h:103
PrintJobRecovery::load
static void load()
HOTEND_LOOP
#define HOTEND_LOOP()
Definition: Conditionals_LCD.h:436
_GET_MESH_X
#define _GET_MESH_X(I)
Definition: abl.h:43
scalePID_i
#define scalePID_i(i)
Definition: temperature.h:149
Marlin_NeoPixel::brightness
static uint8_t brightness()
Definition: neopixel.h:114
linear_fit_data::A
float A
Definition: least_squares_fit.h:40
LED_PIN
#define LED_PIN
Definition: pins_RAMPS_LINUX.h:208
matrix_3x3::debug
void debug(PGM_P const title)
Definition: vector_3.cpp:139
probe_max_x
float probe_max_x()
Definition: probe.h:104
MOTION_CONDITIONS
#define MOTION_CONDITIONS
Definition: motion.h:233
Stepper::set_separate_multi_axis
static FORCE_INLINE void set_separate_multi_axis(const bool state)
Definition: stepper.h:410
axis_known_position
uint8_t axis_known_position
Definition: motion.cpp:91
XYZEval::set
FI void set(const T px)
Definition: types.h:391
SQRT
#define SQRT(x)
Definition: macros.h:281
XYval::x
T x
Definition: types.h:185
PHOTOGRAPH_PIN
#define PHOTOGRAPH_PIN
Definition: pins_ELEFU_3.h:103
MIXER_STEPPER_LOOP
#define MIXER_STEPPER_LOOP(VAR)
Definition: mixing.h:68
M43_NEVER_TOUCH
#define M43_NEVER_TOUCH(Q)
Definition: pinsDebug.h:39
MSG_ERR_Z_HOMING_SER
#define MSG_ERR_Z_HOMING_SER
Definition: language.h:245
FMOD
#define FMOD(x, y)
Definition: macros.h:286
DEBUG_POS
#define DEBUG_POS(...)
Definition: debug_out.h:87
Temperature::disable_all_heaters
static void disable_all_heaters()
Definition: temperature.cpp:1926
Endstops::z2_endstop_adj
static float z2_endstop_adj
Definition: endstops.h:51
Max7219::register_setup
static void register_setup()
MSG_SKEW_MAX
#define MSG_SKEW_MAX
Definition: language.h:202
XYval::asInt
FI XYval< int16_t > asInt()
Definition: types.h:197
probe_min_y
float probe_min_y()
Definition: probe.h:105
REL_Z
Definition: gcode.h:287
uint8_t
const uint8_t[]
Definition: 404_html.c:3
Mixer::normalize
static void normalize(const uint8_t tool_index)
job_recovery_info_t::valid_head
uint8_t valid_head
Definition: power_loss_recovery.h:44
update_case_light
void update_case_light()
Definition: caselight.cpp:54
bilinear_z_offset
float bilinear_z_offset(const xy_pos_t &raw)
ABL_VAR
#define ABL_VAR
mirrored_duplication_mode
bool mirrored_duplication_mode
Definition: motion.cpp:876
print_bilinear_leveling_grid
void print_bilinear_leveling_grid()
mesh_bed_leveling::z_offset
static float z_offset
Definition: mesh_bed_leveling.h:43
axis_unhomed_error
bool axis_unhomed_error(uint8_t axis_bits)
Definition: motion.cpp:1054
skew_factor_t::xz
const float xz
Definition: planner.h:206
GcodeSuite::set_relative_mode
static void set_relative_mode(const bool rel)
Definition: gcode.h:301
delta_tower_angle_trim
abc_float_t delta_tower_angle_trim
ui
MarlinUI ui
G29_TYPE
#define G29_TYPE
Definition: gcode.h:423
GcodeSuite::get_destination_from_command
static void get_destination_from_command()
Definition: gcode.cpp:115
MeshLevelingState
MeshLevelingState
Definition: mesh_bed_leveling.h:26
hex_byte
char * hex_byte(const uint8_t b)
Definition: hex_print_routines.cpp:38
HYPOT
#define HYPOT(x, y)
Definition: macros.h:287
Planner::force_unapply_leveling
static FORCE_INLINE void force_unapply_leveling(xyz_pos_t &raw)
Definition: planner.h:484
MSG_DUPLICATION_MODE
#define MSG_DUPLICATION_MODE
Definition: language.h:218
BLTouch::init
static void init(const bool set_voltage=false)
_BV
#define _BV(bit)
Definition: wiring_constants.h:99
Z2
Definition: L6470_Marlin.h:30
unified_bed_leveling::mesh_is_valid
static bool mesh_is_valid()
Definition: ubl.h:300
E_STEPPERS
#define E_STEPPERS
Definition: Conditionals_LCD.h:429
finish_incremental_LSF
int finish_incremental_LSF(struct linear_fit_data *lsf)
Definition: least_squares_fit.cpp:43
dac_print_values
void dac_print_values()
restore_stepper_drivers
void restore_stepper_drivers()
Definition: indirection.cpp:35
MeshSet
Definition: mesh_bed_leveling.h:30
DEBUG_ECHO
#define DEBUG_ECHO(...)
Definition: debug_out.h:75
TEENSY_E2
#define TEENSY_E2
Definition: fastio_AT90USB.h:383
L6470_Marlin::spi_active
static bool spi_active
Definition: L6470_Marlin.h:45
XYZval::y
T y
Definition: types.h:286
extrapolate_unprobed_bed_level
void extrapolate_unprobed_bed_level()
Planner::steps_to_mm
static float steps_to_mm[XYZE_N]
Definition: planner.h:254
DEFAULT_NOMINAL_FILAMENT_DIA
#define DEFAULT_NOMINAL_FILAMENT_DIA
Definition: Configuration_A3ides_2209_MINI.h:151
delay
void delay(uint32_t ms)
Definition: wiring_time.c:42
Planner::cleaning_buffer_counter
static uint16_t cleaning_buffer_counter
Definition: planner.h:231
print_bin
void print_bin(const uint16_t val)
Definition: serial.cpp:61
IS_SCARA
#define IS_SCARA
Definition: Conditionals_LCD.h:544
g29_in_progress
constexpr bool g29_in_progress
Definition: bedlevel.h:29
inverse_kinematics
void inverse_kinematics(const xyz_pos_t &raw)
mesh_bed_leveling::index_to_ypos
static float index_to_ypos[GRID_MAX_POINTS_Y]
Definition: mesh_bed_leveling.h:43
FilamentWidthSensor::set_delay_cm
static void set_delay_cm(const uint8_t cm)
Definition: filwidth.h:45
SERIAL_ERROR_MSG
#define SERIAL_ERROR_MSG(S)
Definition: serial.h:184
restore_feedrate_and_scaling
void restore_feedrate_and_scaling()
Definition: motion.cpp:479
homing_feedrate
FORCE_INLINE feedRate_t homing_feedrate(const AxisEnum a)
Definition: motion.h:93
X_MAX_POS
#define X_MAX_POS
Definition: Configuration_A3ides_2209_MINI.h:987
Y_AXIS
Definition: types.h:38
disable_X
#define disable_X()
Definition: Marlin.h:77
CBI
#define CBI(A, B)
Definition: macros.h:89
PrintJobRecovery::save
static void save(const bool force=false, const bool save_queue=true)
SERIAL_FLUSH
#define SERIAL_FLUSH()
Definition: serial.h:76
Mixer::T
static FORCE_INLINE void T(const uint_fast8_t c)
Definition: mixing.h:113
Y_BED_SIZE
#define Y_BED_SIZE
Definition: Configuration_A3ides_2209_MINI.h:981
hotend_offset
constexpr xyz_pos_t hotend_offset[1]
Definition: motion.h:136
gcode
GcodeSuite gcode
Definition: g29_auto.py:44
read
static int read(struct _reent *_r, void *pv, char *pc, int n)
Definition: gcode_file.cpp:9
ubl
unified_bed_leveling ubl
L6470_Marlin::get_param
static uint32_t get_param(uint8_t axis, uint8_t param)
I2CPositionEncodersMgr::M863
static void M863()
parser.h
dac_current_percent
void dac_current_percent(uint8_t channel, float val)
ALL
#define ALL(V...)
Definition: macros.h:182
Z_MIN_PROBE_PIN
#define Z_MIN_PROBE_PIN
Definition: pins_RAMPS_LINUX.h:86
FAN0_PIN
#define FAN0_PIN
Definition: pins_CNCONTROLS_15.h:67
MAX_COORDINATE_SYSTEMS
#define MAX_COORDINATE_SYSTEMS
Definition: gcode.h:322
TEENSY_E3
#define TEENSY_E3
Definition: fastio_AT90USB.h:384
Z_AXIS
Definition: types.h:39
SERIAL_ERROR_START
#define SERIAL_ERROR_START()
Definition: serial.h:180
Max7219::set_column
static void set_column(const uint8_t col, const uint32_t val)
EXTRUDERS
#define EXTRUDERS
Definition: Configuration_A3ides_2209_MINI.h:148
apply_motion_limits
void apply_motion_limits(xyz_pos_t &target)
Definition: motion.cpp:589
DEBUGGING
#define DEBUGGING(F)
Definition: serial.h:47
DEFAULT_KEEPALIVE_INTERVAL
#define DEFAULT_KEEPALIVE_INTERVAL
Definition: Configuration_A3ides_2209_MINI.h:1356
report_current_position
void report_current_position()
Definition: motion.cpp:199
strncpy_P
#define strncpy_P(a, b, n)
Definition: pgmspace.h:66
status
static status_t status
Definition: filament_sensor.c:37
Z_MIN_PIN
#define Z_MIN_PIN
Definition: pins_ESP32.h:47
Z_HOMING_HEIGHT
#define Z_HOMING_HEIGHT
Definition: Configuration_A3ides_2209_MINI.h:968
MSG_SOFT_MAX
#define MSG_SOFT_MAX
Definition: language.h:221
mesh_bed_leveling::probe_index_y
static int8_t probe_index_y(const float &y)
Definition: mesh_bed_leveling.h:92
SERIAL_ECHOPAIR_F
#define SERIAL_ECHOPAIR_F(S, V...)
Definition: serial.h:176
Stepper::microstep_mode
static void microstep_mode(const uint8_t driver, const uint8_t stepping)
Definition: stepper.cpp:2863
HIGH
#define HIGH
Definition: wiring_constants.h:71
ARRAY_N
#define ARRAY_N(N, V...)
Definition: macros.h:227
E5
Definition: L6470_Marlin.h:30
GcodeSuite::reset_stepper_timeout
static FORCE_INLINE void reset_stepper_timeout()
Definition: gcode.h:330
Endstops::enable_globally
static void enable_globally(const bool onoff=true)
Definition: endstops.cpp:285
MSG_SOFT_MIN
#define MSG_SOFT_MIN
Definition: language.h:220
SERIAL_EOL
#define SERIAL_EOL()
Definition: serial.h:181
skew_factor_t::xy
const float xy
Definition: planner.h:205
baricuda_e_to_p_pressure
uint8_t baricuda_e_to_p_pressure
delta_radius
float delta_radius
serialprint_onoff
void serialprint_onoff(const bool onoff)
Definition: serial.cpp:57
axes_need_homing
uint8_t axes_need_homing(uint8_t axis_bits)
Definition: motion.cpp:1041
MSG_OFF
#define MSG_OFF
Definition: language.h:214
_GET_MESH_Y
#define _GET_MESH_Y(J)
Definition: abl.h:44
leds
LEDLights leds
Stepper::microstep_readings
static void microstep_readings()
Definition: stepper.cpp:2894
quickstop_stepper
void quickstop_stepper()
Definition: Marlin.cpp:272
STOW_PROBE
#define STOW_PROBE()
Definition: probe.h:61
DEBUG_ECHOPAIR
#define DEBUG_ECHOPAIR(...)
Definition: debug_out.h:80
GcodeSuite::get_target_e_stepper_from_command
static int8_t get_target_e_stepper_from_command()
Definition: gcode.cpp:95
vector_3
Definition: vector_3.h:47
FilamentMonitorBase::enabled
static bool enabled
Definition: runout.h:53
mesh_bed_leveling::set_zigzag_z
static void set_zigzag_z(const int8_t index, const float &z)
Definition: mesh_bed_leveling.h:69
pinMode
void pinMode(uint32_t ulPin, uint32_t ulMode)
Definition: wiring_digital.c:22
TEST
#define TEST(n, b)
Definition: macros.h:81
GcodeSuite::axis_relative
static uint8_t axis_relative
Definition: gcode.h:292
createSpeedLookupTable.int
int
Definition: createSpeedLookupTable.py:15
MMM_TO_MMS
#define MMM_TO_MMS(MM_M)
Definition: types.h:83
all_off
constexpr uint8_t all_off
Definition: backlash.h:27
Z_STEPPER_ALIGN_AMP
#define Z_STEPPER_ALIGN_AMP
Definition: Conditionals_post.h:1816
Max7219::set_row
static void set_row(const uint8_t row, const uint32_t val)
Z_STEPPER_COUNT
#define Z_STEPPER_COUNT
Definition: Conditionals_post.h:1768
XYval::y
T y
Definition: types.h:185
MarlinSettings::load
static FORCE_INLINE bool load()
Definition: configuration_store.h:79
log_machine_info
#define log_machine_info()
Definition: utility.h:62
all_on
constexpr uint8_t all_on
Definition: backlash.h:27
extDigitalWrite
#define extDigitalWrite(IO, V)
Definition: fastio.h:91
I2CPositionEncodersMgr::M869
static void M869()
case_light_brightness
uint8_t case_light_brightness
Definition: caselight.cpp:27
serialprint_truefalse
void serialprint_truefalse(const bool tf)
Definition: serial.cpp:59
safe_delay
void safe_delay(millis_t ms)
Definition: utility.cpp:28
HOTENDS
#define HOTENDS
Definition: Conditionals_LCD.h:425
refresh_bed_level
void refresh_bed_level()
NOOP
#define NOOP
Definition: macros.h:258
TWIBUS_BUFFER_SIZE
#define TWIBUS_BUFFER_SIZE
Definition: twibus.h:34
Stepper::position
static int32_t position(const AxisEnum axis)
Definition: stepper.cpp:2214
VALID_PIN
bool VALID_PIN(const pin_t p)
MeshStart
Definition: mesh_bed_leveling.h:28
XYZval
Definition: types.h:100
hex_address
char * hex_address(const void *const w)
Definition: hex_print_routines.cpp:67
createSpeedLookupTable.args
args
Definition: createSpeedLookupTable.py:17
VOLUMETRIC_UNIT
#define VOLUMETRIC_UNIT(V)
Definition: parser.h:300
PID_PARAM
#define PID_PARAM(F, H)
Definition: temperature.h:87
GCodeQueue::inject_P
static void inject_P(PGM_P const pgcode)
Definition: queue.cpp:206
serial_delay
void serial_delay(const millis_t ms)
Definition: utility.h:31
MMU2::set_filament_type
static void set_filament_type(uint8_t index, uint8_t type)
E_AXIS
Definition: types.h:40
FilamentMonitorBase::host_handling
static constexpr bool host_handling
Definition: runout.h:58
Max7219::led_line
static uint8_t led_line[MAX7219_LINES]
Definition: Max7219_Debug_LEDs.h:76
length
png_uint_32 length
Definition: png.c:2247
g29_auto.last_z
float last_z
Definition: g29_auto.py:39
wait_for_heatup
bool wait_for_heatup
Definition: Marlin.cpp:184
homeaxis
void homeaxis(const AxisEnum axis)
Definition: motion.cpp:1449
GcodeSuite::process_next_command
static void process_next_command()
Definition: gcode.cpp:831
L6470_Marlin::index_to_dir
static bool index_to_dir[MAX_L6470]
Definition: L6470_Marlin.h:38
serialprintPGM
void serialprintPGM(PGM_P str)
Definition: serial.cpp:35
delta_calibration_radius
float delta_calibration_radius
SBI
#define SBI(A, B)
Definition: macros.h:85
S_FMT
#define S_FMT
Definition: macros.h:68
flashFirmware
void flashFirmware(int16_t value)
axis_codes
const xyze_char_t axis_codes
Definition: types.h:486
Planner::settings
static planner_settings_t settings
Definition: planner.h:251
MeshReset
Definition: mesh_bed_leveling.h:32
REL_E
Definition: gcode.h:287
SERIAL_ECHOLNPGM
#define SERIAL_ECHOLNPGM(S)
Definition: serial.h:174
DEBUG_CHAR
#define DEBUG_CHAR(...)
Definition: debug_out.h:74
AXIS_RELATIVE_MODES
#define AXIS_RELATIVE_MODES
Definition: Configuration_A3ides_2209_MINI_adv.h:493
X
Definition: L6470_Marlin.h:30
I2CPositionEncodersMgr::M866
static void M866()
XYZval::c
T c
Definition: types.h:287
GcodeSuite::process_subcommands_now
static void process_subcommands_now(char *gcode)
Definition: gcode.cpp:875
case_light_arg_flag
bool case_light_arg_flag
Definition: caselight.cpp:48
Planner::set_max_feedrate
static void set_max_feedrate(const uint8_t axis, float targetValue)
Definition: planner.cpp:2841
createSpeedLookupTable.b
list b
Definition: createSpeedLookupTable.py:30
I2CPositionEncodersMgr::M862
static void M862()
analogWrite
void analogWrite(uint32_t ulPin, uint32_t ulValue)
Definition: wiring_analog.c:12
LOOP_XYZE
#define LOOP_XYZE(VAR)
Definition: types.h:61
Planner::set_max_acceleration
static void set_max_acceleration(const uint8_t axis, float targetValue)
Definition: planner.cpp:2824
Max7219::refresh_line
static void refresh_line(const uint8_t line)
nozzle
Nozzle nozzle
Definition: nozzle.cpp:29
idle
void idle()
Definition: Marlin.cpp:629
READ
#define READ(IO)
Definition: fastio.h:95
MSG_E_STEPPER_NOT_SPECIFIED
#define MSG_E_STEPPER_NOT_SPECIFIED
Definition: language.h:169
L6470_Marlin::axis_xref
static uint8_t axis_xref[MAX_L6470]
Definition: L6470_Marlin.h:39
J_PARAM
#define J_PARAM
planner_settings_t::min_travel_feedrate_mm_s
feedRate_t min_travel_feedrate_mm_s
Definition: planner.h:186
Y2
Definition: L6470_Marlin.h:30
L6470_Marlin::say_axis
static void say_axis(const uint8_t axis, const bool label=true)
soft_endstop
axis_limits_t soft_endstop
Definition: motion.cpp:489
PARSED_PIN_INDEX
int16_t PARSED_PIN_INDEX(const char code, const int16_t dval)
xy_probe_feedrate_mm_s
float xy_probe_feedrate_mm_s
Definition: motion.cpp:193
thermalManager
Temperature thermalManager
Definition: temperature.cpp:89
micros
uint32_t micros(void)
Definition: wiring_time.c:34
UNUSED
#define UNUSED(X)
Definition: stm32f4xx_hal_def.h:74
endstops
Endstops endstops
Definition: endstops.cpp:51
safety_timer_set_interval
void safety_timer_set_interval(millis_t ms)
Definition: safety_timer.cpp:6
watchdog_refresh
void watchdog_refresh()
Definition: HAL.h:28
FilamentWidthSensor::measured_mm
static float measured_mm
Definition: filwidth.h:33
I2CPositionEncodersMgr::M861
static void M861()
millis_t
uint32_t millis_t
Definition: millis_t.h:26
set_axis_is_not_at_home
void set_axis_is_not_at_home(const AxisEnum axis)
Definition: motion.cpp:1425
PrintJobRecovery::enabled
static bool enabled
Definition: power_loss_recovery.h:138
MSG_INVALID_EXTRUDER
#define MSG_INVALID_EXTRUDER
Definition: language.h:167
Mixer::get_current_vtool
static FORCE_INLINE uint8_t get_current_vtool()
Definition: mixing.h:111
TEMPORARY_BED_LEVELING_STATE
#define TEMPORARY_BED_LEVELING_STATE(enable)
Definition: bedlevel.h:54
BUZZ
#define BUZZ(d, f)
Definition: buzzer.h:126
active_extruder
constexpr uint8_t active_extruder
Definition: motion.h:107
Stepper::set_z_lock
static FORCE_INLINE void set_z_lock(const bool state)
Definition: stepper.h:421
planner_settings_t::min_segment_time_us
uint32_t min_segment_time_us
Definition: planner.h:179
Temperature::zero_fan_speeds
static void zero_fan_speeds()
Definition: temperature.h:506
MMU2::tool_change
static void tool_change(uint8_t index)
unified_bed_leveling::z_values
static bed_mesh_t z_values
Definition: ubl.h:108
suspend_auto_report
bool suspend_auto_report
Definition: Marlin.cpp:192
ENABLED
#define ENABLED(V...)
Definition: macros.h:177
Planner::has_blocks_queued
static FORCE_INLINE bool has_blocks_queued()
Definition: planner.h:762
planner
Planner planner
Definition: planner.cpp:111
size
static png_bytep size_t size
Definition: pngwrite.c:2170
I2CPositionEncodersMgr::M868
static void M868()
XYZEval::y
T y
Definition: types.h:383
createSpeedLookupTable.parser
parser
Definition: createSpeedLookupTable.py:14
home_delta
void home_delta()
probe_max_y
float probe_max_y()
Definition: probe.h:106
Z_MIN_ENDSTOP_INVERTING
#define Z_MIN_ENDSTOP_INVERTING
Definition: Configuration_A3ides_2209_MINI.h:607
disable_solenoid
void disable_solenoid(const uint8_t num)
Definition: solenoid.cpp:76
Backlash::has_measurement
static bool has_measurement(const AxisEnum a)
Definition: backlash.h:69
PrintJobRecovery::enable
static void enable(const bool onoff)
EXTRUDE_MAXLENGTH
#define EXTRUDE_MAXLENGTH
Definition: Configuration_A3ides_2209_MINI.h:524
Planner::skew_factor
static skew_factor_t skew_factor
Definition: planner.h:299