My Marlin configs for Fabrikator Mini and CTC i3 Pro B
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

Marlin.h 16KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496
  1. /**
  2. * Marlin 3D Printer Firmware
  3. * Copyright (C) 2016 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. #ifndef MARLIN_H
  23. #define MARLIN_H
  24. #include <math.h>
  25. #include <stdio.h>
  26. #include <stdlib.h>
  27. #include <string.h>
  28. #include <inttypes.h>
  29. #include <util/delay.h>
  30. #include <avr/pgmspace.h>
  31. #include <avr/eeprom.h>
  32. #include <avr/interrupt.h>
  33. #include "MarlinConfig.h"
  34. #ifdef DEBUG_GCODE_PARSER
  35. #include "gcode.h"
  36. #endif
  37. #include "enum.h"
  38. #include "types.h"
  39. #include "fastio.h"
  40. #include "utility.h"
  41. #include "serial.h"
  42. #if ENABLED(PRINTCOUNTER)
  43. #include "printcounter.h"
  44. #else
  45. #include "stopwatch.h"
  46. #endif
  47. void idle(
  48. #if ENABLED(ADVANCED_PAUSE_FEATURE)
  49. bool no_stepper_sleep = false // pass true to keep steppers from disabling on timeout
  50. #endif
  51. );
  52. void manage_inactivity(bool ignore_stepper_queue = false);
  53. #if ENABLED(DUAL_X_CARRIAGE) || ENABLED(DUAL_NOZZLE_DUPLICATION_MODE)
  54. extern bool extruder_duplication_enabled;
  55. #endif
  56. #if HAS_X2_ENABLE
  57. #define enable_X() do{ X_ENABLE_WRITE( X_ENABLE_ON); X2_ENABLE_WRITE( X_ENABLE_ON); }while(0)
  58. #define disable_X() do{ X_ENABLE_WRITE(!X_ENABLE_ON); X2_ENABLE_WRITE(!X_ENABLE_ON); axis_known_position[X_AXIS] = false; }while(0)
  59. #elif HAS_X_ENABLE
  60. #define enable_X() X_ENABLE_WRITE( X_ENABLE_ON)
  61. #define disable_X() do{ X_ENABLE_WRITE(!X_ENABLE_ON); axis_known_position[X_AXIS] = false; }while(0)
  62. #else
  63. #define enable_X() NOOP
  64. #define disable_X() NOOP
  65. #endif
  66. #if HAS_Y2_ENABLE
  67. #define enable_Y() do{ Y_ENABLE_WRITE( Y_ENABLE_ON); Y2_ENABLE_WRITE(Y_ENABLE_ON); }while(0)
  68. #define disable_Y() do{ Y_ENABLE_WRITE(!Y_ENABLE_ON); Y2_ENABLE_WRITE(!Y_ENABLE_ON); axis_known_position[Y_AXIS] = false; }while(0)
  69. #elif HAS_Y_ENABLE
  70. #define enable_Y() Y_ENABLE_WRITE( Y_ENABLE_ON)
  71. #define disable_Y() do{ Y_ENABLE_WRITE(!Y_ENABLE_ON); axis_known_position[Y_AXIS] = false; }while(0)
  72. #else
  73. #define enable_Y() NOOP
  74. #define disable_Y() NOOP
  75. #endif
  76. #if HAS_Z2_ENABLE
  77. #define enable_Z() do{ Z_ENABLE_WRITE( Z_ENABLE_ON); Z2_ENABLE_WRITE(Z_ENABLE_ON); }while(0)
  78. #define disable_Z() do{ Z_ENABLE_WRITE(!Z_ENABLE_ON); Z2_ENABLE_WRITE(!Z_ENABLE_ON); axis_known_position[Z_AXIS] = false; }while(0)
  79. #elif HAS_Z_ENABLE
  80. #define enable_Z() Z_ENABLE_WRITE( Z_ENABLE_ON)
  81. #define disable_Z() do{ Z_ENABLE_WRITE(!Z_ENABLE_ON); axis_known_position[Z_AXIS] = false; }while(0)
  82. #else
  83. #define enable_Z() NOOP
  84. #define disable_Z() NOOP
  85. #endif
  86. #if ENABLED(MIXING_EXTRUDER)
  87. /**
  88. * Mixing steppers synchronize their enable (and direction) together
  89. */
  90. #if MIXING_STEPPERS > 3
  91. #define enable_E0() { E0_ENABLE_WRITE( E_ENABLE_ON); E1_ENABLE_WRITE( E_ENABLE_ON); E2_ENABLE_WRITE( E_ENABLE_ON); E3_ENABLE_WRITE( E_ENABLE_ON); }
  92. #define disable_E0() { E0_ENABLE_WRITE(!E_ENABLE_ON); E1_ENABLE_WRITE(!E_ENABLE_ON); E2_ENABLE_WRITE(!E_ENABLE_ON); E3_ENABLE_WRITE(!E_ENABLE_ON); }
  93. #elif MIXING_STEPPERS > 2
  94. #define enable_E0() { E0_ENABLE_WRITE( E_ENABLE_ON); E1_ENABLE_WRITE( E_ENABLE_ON); E2_ENABLE_WRITE( E_ENABLE_ON); }
  95. #define disable_E0() { E0_ENABLE_WRITE(!E_ENABLE_ON); E1_ENABLE_WRITE(!E_ENABLE_ON); E2_ENABLE_WRITE(!E_ENABLE_ON); }
  96. #else
  97. #define enable_E0() { E0_ENABLE_WRITE( E_ENABLE_ON); E1_ENABLE_WRITE( E_ENABLE_ON); }
  98. #define disable_E0() { E0_ENABLE_WRITE(!E_ENABLE_ON); E1_ENABLE_WRITE(!E_ENABLE_ON); }
  99. #endif
  100. #define enable_E1() NOOP
  101. #define disable_E1() NOOP
  102. #define enable_E2() NOOP
  103. #define disable_E2() NOOP
  104. #define enable_E3() NOOP
  105. #define disable_E3() NOOP
  106. #define enable_E4() NOOP
  107. #define disable_E4() NOOP
  108. #else // !MIXING_EXTRUDER
  109. #if HAS_E0_ENABLE
  110. #define enable_E0() E0_ENABLE_WRITE( E_ENABLE_ON)
  111. #define disable_E0() E0_ENABLE_WRITE(!E_ENABLE_ON)
  112. #else
  113. #define enable_E0() NOOP
  114. #define disable_E0() NOOP
  115. #endif
  116. #if E_STEPPERS > 1 && HAS_E1_ENABLE
  117. #define enable_E1() E1_ENABLE_WRITE( E_ENABLE_ON)
  118. #define disable_E1() E1_ENABLE_WRITE(!E_ENABLE_ON)
  119. #else
  120. #define enable_E1() NOOP
  121. #define disable_E1() NOOP
  122. #endif
  123. #if E_STEPPERS > 2 && HAS_E2_ENABLE
  124. #define enable_E2() E2_ENABLE_WRITE( E_ENABLE_ON)
  125. #define disable_E2() E2_ENABLE_WRITE(!E_ENABLE_ON)
  126. #else
  127. #define enable_E2() NOOP
  128. #define disable_E2() NOOP
  129. #endif
  130. #if E_STEPPERS > 3 && HAS_E3_ENABLE
  131. #define enable_E3() E3_ENABLE_WRITE( E_ENABLE_ON)
  132. #define disable_E3() E3_ENABLE_WRITE(!E_ENABLE_ON)
  133. #else
  134. #define enable_E3() NOOP
  135. #define disable_E3() NOOP
  136. #endif
  137. #if E_STEPPERS > 4 && HAS_E4_ENABLE
  138. #define enable_E4() E4_ENABLE_WRITE( E_ENABLE_ON)
  139. #define disable_E4() E4_ENABLE_WRITE(!E_ENABLE_ON)
  140. #else
  141. #define enable_E4() NOOP
  142. #define disable_E4() NOOP
  143. #endif
  144. #endif // !MIXING_EXTRUDER
  145. #if ENABLED(G38_PROBE_TARGET)
  146. extern bool G38_move, // flag to tell the interrupt handler that a G38 command is being run
  147. G38_endstop_hit; // flag from the interrupt handler to indicate if the endstop went active
  148. #endif
  149. /**
  150. * The axis order in all axis related arrays is X, Y, Z, E
  151. */
  152. #define _AXIS(AXIS) AXIS ##_AXIS
  153. void enable_all_steppers();
  154. void disable_e_steppers();
  155. void disable_all_steppers();
  156. void FlushSerialRequestResend();
  157. void ok_to_send();
  158. void kill(const char*);
  159. void quickstop_stepper();
  160. #if ENABLED(FILAMENT_RUNOUT_SENSOR)
  161. void handle_filament_runout();
  162. #endif
  163. extern uint8_t marlin_debug_flags;
  164. #define DEBUGGING(F) (marlin_debug_flags & (DEBUG_## F))
  165. extern bool Running;
  166. inline bool IsRunning() { return Running; }
  167. inline bool IsStopped() { return !Running; }
  168. bool enqueue_and_echo_command(const char* cmd, bool say_ok=false); // Add a single command to the end of the buffer. Return false on failure.
  169. void enqueue_and_echo_commands_P(const char * const cmd); // Set one or more commands to be prioritized over the next Serial/SD command.
  170. void clear_command_queue();
  171. extern millis_t previous_cmd_ms;
  172. inline void refresh_cmd_timeout() { previous_cmd_ms = millis(); }
  173. #if ENABLED(FAST_PWM_FAN)
  174. void setPwmFrequency(uint8_t pin, int val);
  175. #endif
  176. /**
  177. * Feedrate scaling and conversion
  178. */
  179. extern int16_t feedrate_percentage;
  180. #define MMM_TO_MMS(MM_M) ((MM_M)/60.0)
  181. #define MMS_TO_MMM(MM_S) ((MM_S)*60.0)
  182. #define MMS_SCALED(MM_S) ((MM_S)*feedrate_percentage*0.01)
  183. extern bool axis_relative_modes[];
  184. extern bool volumetric_enabled;
  185. extern int16_t flow_percentage[EXTRUDERS]; // Extrusion factor for each extruder
  186. extern float filament_size[EXTRUDERS]; // cross-sectional area of filament (in millimeters), typically around 1.75 or 2.85, 0 disables the volumetric calculations for the extruder.
  187. extern float volumetric_multiplier[EXTRUDERS]; // reciprocal of cross-sectional area of filament (in square millimeters), stored this way to reduce computational burden in planner
  188. extern bool axis_known_position[XYZ];
  189. extern bool axis_homed[XYZ];
  190. extern volatile bool wait_for_heatup;
  191. #if HAS_RESUME_CONTINUE
  192. extern volatile bool wait_for_user;
  193. #endif
  194. extern float current_position[NUM_AXIS];
  195. // Workspace offsets
  196. #if HAS_WORKSPACE_OFFSET
  197. #if HAS_HOME_OFFSET
  198. extern float home_offset[XYZ];
  199. #endif
  200. #if HAS_POSITION_SHIFT
  201. extern float position_shift[XYZ];
  202. #endif
  203. #endif
  204. #if HAS_HOME_OFFSET && HAS_POSITION_SHIFT
  205. extern float workspace_offset[XYZ];
  206. #define WORKSPACE_OFFSET(AXIS) workspace_offset[AXIS]
  207. #elif HAS_HOME_OFFSET
  208. #define WORKSPACE_OFFSET(AXIS) home_offset[AXIS]
  209. #elif HAS_POSITION_SHIFT
  210. #define WORKSPACE_OFFSET(AXIS) position_shift[AXIS]
  211. #else
  212. #define WORKSPACE_OFFSET(AXIS) 0
  213. #endif
  214. #define LOGICAL_POSITION(POS, AXIS) ((POS) + WORKSPACE_OFFSET(AXIS))
  215. #define RAW_POSITION(POS, AXIS) ((POS) - WORKSPACE_OFFSET(AXIS))
  216. #if HAS_POSITION_SHIFT || DISABLED(DELTA)
  217. #define LOGICAL_X_POSITION(POS) LOGICAL_POSITION(POS, X_AXIS)
  218. #define LOGICAL_Y_POSITION(POS) LOGICAL_POSITION(POS, Y_AXIS)
  219. #define RAW_X_POSITION(POS) RAW_POSITION(POS, X_AXIS)
  220. #define RAW_Y_POSITION(POS) RAW_POSITION(POS, Y_AXIS)
  221. #else
  222. #define LOGICAL_X_POSITION(POS) (POS)
  223. #define LOGICAL_Y_POSITION(POS) (POS)
  224. #define RAW_X_POSITION(POS) (POS)
  225. #define RAW_Y_POSITION(POS) (POS)
  226. #endif
  227. #define LOGICAL_Z_POSITION(POS) LOGICAL_POSITION(POS, Z_AXIS)
  228. #define RAW_Z_POSITION(POS) RAW_POSITION(POS, Z_AXIS)
  229. #define RAW_CURRENT_POSITION(A) RAW_##A##_POSITION(current_position[A##_AXIS])
  230. // Hotend Offsets
  231. #if HOTENDS > 1
  232. extern float hotend_offset[XYZ][HOTENDS];
  233. #endif
  234. // Software Endstops
  235. extern float soft_endstop_min[XYZ], soft_endstop_max[XYZ];
  236. #if HAS_SOFTWARE_ENDSTOPS
  237. extern bool soft_endstops_enabled;
  238. void clamp_to_software_endstops(float target[XYZ]);
  239. #else
  240. #define soft_endstops_enabled false
  241. #define clamp_to_software_endstops(x) NOOP
  242. #endif
  243. #if HAS_WORKSPACE_OFFSET || ENABLED(DUAL_X_CARRIAGE)
  244. void update_software_endstops(const AxisEnum axis);
  245. #endif
  246. #if IS_KINEMATIC
  247. extern float delta[ABC];
  248. void inverse_kinematics(const float logical[XYZ]);
  249. #endif
  250. #if ENABLED(DELTA)
  251. extern float endstop_adj[ABC],
  252. delta_radius,
  253. delta_diagonal_rod,
  254. delta_calibration_radius,
  255. delta_segments_per_second,
  256. delta_tower_angle_trim[ABC],
  257. delta_clip_start_height;
  258. void recalc_delta_settings(float radius, float diagonal_rod, float tower_angle_trim[ABC]);
  259. #elif IS_SCARA
  260. void forward_kinematics_SCARA(const float &a, const float &b);
  261. #endif
  262. #if ENABLED(AUTO_BED_LEVELING_BILINEAR)
  263. extern int bilinear_grid_spacing[2], bilinear_start[2];
  264. extern float bilinear_grid_factor[2],
  265. z_values[GRID_MAX_POINTS_X][GRID_MAX_POINTS_Y];
  266. float bilinear_z_offset(const float logical[XYZ]);
  267. #endif
  268. #if ENABLED(AUTO_BED_LEVELING_UBL)
  269. typedef struct { double A, B, D; } linear_fit;
  270. linear_fit* lsf_linear_fit(double x[], double y[], double z[], const int);
  271. #endif
  272. #if HAS_LEVELING
  273. bool leveling_is_valid();
  274. void set_bed_leveling_enabled(const bool enable=true);
  275. void reset_bed_level();
  276. #endif
  277. #if ENABLED(ENABLE_LEVELING_FADE_HEIGHT)
  278. void set_z_fade_height(const float zfh);
  279. #endif
  280. #if ENABLED(Z_DUAL_ENDSTOPS)
  281. extern float z_endstop_adj;
  282. #endif
  283. #if HAS_BED_PROBE
  284. extern float zprobe_zoffset;
  285. void refresh_zprobe_zoffset(const bool no_babystep=false);
  286. #define DEPLOY_PROBE() set_probe_deployed(true)
  287. #define STOW_PROBE() set_probe_deployed(false)
  288. #else
  289. #define DEPLOY_PROBE()
  290. #define STOW_PROBE()
  291. #endif
  292. #if ENABLED(HOST_KEEPALIVE_FEATURE)
  293. extern MarlinBusyState busy_state;
  294. #define KEEPALIVE_STATE(n) do{ busy_state = n; }while(0)
  295. #else
  296. #define KEEPALIVE_STATE(n) NOOP
  297. #endif
  298. #if FAN_COUNT > 0
  299. extern int16_t fanSpeeds[FAN_COUNT];
  300. #if ENABLED(PROBING_FANS_OFF)
  301. extern bool fans_paused;
  302. extern int16_t paused_fanSpeeds[FAN_COUNT];
  303. #endif
  304. #endif
  305. #if ENABLED(BARICUDA)
  306. extern uint8_t baricuda_valve_pressure, baricuda_e_to_p_pressure;
  307. #endif
  308. #if ENABLED(FILAMENT_WIDTH_SENSOR)
  309. extern bool filament_sensor; // Flag that filament sensor readings should control extrusion
  310. extern float filament_width_nominal, // Theoretical filament diameter i.e., 3.00 or 1.75
  311. filament_width_meas; // Measured filament diameter
  312. extern uint8_t meas_delay_cm, // Delay distance
  313. measurement_delay[]; // Ring buffer to delay measurement
  314. extern int8_t filwidth_delay_index[2]; // Ring buffer indexes. Used by planner, temperature, and main code
  315. #endif
  316. #if ENABLED(ADVANCED_PAUSE_FEATURE)
  317. extern AdvancedPauseMenuResponse advanced_pause_menu_response;
  318. #endif
  319. #if ENABLED(PID_EXTRUSION_SCALING)
  320. extern int lpq_len;
  321. #endif
  322. #if ENABLED(FWRETRACT)
  323. extern bool autoretract_enabled; // M209 S - Autoretract switch
  324. extern float retract_length, // M207 S - G10 Retract length
  325. retract_feedrate_mm_s, // M207 F - G10 Retract feedrate
  326. retract_zlift, // M207 Z - G10 Retract hop size
  327. retract_recover_length, // M208 S - G11 Recover length
  328. retract_recover_feedrate_mm_s, // M208 F - G11 Recover feedrate
  329. swap_retract_length, // M207 W - G10 Swap Retract length
  330. swap_retract_recover_length, // M208 W - G11 Swap Recover length
  331. swap_retract_recover_feedrate_mm_s; // M208 R - G11 Swap Recover feedrate
  332. #endif
  333. // Print job timer
  334. #if ENABLED(PRINTCOUNTER)
  335. extern PrintCounter print_job_timer;
  336. #else
  337. extern Stopwatch print_job_timer;
  338. #endif
  339. // Handling multiple extruders pins
  340. extern uint8_t active_extruder;
  341. #if HAS_TEMP_HOTEND || HAS_TEMP_BED
  342. void print_heaterstates();
  343. #endif
  344. #if ENABLED(MIXING_EXTRUDER)
  345. extern float mixing_factor[MIXING_STEPPERS];
  346. #endif
  347. void calculate_volumetric_multipliers();
  348. /**
  349. * Blocking movement and shorthand functions
  350. */
  351. void do_blocking_move_to(const float &x, const float &y, const float &z, const float &fr_mm_s=0.0);
  352. void do_blocking_move_to_x(const float &x, const float &fr_mm_s=0.0);
  353. void do_blocking_move_to_z(const float &z, const float &fr_mm_s=0.0);
  354. void do_blocking_move_to_xy(const float &x, const float &y, const float &fr_mm_s=0.0);
  355. #define HAS_AXIS_UNHOMED_ERR ( \
  356. ENABLED(Z_PROBE_ALLEN_KEY) \
  357. || ENABLED(Z_PROBE_SLED) \
  358. || HAS_PROBING_PROCEDURE \
  359. || HOTENDS > 1 \
  360. || ENABLED(NOZZLE_CLEAN_FEATURE) \
  361. || ENABLED(NOZZLE_PARK_FEATURE) \
  362. || (ENABLED(ADVANCED_PAUSE_FEATURE) && ENABLED(HOME_BEFORE_FILAMENT_CHANGE)) \
  363. ) || ENABLED(NO_MOTION_BEFORE_HOMING)
  364. #if HAS_AXIS_UNHOMED_ERR
  365. bool axis_unhomed_error(const bool x=true, const bool y=true, const bool z=true);
  366. #endif
  367. /**
  368. * position_is_reachable family of functions
  369. */
  370. #if IS_KINEMATIC // (DELTA or SCARA)
  371. #if IS_SCARA
  372. extern const float L1, L2;
  373. #endif
  374. inline bool position_is_reachable_raw_xy(const float &rx, const float &ry) {
  375. #if ENABLED(DELTA)
  376. return HYPOT2(rx, ry) <= sq(DELTA_PRINTABLE_RADIUS);
  377. #elif IS_SCARA
  378. #if MIDDLE_DEAD_ZONE_R > 0
  379. const float R2 = HYPOT2(rx - SCARA_OFFSET_X, ry - SCARA_OFFSET_Y);
  380. return R2 >= sq(float(MIDDLE_DEAD_ZONE_R)) && R2 <= sq(L1 + L2);
  381. #else
  382. return HYPOT2(rx - SCARA_OFFSET_X, ry - SCARA_OFFSET_Y) <= sq(L1 + L2);
  383. #endif
  384. #else // CARTESIAN
  385. // To be migrated from MakerArm branch in future
  386. #endif
  387. }
  388. inline bool position_is_reachable_by_probe_raw_xy(const float &rx, const float &ry) {
  389. // Both the nozzle and the probe must be able to reach the point.
  390. // This won't work on SCARA since the probe offset rotates with the arm.
  391. return position_is_reachable_raw_xy(rx, ry)
  392. && position_is_reachable_raw_xy(rx - X_PROBE_OFFSET_FROM_EXTRUDER, ry - Y_PROBE_OFFSET_FROM_EXTRUDER);
  393. }
  394. #else // CARTESIAN
  395. inline bool position_is_reachable_raw_xy(const float &rx, const float &ry) {
  396. // Add 0.001 margin to deal with float imprecision
  397. return WITHIN(rx, X_MIN_POS - 0.001, X_MAX_POS + 0.001)
  398. && WITHIN(ry, Y_MIN_POS - 0.001, Y_MAX_POS + 0.001);
  399. }
  400. inline bool position_is_reachable_by_probe_raw_xy(const float &rx, const float &ry) {
  401. // Add 0.001 margin to deal with float imprecision
  402. return WITHIN(rx, MIN_PROBE_X - 0.001, MAX_PROBE_X + 0.001)
  403. && WITHIN(ry, MIN_PROBE_Y - 0.001, MAX_PROBE_Y + 0.001);
  404. }
  405. #endif // CARTESIAN
  406. FORCE_INLINE bool position_is_reachable_by_probe_xy(const float &lx, const float &ly) {
  407. return position_is_reachable_by_probe_raw_xy(RAW_X_POSITION(lx), RAW_Y_POSITION(ly));
  408. }
  409. FORCE_INLINE bool position_is_reachable_xy(const float &lx, const float &ly) {
  410. return position_is_reachable_raw_xy(RAW_X_POSITION(lx), RAW_Y_POSITION(ly));
  411. }
  412. #endif // MARLIN_H