|
@@ -20,9 +20,10 @@
|
20
|
20
|
*
|
21
|
21
|
*/
|
22
|
22
|
|
23
|
|
-#include "Marlin.h"
|
24
|
23
|
#include "utility.h"
|
25
|
|
-#include "temperature.h"
|
|
24
|
+
|
|
25
|
+#include "../Marlin.h"
|
|
26
|
+#include "../module/temperature.h"
|
26
|
27
|
|
27
|
28
|
void safe_delay(millis_t ms) {
|
28
|
29
|
while (ms > 50) {
|
|
@@ -255,3 +256,126 @@ void safe_delay(millis_t ms) {
|
255
|
256
|
}
|
256
|
257
|
|
257
|
258
|
#endif // ULTRA_LCD
|
|
259
|
+
|
|
260
|
+#if ENABLED(DEBUG_LEVELING_FEATURE)
|
|
261
|
+
|
|
262
|
+ #include "../module/probe.h"
|
|
263
|
+ #include "../module/motion.h"
|
|
264
|
+ #include "../module/stepper.h"
|
|
265
|
+ #include "../feature/bedlevel/bedlevel.h"
|
|
266
|
+
|
|
267
|
+ void log_machine_info() {
|
|
268
|
+ SERIAL_ECHOPGM("Machine Type: ");
|
|
269
|
+ #if ENABLED(DELTA)
|
|
270
|
+ SERIAL_ECHOLNPGM("Delta");
|
|
271
|
+ #elif IS_SCARA
|
|
272
|
+ SERIAL_ECHOLNPGM("SCARA");
|
|
273
|
+ #elif IS_CORE
|
|
274
|
+ SERIAL_ECHOLNPGM("Core");
|
|
275
|
+ #else
|
|
276
|
+ SERIAL_ECHOLNPGM("Cartesian");
|
|
277
|
+ #endif
|
|
278
|
+
|
|
279
|
+ SERIAL_ECHOPGM("Probe: ");
|
|
280
|
+ #if ENABLED(PROBE_MANUALLY)
|
|
281
|
+ SERIAL_ECHOLNPGM("PROBE_MANUALLY");
|
|
282
|
+ #elif ENABLED(FIX_MOUNTED_PROBE)
|
|
283
|
+ SERIAL_ECHOLNPGM("FIX_MOUNTED_PROBE");
|
|
284
|
+ #elif ENABLED(BLTOUCH)
|
|
285
|
+ SERIAL_ECHOLNPGM("BLTOUCH");
|
|
286
|
+ #elif HAS_Z_SERVO_ENDSTOP
|
|
287
|
+ SERIAL_ECHOLNPGM("SERVO PROBE");
|
|
288
|
+ #elif ENABLED(Z_PROBE_SLED)
|
|
289
|
+ SERIAL_ECHOLNPGM("Z_PROBE_SLED");
|
|
290
|
+ #elif ENABLED(Z_PROBE_ALLEN_KEY)
|
|
291
|
+ SERIAL_ECHOLNPGM("Z_PROBE_ALLEN_KEY");
|
|
292
|
+ #else
|
|
293
|
+ SERIAL_ECHOLNPGM("NONE");
|
|
294
|
+ #endif
|
|
295
|
+
|
|
296
|
+ #if HAS_BED_PROBE
|
|
297
|
+ SERIAL_ECHOPAIR("Probe Offset X:", X_PROBE_OFFSET_FROM_EXTRUDER);
|
|
298
|
+ SERIAL_ECHOPAIR(" Y:", Y_PROBE_OFFSET_FROM_EXTRUDER);
|
|
299
|
+ SERIAL_ECHOPAIR(" Z:", zprobe_zoffset);
|
|
300
|
+ #if X_PROBE_OFFSET_FROM_EXTRUDER > 0
|
|
301
|
+ SERIAL_ECHOPGM(" (Right");
|
|
302
|
+ #elif X_PROBE_OFFSET_FROM_EXTRUDER < 0
|
|
303
|
+ SERIAL_ECHOPGM(" (Left");
|
|
304
|
+ #elif Y_PROBE_OFFSET_FROM_EXTRUDER != 0
|
|
305
|
+ SERIAL_ECHOPGM(" (Middle");
|
|
306
|
+ #else
|
|
307
|
+ SERIAL_ECHOPGM(" (Aligned With");
|
|
308
|
+ #endif
|
|
309
|
+ #if Y_PROBE_OFFSET_FROM_EXTRUDER > 0
|
|
310
|
+ SERIAL_ECHOPGM("-Back");
|
|
311
|
+ #elif Y_PROBE_OFFSET_FROM_EXTRUDER < 0
|
|
312
|
+ SERIAL_ECHOPGM("-Front");
|
|
313
|
+ #elif X_PROBE_OFFSET_FROM_EXTRUDER != 0
|
|
314
|
+ SERIAL_ECHOPGM("-Center");
|
|
315
|
+ #endif
|
|
316
|
+ if (zprobe_zoffset < 0)
|
|
317
|
+ SERIAL_ECHOPGM(" & Below");
|
|
318
|
+ else if (zprobe_zoffset > 0)
|
|
319
|
+ SERIAL_ECHOPGM(" & Above");
|
|
320
|
+ else
|
|
321
|
+ SERIAL_ECHOPGM(" & Same Z as");
|
|
322
|
+ SERIAL_ECHOLNPGM(" Nozzle)");
|
|
323
|
+ #endif
|
|
324
|
+
|
|
325
|
+ #if HAS_ABL
|
|
326
|
+ SERIAL_ECHOPGM("Auto Bed Leveling: ");
|
|
327
|
+ #if ENABLED(AUTO_BED_LEVELING_LINEAR)
|
|
328
|
+ SERIAL_ECHOPGM("LINEAR");
|
|
329
|
+ #elif ENABLED(AUTO_BED_LEVELING_BILINEAR)
|
|
330
|
+ SERIAL_ECHOPGM("BILINEAR");
|
|
331
|
+ #elif ENABLED(AUTO_BED_LEVELING_3POINT)
|
|
332
|
+ SERIAL_ECHOPGM("3POINT");
|
|
333
|
+ #elif ENABLED(AUTO_BED_LEVELING_UBL)
|
|
334
|
+ SERIAL_ECHOPGM("UBL");
|
|
335
|
+ #endif
|
|
336
|
+ if (leveling_is_active()) {
|
|
337
|
+ SERIAL_ECHOLNPGM(" (enabled)");
|
|
338
|
+ #if ABL_PLANAR
|
|
339
|
+ const float diff[XYZ] = {
|
|
340
|
+ stepper.get_axis_position_mm(X_AXIS) - current_position[X_AXIS],
|
|
341
|
+ stepper.get_axis_position_mm(Y_AXIS) - current_position[Y_AXIS],
|
|
342
|
+ stepper.get_axis_position_mm(Z_AXIS) - current_position[Z_AXIS]
|
|
343
|
+ };
|
|
344
|
+ SERIAL_ECHOPGM("ABL Adjustment X");
|
|
345
|
+ if (diff[X_AXIS] > 0) SERIAL_CHAR('+');
|
|
346
|
+ SERIAL_ECHO(diff[X_AXIS]);
|
|
347
|
+ SERIAL_ECHOPGM(" Y");
|
|
348
|
+ if (diff[Y_AXIS] > 0) SERIAL_CHAR('+');
|
|
349
|
+ SERIAL_ECHO(diff[Y_AXIS]);
|
|
350
|
+ SERIAL_ECHOPGM(" Z");
|
|
351
|
+ if (diff[Z_AXIS] > 0) SERIAL_CHAR('+');
|
|
352
|
+ SERIAL_ECHO(diff[Z_AXIS]);
|
|
353
|
+ #elif ENABLED(AUTO_BED_LEVELING_UBL)
|
|
354
|
+ SERIAL_ECHOPAIR("UBL Adjustment Z", stepper.get_axis_position_mm(Z_AXIS) - current_position[Z_AXIS]);
|
|
355
|
+ #elif ENABLED(AUTO_BED_LEVELING_BILINEAR)
|
|
356
|
+ SERIAL_ECHOPAIR("ABL Adjustment Z", bilinear_z_offset(current_position));
|
|
357
|
+ #endif
|
|
358
|
+ }
|
|
359
|
+ else
|
|
360
|
+ SERIAL_ECHOLNPGM(" (disabled)");
|
|
361
|
+
|
|
362
|
+ SERIAL_EOL();
|
|
363
|
+
|
|
364
|
+ #elif ENABLED(MESH_BED_LEVELING)
|
|
365
|
+
|
|
366
|
+ SERIAL_ECHOPGM("Mesh Bed Leveling");
|
|
367
|
+ if (leveling_is_active()) {
|
|
368
|
+ float lz = current_position[Z_AXIS];
|
|
369
|
+ planner.apply_leveling(current_position[X_AXIS], current_position[Y_AXIS], lz);
|
|
370
|
+ SERIAL_ECHOLNPGM(" (enabled)");
|
|
371
|
+ SERIAL_ECHOPAIR("MBL Adjustment Z", lz);
|
|
372
|
+ }
|
|
373
|
+ else
|
|
374
|
+ SERIAL_ECHOPGM(" (disabled)");
|
|
375
|
+
|
|
376
|
+ SERIAL_EOL();
|
|
377
|
+
|
|
378
|
+ #endif // MESH_BED_LEVELING
|
|
379
|
+ }
|
|
380
|
+
|
|
381
|
+#endif // DEBUG_LEVELING_FEATURE
|