My Marlin configs for Fabrikator Mini and CTC i3 Pro B
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

configuration_store.cpp 30KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947
  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. /**
  23. * configuration_store.cpp
  24. *
  25. * Configuration and EEPROM storage
  26. *
  27. * IMPORTANT: Whenever there are changes made to the variables stored in EEPROM
  28. * in the functions below, also increment the version number. This makes sure that
  29. * the default values are used whenever there is a change to the data, to prevent
  30. * wrong data being written to the variables.
  31. *
  32. * ALSO: Variables in the Store and Retrieve sections must be in the same order.
  33. * If a feature is disabled, some data must still be written that, when read,
  34. * either sets a Sane Default, or results in No Change to the existing value.
  35. *
  36. */
  37. #define EEPROM_VERSION "V23"
  38. /**
  39. * V23 EEPROM Layout:
  40. *
  41. * 100 Version (char x4)
  42. *
  43. * 104 M92 XYZE planner.axis_steps_per_unit (float x4)
  44. * 120 M203 XYZE planner.max_feedrate (float x4)
  45. * 136 M201 XYZE planner.max_acceleration_units_per_sq_second (uint32_t x4)
  46. * 152 M204 P planner.acceleration (float)
  47. * 156 M204 R planner.retract_acceleration (float)
  48. * 160 M204 T planner.travel_acceleration (float)
  49. * 164 M205 S planner.min_feedrate (float)
  50. * 168 M205 T planner.min_travel_feedrate (float)
  51. * 172 M205 B planner.min_segment_time (ulong)
  52. * 176 M205 X planner.max_xy_jerk (float)
  53. * 180 M205 Z planner.max_z_jerk (float)
  54. * 184 M205 E planner.max_e_jerk (float)
  55. * 188 M206 XYZ home_offset (float x3)
  56. *
  57. * Mesh bed leveling:
  58. * 200 M420 S active (bool)
  59. * 201 z_offset (float) (added in V23)
  60. * 205 mesh_num_x (uint8 as set in firmware)
  61. * 206 mesh_num_y (uint8 as set in firmware)
  62. * 207 G29 S3 XYZ z_values[][] (float x9, by default)
  63. *
  64. * AUTO BED LEVELING
  65. * 243 M851 zprobe_zoffset (float)
  66. *
  67. * DELTA:
  68. * 247 M666 XYZ endstop_adj (float x3)
  69. * 259 M665 R delta_radius (float)
  70. * 263 M665 L delta_diagonal_rod (float)
  71. * 267 M665 S delta_segments_per_second (float)
  72. * 271 M665 A delta_diagonal_rod_trim_tower_1 (float)
  73. * 275 M665 B delta_diagonal_rod_trim_tower_2 (float)
  74. * 279 M665 C delta_diagonal_rod_trim_tower_3 (float)
  75. *
  76. * Z_DUAL_ENDSTOPS:
  77. * 283 M666 Z z_endstop_adj (float)
  78. *
  79. * ULTIPANEL:
  80. * 287 M145 S0 H plaPreheatHotendTemp (int)
  81. * 289 M145 S0 B plaPreheatHPBTemp (int)
  82. * 291 M145 S0 F plaPreheatFanSpeed (int)
  83. * 293 M145 S1 H absPreheatHotendTemp (int)
  84. * 295 M145 S1 B absPreheatHPBTemp (int)
  85. * 297 M145 S1 F absPreheatFanSpeed (int)
  86. *
  87. * PIDTEMP:
  88. * 299 M301 E0 PIDC Kp[0], Ki[0], Kd[0], Kc[0] (float x4)
  89. * 315 M301 E1 PIDC Kp[1], Ki[1], Kd[1], Kc[1] (float x4)
  90. * 331 M301 E2 PIDC Kp[2], Ki[2], Kd[2], Kc[2] (float x4)
  91. * 347 M301 E3 PIDC Kp[3], Ki[3], Kd[3], Kc[3] (float x4)
  92. * 363 M301 L lpq_len (int)
  93. *
  94. * PIDTEMPBED:
  95. * 365 M304 PID thermalManager.bedKp, thermalManager.bedKi, thermalManager.bedKd (float x3)
  96. *
  97. * DOGLCD:
  98. * 377 M250 C lcd_contrast (int)
  99. *
  100. * SCARA:
  101. * 379 M365 XYZ axis_scaling (float x3)
  102. *
  103. * FWRETRACT:
  104. * 391 M209 S autoretract_enabled (bool)
  105. * 392 M207 S retract_length (float)
  106. * 396 M207 W retract_length_swap (float)
  107. * 400 M207 F retract_feedrate (float)
  108. * 404 M207 Z retract_zlift (float)
  109. * 408 M208 S retract_recover_length (float)
  110. * 412 M208 W retract_recover_length_swap (float)
  111. * 416 M208 F retract_recover_feedrate (float)
  112. *
  113. * Volumetric Extrusion:
  114. * 420 M200 D volumetric_enabled (bool)
  115. * 421 M200 T D filament_size (float x4) (T0..3)
  116. *
  117. * 437 This Slot is Available!
  118. *
  119. */
  120. #include "Marlin.h"
  121. #include "language.h"
  122. #include "planner.h"
  123. #include "temperature.h"
  124. #include "ultralcd.h"
  125. #include "configuration_store.h"
  126. #if ENABLED(MESH_BED_LEVELING)
  127. #include "mesh_bed_leveling.h"
  128. #endif
  129. void _EEPROM_writeData(int &pos, uint8_t* value, uint8_t size) {
  130. uint8_t c;
  131. while (size--) {
  132. eeprom_write_byte((unsigned char*)pos, *value);
  133. c = eeprom_read_byte((unsigned char*)pos);
  134. if (c != *value) {
  135. SERIAL_ECHO_START;
  136. SERIAL_ECHOLNPGM(MSG_ERR_EEPROM_WRITE);
  137. }
  138. pos++;
  139. value++;
  140. };
  141. }
  142. void _EEPROM_readData(int &pos, uint8_t* value, uint8_t size) {
  143. do {
  144. *value = eeprom_read_byte((unsigned char*)pos);
  145. pos++;
  146. value++;
  147. } while (--size);
  148. }
  149. #define EEPROM_WRITE_VAR(pos, value) _EEPROM_writeData(pos, (uint8_t*)&value, sizeof(value))
  150. #define EEPROM_READ_VAR(pos, value) _EEPROM_readData(pos, (uint8_t*)&value, sizeof(value))
  151. /**
  152. * Store Configuration Settings - M500
  153. */
  154. #define DUMMY_PID_VALUE 3000.0f
  155. #define EEPROM_OFFSET 100
  156. #if ENABLED(EEPROM_SETTINGS)
  157. /**
  158. * Store Configuration Settings - M500
  159. */
  160. void Config_StoreSettings() {
  161. float dummy = 0.0f;
  162. char ver[4] = "000";
  163. int i = EEPROM_OFFSET;
  164. EEPROM_WRITE_VAR(i, ver); // invalidate data first
  165. EEPROM_WRITE_VAR(i, planner.axis_steps_per_unit);
  166. EEPROM_WRITE_VAR(i, planner.max_feedrate);
  167. EEPROM_WRITE_VAR(i, planner.max_acceleration_units_per_sq_second);
  168. EEPROM_WRITE_VAR(i, planner.acceleration);
  169. EEPROM_WRITE_VAR(i, planner.retract_acceleration);
  170. EEPROM_WRITE_VAR(i, planner.travel_acceleration);
  171. EEPROM_WRITE_VAR(i, planner.min_feedrate);
  172. EEPROM_WRITE_VAR(i, planner.min_travel_feedrate);
  173. EEPROM_WRITE_VAR(i, planner.min_segment_time);
  174. EEPROM_WRITE_VAR(i, planner.max_xy_jerk);
  175. EEPROM_WRITE_VAR(i, planner.max_z_jerk);
  176. EEPROM_WRITE_VAR(i, planner.max_e_jerk);
  177. EEPROM_WRITE_VAR(i, home_offset);
  178. uint8_t mesh_num_x = 3;
  179. uint8_t mesh_num_y = 3;
  180. #if ENABLED(MESH_BED_LEVELING)
  181. // Compile time test that sizeof(mbl.z_values) is as expected
  182. typedef char c_assert[(sizeof(mbl.z_values) == (MESH_NUM_X_POINTS) * (MESH_NUM_Y_POINTS) * sizeof(dummy)) ? 1 : -1];
  183. mesh_num_x = MESH_NUM_X_POINTS;
  184. mesh_num_y = MESH_NUM_Y_POINTS;
  185. EEPROM_WRITE_VAR(i, mbl.active);
  186. EEPROM_WRITE_VAR(i, mbl.z_offset);
  187. EEPROM_WRITE_VAR(i, mesh_num_x);
  188. EEPROM_WRITE_VAR(i, mesh_num_y);
  189. EEPROM_WRITE_VAR(i, mbl.z_values);
  190. #else
  191. uint8_t dummy_uint8 = 0;
  192. dummy = 0.0f;
  193. EEPROM_WRITE_VAR(i, dummy_uint8);
  194. EEPROM_WRITE_VAR(i, dummy);
  195. EEPROM_WRITE_VAR(i, mesh_num_x);
  196. EEPROM_WRITE_VAR(i, mesh_num_y);
  197. for (uint8_t q = 0; q < mesh_num_x * mesh_num_y; q++) EEPROM_WRITE_VAR(i, dummy);
  198. #endif // MESH_BED_LEVELING
  199. #if DISABLED(AUTO_BED_LEVELING_FEATURE)
  200. float zprobe_zoffset = 0;
  201. #endif
  202. EEPROM_WRITE_VAR(i, zprobe_zoffset);
  203. #if ENABLED(DELTA)
  204. EEPROM_WRITE_VAR(i, endstop_adj); // 3 floats
  205. EEPROM_WRITE_VAR(i, delta_radius); // 1 float
  206. EEPROM_WRITE_VAR(i, delta_diagonal_rod); // 1 float
  207. EEPROM_WRITE_VAR(i, delta_segments_per_second); // 1 float
  208. EEPROM_WRITE_VAR(i, delta_diagonal_rod_trim_tower_1); // 1 float
  209. EEPROM_WRITE_VAR(i, delta_diagonal_rod_trim_tower_2); // 1 float
  210. EEPROM_WRITE_VAR(i, delta_diagonal_rod_trim_tower_3); // 1 float
  211. #elif ENABLED(Z_DUAL_ENDSTOPS)
  212. EEPROM_WRITE_VAR(i, z_endstop_adj); // 1 float
  213. dummy = 0.0f;
  214. for (uint8_t q = 8; q--;) EEPROM_WRITE_VAR(i, dummy);
  215. #else
  216. dummy = 0.0f;
  217. for (uint8_t q = 9; q--;) EEPROM_WRITE_VAR(i, dummy);
  218. #endif
  219. #if DISABLED(ULTIPANEL)
  220. int plaPreheatHotendTemp = PLA_PREHEAT_HOTEND_TEMP, plaPreheatHPBTemp = PLA_PREHEAT_HPB_TEMP, plaPreheatFanSpeed = PLA_PREHEAT_FAN_SPEED,
  221. absPreheatHotendTemp = ABS_PREHEAT_HOTEND_TEMP, absPreheatHPBTemp = ABS_PREHEAT_HPB_TEMP, absPreheatFanSpeed = ABS_PREHEAT_FAN_SPEED;
  222. #endif // !ULTIPANEL
  223. EEPROM_WRITE_VAR(i, plaPreheatHotendTemp);
  224. EEPROM_WRITE_VAR(i, plaPreheatHPBTemp);
  225. EEPROM_WRITE_VAR(i, plaPreheatFanSpeed);
  226. EEPROM_WRITE_VAR(i, absPreheatHotendTemp);
  227. EEPROM_WRITE_VAR(i, absPreheatHPBTemp);
  228. EEPROM_WRITE_VAR(i, absPreheatFanSpeed);
  229. for (uint8_t e = 0; e < 4; e++) {
  230. #if ENABLED(PIDTEMP)
  231. if (e < EXTRUDERS) {
  232. EEPROM_WRITE_VAR(i, PID_PARAM(Kp, e));
  233. EEPROM_WRITE_VAR(i, PID_PARAM(Ki, e));
  234. EEPROM_WRITE_VAR(i, PID_PARAM(Kd, e));
  235. #if ENABLED(PID_ADD_EXTRUSION_RATE)
  236. EEPROM_WRITE_VAR(i, PID_PARAM(Kc, e));
  237. #else
  238. dummy = 1.0f; // 1.0 = default kc
  239. EEPROM_WRITE_VAR(i, dummy);
  240. #endif
  241. }
  242. else
  243. #endif // !PIDTEMP
  244. {
  245. dummy = DUMMY_PID_VALUE; // When read, will not change the existing value
  246. EEPROM_WRITE_VAR(i, dummy); // Kp
  247. dummy = 0.0f;
  248. for (uint8_t q = 3; q--;) EEPROM_WRITE_VAR(i, dummy); // Ki, Kd, Kc
  249. }
  250. } // Extruders Loop
  251. #if DISABLED(PID_ADD_EXTRUSION_RATE)
  252. int lpq_len = 20;
  253. #endif
  254. EEPROM_WRITE_VAR(i, lpq_len);
  255. #if DISABLED(PIDTEMPBED)
  256. dummy = DUMMY_PID_VALUE;
  257. for (uint8_t q = 3; q--;) EEPROM_WRITE_VAR(i, dummy);
  258. #else
  259. EEPROM_WRITE_VAR(i, thermalManager.bedKp);
  260. EEPROM_WRITE_VAR(i, thermalManager.bedKi);
  261. EEPROM_WRITE_VAR(i, thermalManager.bedKd);
  262. #endif
  263. #if DISABLED(HAS_LCD_CONTRAST)
  264. const int lcd_contrast = 32;
  265. #endif
  266. EEPROM_WRITE_VAR(i, lcd_contrast);
  267. #if ENABLED(SCARA)
  268. EEPROM_WRITE_VAR(i, axis_scaling); // 3 floats
  269. #else
  270. dummy = 1.0f;
  271. EEPROM_WRITE_VAR(i, dummy);
  272. #endif
  273. #if ENABLED(FWRETRACT)
  274. EEPROM_WRITE_VAR(i, autoretract_enabled);
  275. EEPROM_WRITE_VAR(i, retract_length);
  276. #if EXTRUDERS > 1
  277. EEPROM_WRITE_VAR(i, retract_length_swap);
  278. #else
  279. dummy = 0.0f;
  280. EEPROM_WRITE_VAR(i, dummy);
  281. #endif
  282. EEPROM_WRITE_VAR(i, retract_feedrate);
  283. EEPROM_WRITE_VAR(i, retract_zlift);
  284. EEPROM_WRITE_VAR(i, retract_recover_length);
  285. #if EXTRUDERS > 1
  286. EEPROM_WRITE_VAR(i, retract_recover_length_swap);
  287. #else
  288. dummy = 0.0f;
  289. EEPROM_WRITE_VAR(i, dummy);
  290. #endif
  291. EEPROM_WRITE_VAR(i, retract_recover_feedrate);
  292. #endif // FWRETRACT
  293. EEPROM_WRITE_VAR(i, volumetric_enabled);
  294. // Save filament sizes
  295. for (uint8_t q = 0; q < 4; q++) {
  296. if (q < EXTRUDERS) dummy = filament_size[q];
  297. EEPROM_WRITE_VAR(i, dummy);
  298. }
  299. char ver2[4] = EEPROM_VERSION;
  300. int j = EEPROM_OFFSET;
  301. EEPROM_WRITE_VAR(j, ver2); // validate data
  302. // Report storage size
  303. SERIAL_ECHO_START;
  304. SERIAL_ECHOPAIR("Settings Stored (", i);
  305. SERIAL_ECHOLNPGM(" bytes)");
  306. }
  307. /**
  308. * Retrieve Configuration Settings - M501
  309. */
  310. void Config_RetrieveSettings() {
  311. int i = EEPROM_OFFSET;
  312. char stored_ver[4];
  313. char ver[4] = EEPROM_VERSION;
  314. EEPROM_READ_VAR(i, stored_ver); //read stored version
  315. // SERIAL_ECHOLN("Version: [" << ver << "] Stored version: [" << stored_ver << "]");
  316. if (strncmp(ver, stored_ver, 3) != 0) {
  317. Config_ResetDefault();
  318. }
  319. else {
  320. float dummy = 0;
  321. // version number match
  322. EEPROM_READ_VAR(i, planner.axis_steps_per_unit);
  323. EEPROM_READ_VAR(i, planner.max_feedrate);
  324. EEPROM_READ_VAR(i, planner.max_acceleration_units_per_sq_second);
  325. // steps per sq second need to be updated to agree with the units per sq second (as they are what is used in the planner)
  326. planner.reset_acceleration_rates();
  327. EEPROM_READ_VAR(i, planner.acceleration);
  328. EEPROM_READ_VAR(i, planner.retract_acceleration);
  329. EEPROM_READ_VAR(i, planner.travel_acceleration);
  330. EEPROM_READ_VAR(i, planner.min_feedrate);
  331. EEPROM_READ_VAR(i, planner.min_travel_feedrate);
  332. EEPROM_READ_VAR(i, planner.min_segment_time);
  333. EEPROM_READ_VAR(i, planner.max_xy_jerk);
  334. EEPROM_READ_VAR(i, planner.max_z_jerk);
  335. EEPROM_READ_VAR(i, planner.max_e_jerk);
  336. EEPROM_READ_VAR(i, home_offset);
  337. uint8_t dummy_uint8 = 0, mesh_num_x = 0, mesh_num_y = 0;
  338. EEPROM_READ_VAR(i, dummy_uint8);
  339. EEPROM_READ_VAR(i, dummy);
  340. EEPROM_READ_VAR(i, mesh_num_x);
  341. EEPROM_READ_VAR(i, mesh_num_y);
  342. #if ENABLED(MESH_BED_LEVELING)
  343. mbl.active = dummy_uint8;
  344. mbl.z_offset = dummy;
  345. if (mesh_num_x == MESH_NUM_X_POINTS && mesh_num_y == MESH_NUM_Y_POINTS) {
  346. EEPROM_READ_VAR(i, mbl.z_values);
  347. } else {
  348. mbl.reset();
  349. for (uint8_t q = 0; q < mesh_num_x * mesh_num_y; q++) EEPROM_READ_VAR(i, dummy);
  350. }
  351. #else
  352. for (uint8_t q = 0; q < mesh_num_x * mesh_num_y; q++) EEPROM_READ_VAR(i, dummy);
  353. #endif // MESH_BED_LEVELING
  354. #if DISABLED(AUTO_BED_LEVELING_FEATURE)
  355. float zprobe_zoffset = 0;
  356. #endif
  357. EEPROM_READ_VAR(i, zprobe_zoffset);
  358. #if ENABLED(DELTA)
  359. EEPROM_READ_VAR(i, endstop_adj); // 3 floats
  360. EEPROM_READ_VAR(i, delta_radius); // 1 float
  361. EEPROM_READ_VAR(i, delta_diagonal_rod); // 1 float
  362. EEPROM_READ_VAR(i, delta_segments_per_second); // 1 float
  363. EEPROM_READ_VAR(i, delta_diagonal_rod_trim_tower_1); // 1 float
  364. EEPROM_READ_VAR(i, delta_diagonal_rod_trim_tower_2); // 1 float
  365. EEPROM_READ_VAR(i, delta_diagonal_rod_trim_tower_3); // 1 float
  366. recalc_delta_settings(delta_radius, delta_diagonal_rod);
  367. #elif ENABLED(Z_DUAL_ENDSTOPS)
  368. EEPROM_READ_VAR(i, z_endstop_adj);
  369. dummy = 0.0f;
  370. for (uint8_t q=8; q--;) EEPROM_READ_VAR(i, dummy);
  371. #else
  372. dummy = 0.0f;
  373. for (uint8_t q=9; q--;) EEPROM_READ_VAR(i, dummy);
  374. #endif
  375. #if DISABLED(ULTIPANEL)
  376. int plaPreheatHotendTemp, plaPreheatHPBTemp, plaPreheatFanSpeed,
  377. absPreheatHotendTemp, absPreheatHPBTemp, absPreheatFanSpeed;
  378. #endif
  379. EEPROM_READ_VAR(i, plaPreheatHotendTemp);
  380. EEPROM_READ_VAR(i, plaPreheatHPBTemp);
  381. EEPROM_READ_VAR(i, plaPreheatFanSpeed);
  382. EEPROM_READ_VAR(i, absPreheatHotendTemp);
  383. EEPROM_READ_VAR(i, absPreheatHPBTemp);
  384. EEPROM_READ_VAR(i, absPreheatFanSpeed);
  385. #if ENABLED(PIDTEMP)
  386. for (uint8_t e = 0; e < 4; e++) { // 4 = max extruders currently supported by Marlin
  387. EEPROM_READ_VAR(i, dummy); // Kp
  388. if (e < EXTRUDERS && dummy != DUMMY_PID_VALUE) {
  389. // do not need to scale PID values as the values in EEPROM are already scaled
  390. PID_PARAM(Kp, e) = dummy;
  391. EEPROM_READ_VAR(i, PID_PARAM(Ki, e));
  392. EEPROM_READ_VAR(i, PID_PARAM(Kd, e));
  393. #if ENABLED(PID_ADD_EXTRUSION_RATE)
  394. EEPROM_READ_VAR(i, PID_PARAM(Kc, e));
  395. #else
  396. EEPROM_READ_VAR(i, dummy);
  397. #endif
  398. }
  399. else {
  400. for (uint8_t q=3; q--;) EEPROM_READ_VAR(i, dummy); // Ki, Kd, Kc
  401. }
  402. }
  403. #else // !PIDTEMP
  404. // 4 x 4 = 16 slots for PID parameters
  405. for (uint8_t q=16; q--;) EEPROM_READ_VAR(i, dummy); // 4x Kp, Ki, Kd, Kc
  406. #endif // !PIDTEMP
  407. #if DISABLED(PID_ADD_EXTRUSION_RATE)
  408. int lpq_len;
  409. #endif
  410. EEPROM_READ_VAR(i, lpq_len);
  411. #if ENABLED(PIDTEMPBED)
  412. EEPROM_READ_VAR(i, dummy); // bedKp
  413. if (dummy != DUMMY_PID_VALUE) {
  414. thermalManager.bedKp = dummy;
  415. EEPROM_READ_VAR(i, thermalManager.bedKi);
  416. EEPROM_READ_VAR(i, thermalManager.bedKd);
  417. }
  418. #else
  419. for (uint8_t q=3; q--;) EEPROM_READ_VAR(i, dummy); // bedKp, bedKi, bedKd
  420. #endif
  421. #if DISABLED(HAS_LCD_CONTRAST)
  422. int lcd_contrast;
  423. #endif
  424. EEPROM_READ_VAR(i, lcd_contrast);
  425. #if ENABLED(SCARA)
  426. EEPROM_READ_VAR(i, axis_scaling); // 3 floats
  427. #else
  428. EEPROM_READ_VAR(i, dummy);
  429. #endif
  430. #if ENABLED(FWRETRACT)
  431. EEPROM_READ_VAR(i, autoretract_enabled);
  432. EEPROM_READ_VAR(i, retract_length);
  433. #if EXTRUDERS > 1
  434. EEPROM_READ_VAR(i, retract_length_swap);
  435. #else
  436. EEPROM_READ_VAR(i, dummy);
  437. #endif
  438. EEPROM_READ_VAR(i, retract_feedrate);
  439. EEPROM_READ_VAR(i, retract_zlift);
  440. EEPROM_READ_VAR(i, retract_recover_length);
  441. #if EXTRUDERS > 1
  442. EEPROM_READ_VAR(i, retract_recover_length_swap);
  443. #else
  444. EEPROM_READ_VAR(i, dummy);
  445. #endif
  446. EEPROM_READ_VAR(i, retract_recover_feedrate);
  447. #endif // FWRETRACT
  448. EEPROM_READ_VAR(i, volumetric_enabled);
  449. for (uint8_t q = 0; q < 4; q++) {
  450. EEPROM_READ_VAR(i, dummy);
  451. if (q < EXTRUDERS) filament_size[q] = dummy;
  452. }
  453. calculate_volumetric_multipliers();
  454. // Call thermalManager.updatePID (similar to when we have processed M301)
  455. thermalManager.updatePID();
  456. // Report settings retrieved and length
  457. SERIAL_ECHO_START;
  458. SERIAL_ECHO(ver);
  459. SERIAL_ECHOPAIR(" stored settings retrieved (", i);
  460. SERIAL_ECHOLNPGM(" bytes)");
  461. }
  462. #if ENABLED(EEPROM_CHITCHAT)
  463. Config_PrintSettings();
  464. #endif
  465. }
  466. #endif // EEPROM_SETTINGS
  467. /**
  468. * Reset Configuration Settings - M502
  469. */
  470. void Config_ResetDefault() {
  471. float tmp1[] = DEFAULT_AXIS_STEPS_PER_UNIT;
  472. float tmp2[] = DEFAULT_MAX_FEEDRATE;
  473. long tmp3[] = DEFAULT_MAX_ACCELERATION;
  474. for (uint8_t i = 0; i < NUM_AXIS; i++) {
  475. planner.axis_steps_per_unit[i] = tmp1[i];
  476. planner.max_feedrate[i] = tmp2[i];
  477. planner.max_acceleration_units_per_sq_second[i] = tmp3[i];
  478. #if ENABLED(SCARA)
  479. if (i < COUNT(axis_scaling))
  480. axis_scaling[i] = 1;
  481. #endif
  482. }
  483. // steps per sq second need to be updated to agree with the units per sq second
  484. planner.reset_acceleration_rates();
  485. planner.acceleration = DEFAULT_ACCELERATION;
  486. planner.retract_acceleration = DEFAULT_RETRACT_ACCELERATION;
  487. planner.travel_acceleration = DEFAULT_TRAVEL_ACCELERATION;
  488. planner.min_feedrate = DEFAULT_MINIMUMFEEDRATE;
  489. planner.min_segment_time = DEFAULT_MINSEGMENTTIME;
  490. planner.min_travel_feedrate = DEFAULT_MINTRAVELFEEDRATE;
  491. planner.max_xy_jerk = DEFAULT_XYJERK;
  492. planner.max_z_jerk = DEFAULT_ZJERK;
  493. planner.max_e_jerk = DEFAULT_EJERK;
  494. home_offset[X_AXIS] = home_offset[Y_AXIS] = home_offset[Z_AXIS] = 0;
  495. #if ENABLED(MESH_BED_LEVELING)
  496. mbl.active = false;
  497. #endif
  498. #if ENABLED(AUTO_BED_LEVELING_FEATURE)
  499. zprobe_zoffset = Z_PROBE_OFFSET_FROM_EXTRUDER;
  500. #endif
  501. #if ENABLED(DELTA)
  502. endstop_adj[X_AXIS] = endstop_adj[Y_AXIS] = endstop_adj[Z_AXIS] = 0;
  503. delta_radius = DELTA_RADIUS;
  504. delta_diagonal_rod = DELTA_DIAGONAL_ROD;
  505. delta_segments_per_second = DELTA_SEGMENTS_PER_SECOND;
  506. delta_diagonal_rod_trim_tower_1 = DELTA_DIAGONAL_ROD_TRIM_TOWER_1;
  507. delta_diagonal_rod_trim_tower_2 = DELTA_DIAGONAL_ROD_TRIM_TOWER_2;
  508. delta_diagonal_rod_trim_tower_3 = DELTA_DIAGONAL_ROD_TRIM_TOWER_3;
  509. recalc_delta_settings(delta_radius, delta_diagonal_rod);
  510. #elif ENABLED(Z_DUAL_ENDSTOPS)
  511. z_endstop_adj = 0;
  512. #endif
  513. #if ENABLED(ULTIPANEL)
  514. plaPreheatHotendTemp = PLA_PREHEAT_HOTEND_TEMP;
  515. plaPreheatHPBTemp = PLA_PREHEAT_HPB_TEMP;
  516. plaPreheatFanSpeed = PLA_PREHEAT_FAN_SPEED;
  517. absPreheatHotendTemp = ABS_PREHEAT_HOTEND_TEMP;
  518. absPreheatHPBTemp = ABS_PREHEAT_HPB_TEMP;
  519. absPreheatFanSpeed = ABS_PREHEAT_FAN_SPEED;
  520. #endif
  521. #if ENABLED(HAS_LCD_CONTRAST)
  522. lcd_contrast = DEFAULT_LCD_CONTRAST;
  523. #endif
  524. #if ENABLED(PIDTEMP)
  525. #if ENABLED(PID_PARAMS_PER_EXTRUDER)
  526. for (uint8_t e = 0; e < EXTRUDERS; e++)
  527. #else
  528. int e = 0; UNUSED(e); // only need to write once
  529. #endif
  530. {
  531. PID_PARAM(Kp, e) = DEFAULT_Kp;
  532. PID_PARAM(Ki, e) = scalePID_i(DEFAULT_Ki);
  533. PID_PARAM(Kd, e) = scalePID_d(DEFAULT_Kd);
  534. #if ENABLED(PID_ADD_EXTRUSION_RATE)
  535. PID_PARAM(Kc, e) = DEFAULT_Kc;
  536. #endif
  537. }
  538. #if ENABLED(PID_ADD_EXTRUSION_RATE)
  539. lpq_len = 20; // default last-position-queue size
  540. #endif
  541. // call thermalManager.updatePID (similar to when we have processed M301)
  542. thermalManager.updatePID();
  543. #endif // PIDTEMP
  544. #if ENABLED(PIDTEMPBED)
  545. thermalManager.bedKp = DEFAULT_bedKp;
  546. thermalManager.bedKi = scalePID_i(DEFAULT_bedKi);
  547. thermalManager.bedKd = scalePID_d(DEFAULT_bedKd);
  548. #endif
  549. #if ENABLED(FWRETRACT)
  550. autoretract_enabled = false;
  551. retract_length = RETRACT_LENGTH;
  552. #if EXTRUDERS > 1
  553. retract_length_swap = RETRACT_LENGTH_SWAP;
  554. #endif
  555. retract_feedrate = RETRACT_FEEDRATE;
  556. retract_zlift = RETRACT_ZLIFT;
  557. retract_recover_length = RETRACT_RECOVER_LENGTH;
  558. #if EXTRUDERS > 1
  559. retract_recover_length_swap = RETRACT_RECOVER_LENGTH_SWAP;
  560. #endif
  561. retract_recover_feedrate = RETRACT_RECOVER_FEEDRATE;
  562. #endif
  563. volumetric_enabled = false;
  564. for (uint8_t q = 0; q < COUNT(filament_size); q++)
  565. filament_size[q] = DEFAULT_NOMINAL_FILAMENT_DIA;
  566. calculate_volumetric_multipliers();
  567. SERIAL_ECHO_START;
  568. SERIAL_ECHOLNPGM("Hardcoded Default Settings Loaded");
  569. }
  570. #if DISABLED(DISABLE_M503)
  571. /**
  572. * Print Configuration Settings - M503
  573. */
  574. #define CONFIG_ECHO_START do{ if (!forReplay) SERIAL_ECHO_START; }while(0)
  575. void Config_PrintSettings(bool forReplay) {
  576. // Always have this function, even with EEPROM_SETTINGS disabled, the current values will be shown
  577. CONFIG_ECHO_START;
  578. if (!forReplay) {
  579. SERIAL_ECHOLNPGM("Steps per unit:");
  580. CONFIG_ECHO_START;
  581. }
  582. SERIAL_ECHOPAIR(" M92 X", planner.axis_steps_per_unit[X_AXIS]);
  583. SERIAL_ECHOPAIR(" Y", planner.axis_steps_per_unit[Y_AXIS]);
  584. SERIAL_ECHOPAIR(" Z", planner.axis_steps_per_unit[Z_AXIS]);
  585. SERIAL_ECHOPAIR(" E", planner.axis_steps_per_unit[E_AXIS]);
  586. SERIAL_EOL;
  587. CONFIG_ECHO_START;
  588. #if ENABLED(SCARA)
  589. if (!forReplay) {
  590. SERIAL_ECHOLNPGM("Scaling factors:");
  591. CONFIG_ECHO_START;
  592. }
  593. SERIAL_ECHOPAIR(" M365 X", axis_scaling[X_AXIS]);
  594. SERIAL_ECHOPAIR(" Y", axis_scaling[Y_AXIS]);
  595. SERIAL_ECHOPAIR(" Z", axis_scaling[Z_AXIS]);
  596. SERIAL_EOL;
  597. CONFIG_ECHO_START;
  598. #endif // SCARA
  599. if (!forReplay) {
  600. SERIAL_ECHOLNPGM("Maximum feedrates (mm/s):");
  601. CONFIG_ECHO_START;
  602. }
  603. SERIAL_ECHOPAIR(" M203 X", planner.max_feedrate[X_AXIS]);
  604. SERIAL_ECHOPAIR(" Y", planner.max_feedrate[Y_AXIS]);
  605. SERIAL_ECHOPAIR(" Z", planner.max_feedrate[Z_AXIS]);
  606. SERIAL_ECHOPAIR(" E", planner.max_feedrate[E_AXIS]);
  607. SERIAL_EOL;
  608. CONFIG_ECHO_START;
  609. if (!forReplay) {
  610. SERIAL_ECHOLNPGM("Maximum Acceleration (mm/s2):");
  611. CONFIG_ECHO_START;
  612. }
  613. SERIAL_ECHOPAIR(" M201 X", planner.max_acceleration_units_per_sq_second[X_AXIS]);
  614. SERIAL_ECHOPAIR(" Y", planner.max_acceleration_units_per_sq_second[Y_AXIS]);
  615. SERIAL_ECHOPAIR(" Z", planner.max_acceleration_units_per_sq_second[Z_AXIS]);
  616. SERIAL_ECHOPAIR(" E", planner.max_acceleration_units_per_sq_second[E_AXIS]);
  617. SERIAL_EOL;
  618. CONFIG_ECHO_START;
  619. if (!forReplay) {
  620. SERIAL_ECHOLNPGM("Accelerations: P=printing, R=retract and T=travel");
  621. CONFIG_ECHO_START;
  622. }
  623. SERIAL_ECHOPAIR(" M204 P", planner.acceleration);
  624. SERIAL_ECHOPAIR(" R", planner.retract_acceleration);
  625. SERIAL_ECHOPAIR(" T", planner.travel_acceleration);
  626. SERIAL_EOL;
  627. CONFIG_ECHO_START;
  628. if (!forReplay) {
  629. SERIAL_ECHOLNPGM("Advanced variables: S=Min feedrate (mm/s), T=Min travel feedrate (mm/s), B=minimum segment time (ms), X=maximum XY jerk (mm/s), Z=maximum Z jerk (mm/s), E=maximum E jerk (mm/s)");
  630. CONFIG_ECHO_START;
  631. }
  632. SERIAL_ECHOPAIR(" M205 S", planner.min_feedrate);
  633. SERIAL_ECHOPAIR(" T", planner.min_travel_feedrate);
  634. SERIAL_ECHOPAIR(" B", planner.min_segment_time);
  635. SERIAL_ECHOPAIR(" X", planner.max_xy_jerk);
  636. SERIAL_ECHOPAIR(" Z", planner.max_z_jerk);
  637. SERIAL_ECHOPAIR(" E", planner.max_e_jerk);
  638. SERIAL_EOL;
  639. CONFIG_ECHO_START;
  640. if (!forReplay) {
  641. SERIAL_ECHOLNPGM("Home offset (mm):");
  642. CONFIG_ECHO_START;
  643. }
  644. SERIAL_ECHOPAIR(" M206 X", home_offset[X_AXIS]);
  645. SERIAL_ECHOPAIR(" Y", home_offset[Y_AXIS]);
  646. SERIAL_ECHOPAIR(" Z", home_offset[Z_AXIS]);
  647. SERIAL_EOL;
  648. #if ENABLED(MESH_BED_LEVELING)
  649. if (!forReplay) {
  650. SERIAL_ECHOLNPGM("Mesh bed leveling:");
  651. CONFIG_ECHO_START;
  652. }
  653. SERIAL_ECHOPAIR(" M420 S", mbl.active);
  654. SERIAL_ECHOPAIR(" X", MESH_NUM_X_POINTS);
  655. SERIAL_ECHOPAIR(" Y", MESH_NUM_Y_POINTS);
  656. SERIAL_EOL;
  657. for (uint8_t py = 1; py <= MESH_NUM_Y_POINTS; py++) {
  658. for (uint8_t px = 1; px <= MESH_NUM_X_POINTS; px++) {
  659. CONFIG_ECHO_START;
  660. SERIAL_ECHOPAIR(" G29 S3 X", px);
  661. SERIAL_ECHOPAIR(" Y", py);
  662. SERIAL_ECHOPGM(" Z");
  663. SERIAL_PROTOCOL_F(mbl.z_values[py-1][px-1], 5);
  664. SERIAL_EOL;
  665. }
  666. }
  667. #endif
  668. #if ENABLED(DELTA)
  669. CONFIG_ECHO_START;
  670. if (!forReplay) {
  671. SERIAL_ECHOLNPGM("Endstop adjustment (mm):");
  672. CONFIG_ECHO_START;
  673. }
  674. SERIAL_ECHOPAIR(" M666 X", endstop_adj[X_AXIS]);
  675. SERIAL_ECHOPAIR(" Y", endstop_adj[Y_AXIS]);
  676. SERIAL_ECHOPAIR(" Z", endstop_adj[Z_AXIS]);
  677. SERIAL_EOL;
  678. CONFIG_ECHO_START;
  679. if (!forReplay) {
  680. SERIAL_ECHOLNPGM("Delta settings: L=diagonal_rod, R=radius, S=segments_per_second, ABC=diagonal_rod_trim_tower_[123]");
  681. CONFIG_ECHO_START;
  682. }
  683. SERIAL_ECHOPAIR(" M665 L", delta_diagonal_rod);
  684. SERIAL_ECHOPAIR(" R", delta_radius);
  685. SERIAL_ECHOPAIR(" S", delta_segments_per_second);
  686. SERIAL_ECHOPAIR(" A", delta_diagonal_rod_trim_tower_1);
  687. SERIAL_ECHOPAIR(" B", delta_diagonal_rod_trim_tower_2);
  688. SERIAL_ECHOPAIR(" C", delta_diagonal_rod_trim_tower_3);
  689. SERIAL_EOL;
  690. #elif ENABLED(Z_DUAL_ENDSTOPS)
  691. CONFIG_ECHO_START;
  692. if (!forReplay) {
  693. SERIAL_ECHOLNPGM("Z2 Endstop adjustment (mm):");
  694. CONFIG_ECHO_START;
  695. }
  696. SERIAL_ECHOPAIR(" M666 Z", z_endstop_adj);
  697. SERIAL_EOL;
  698. #endif // DELTA
  699. #if ENABLED(ULTIPANEL)
  700. CONFIG_ECHO_START;
  701. if (!forReplay) {
  702. SERIAL_ECHOLNPGM("Material heatup parameters:");
  703. CONFIG_ECHO_START;
  704. }
  705. SERIAL_ECHOPAIR(" M145 S0 H", plaPreheatHotendTemp);
  706. SERIAL_ECHOPAIR(" B", plaPreheatHPBTemp);
  707. SERIAL_ECHOPAIR(" F", plaPreheatFanSpeed);
  708. SERIAL_EOL;
  709. CONFIG_ECHO_START;
  710. SERIAL_ECHOPAIR(" M145 S1 H", absPreheatHotendTemp);
  711. SERIAL_ECHOPAIR(" B", absPreheatHPBTemp);
  712. SERIAL_ECHOPAIR(" F", absPreheatFanSpeed);
  713. SERIAL_EOL;
  714. #endif // ULTIPANEL
  715. #if HAS_PID_HEATING
  716. CONFIG_ECHO_START;
  717. if (!forReplay) {
  718. SERIAL_ECHOLNPGM("PID settings:");
  719. }
  720. #if ENABLED(PIDTEMP)
  721. #if EXTRUDERS > 1
  722. if (forReplay) {
  723. for (uint8_t i = 0; i < EXTRUDERS; i++) {
  724. CONFIG_ECHO_START;
  725. SERIAL_ECHOPAIR(" M301 E", i);
  726. SERIAL_ECHOPAIR(" P", PID_PARAM(Kp, i));
  727. SERIAL_ECHOPAIR(" I", unscalePID_i(PID_PARAM(Ki, i)));
  728. SERIAL_ECHOPAIR(" D", unscalePID_d(PID_PARAM(Kd, i)));
  729. #if ENABLED(PID_ADD_EXTRUSION_RATE)
  730. SERIAL_ECHOPAIR(" C", PID_PARAM(Kc, i));
  731. if (i == 0) SERIAL_ECHOPAIR(" L", lpq_len);
  732. #endif
  733. SERIAL_EOL;
  734. }
  735. }
  736. else
  737. #endif // EXTRUDERS > 1
  738. // !forReplay || EXTRUDERS == 1
  739. {
  740. CONFIG_ECHO_START;
  741. SERIAL_ECHOPAIR(" M301 P", PID_PARAM(Kp, 0)); // for compatibility with hosts, only echo values for E0
  742. SERIAL_ECHOPAIR(" I", unscalePID_i(PID_PARAM(Ki, 0)));
  743. SERIAL_ECHOPAIR(" D", unscalePID_d(PID_PARAM(Kd, 0)));
  744. #if ENABLED(PID_ADD_EXTRUSION_RATE)
  745. SERIAL_ECHOPAIR(" C", PID_PARAM(Kc, 0));
  746. SERIAL_ECHOPAIR(" L", lpq_len);
  747. #endif
  748. SERIAL_EOL;
  749. }
  750. #endif // PIDTEMP
  751. #if ENABLED(PIDTEMPBED)
  752. CONFIG_ECHO_START;
  753. SERIAL_ECHOPAIR(" M304 P", thermalManager.bedKp);
  754. SERIAL_ECHOPAIR(" I", unscalePID_i(thermalManager.bedKi));
  755. SERIAL_ECHOPAIR(" D", unscalePID_d(thermalManager.bedKd));
  756. SERIAL_EOL;
  757. #endif
  758. #endif // PIDTEMP || PIDTEMPBED
  759. #if ENABLED(HAS_LCD_CONTRAST)
  760. CONFIG_ECHO_START;
  761. if (!forReplay) {
  762. SERIAL_ECHOLNPGM("LCD Contrast:");
  763. CONFIG_ECHO_START;
  764. }
  765. SERIAL_ECHOPAIR(" M250 C", lcd_contrast);
  766. SERIAL_EOL;
  767. #endif
  768. #if ENABLED(FWRETRACT)
  769. CONFIG_ECHO_START;
  770. if (!forReplay) {
  771. SERIAL_ECHOLNPGM("Retract: S=Length (mm) F:Speed (mm/m) Z: ZLift (mm)");
  772. CONFIG_ECHO_START;
  773. }
  774. SERIAL_ECHOPAIR(" M207 S", retract_length);
  775. #if EXTRUDERS > 1
  776. SERIAL_ECHOPAIR(" W", retract_length_swap);
  777. #endif
  778. SERIAL_ECHOPAIR(" F", retract_feedrate * 60);
  779. SERIAL_ECHOPAIR(" Z", retract_zlift);
  780. SERIAL_EOL;
  781. CONFIG_ECHO_START;
  782. if (!forReplay) {
  783. SERIAL_ECHOLNPGM("Recover: S=Extra length (mm) F:Speed (mm/m)");
  784. CONFIG_ECHO_START;
  785. }
  786. SERIAL_ECHOPAIR(" M208 S", retract_recover_length);
  787. #if EXTRUDERS > 1
  788. SERIAL_ECHOPAIR(" W", retract_recover_length_swap);
  789. #endif
  790. SERIAL_ECHOPAIR(" F", retract_recover_feedrate * 60);
  791. SERIAL_EOL;
  792. CONFIG_ECHO_START;
  793. if (!forReplay) {
  794. SERIAL_ECHOLNPGM("Auto-Retract: S=0 to disable, 1 to interpret extrude-only moves as retracts or recoveries");
  795. CONFIG_ECHO_START;
  796. }
  797. SERIAL_ECHOPAIR(" M209 S", (autoretract_enabled ? 1 : 0));
  798. SERIAL_EOL;
  799. #endif // FWRETRACT
  800. /**
  801. * Volumetric extrusion M200
  802. */
  803. if (!forReplay) {
  804. CONFIG_ECHO_START;
  805. SERIAL_ECHOPGM("Filament settings:");
  806. if (volumetric_enabled)
  807. SERIAL_EOL;
  808. else
  809. SERIAL_ECHOLNPGM(" Disabled");
  810. }
  811. CONFIG_ECHO_START;
  812. SERIAL_ECHOPAIR(" M200 D", filament_size[0]);
  813. SERIAL_EOL;
  814. #if EXTRUDERS > 1
  815. CONFIG_ECHO_START;
  816. SERIAL_ECHOPAIR(" M200 T1 D", filament_size[1]);
  817. SERIAL_EOL;
  818. #if EXTRUDERS > 2
  819. CONFIG_ECHO_START;
  820. SERIAL_ECHOPAIR(" M200 T2 D", filament_size[2]);
  821. SERIAL_EOL;
  822. #if EXTRUDERS > 3
  823. CONFIG_ECHO_START;
  824. SERIAL_ECHOPAIR(" M200 T3 D", filament_size[3]);
  825. SERIAL_EOL;
  826. #endif
  827. #endif
  828. #endif
  829. if (!volumetric_enabled) {
  830. CONFIG_ECHO_START;
  831. SERIAL_ECHOLNPGM(" M200 D0");
  832. }
  833. /**
  834. * Auto Bed Leveling
  835. */
  836. #if ENABLED(AUTO_BED_LEVELING_FEATURE)
  837. #if ENABLED(CUSTOM_M_CODES)
  838. if (!forReplay) {
  839. CONFIG_ECHO_START;
  840. SERIAL_ECHOLNPGM("Z-Probe Offset (mm):");
  841. }
  842. CONFIG_ECHO_START;
  843. SERIAL_ECHOPAIR(" M" STRINGIFY(CUSTOM_M_CODE_SET_Z_PROBE_OFFSET) " Z", zprobe_zoffset);
  844. #else
  845. if (!forReplay) {
  846. CONFIG_ECHO_START;
  847. SERIAL_ECHOPAIR("Z-Probe Offset (mm):", zprobe_zoffset);
  848. }
  849. #endif
  850. SERIAL_EOL;
  851. #endif
  852. }
  853. #endif // !DISABLE_M503