|
@@ -485,6 +485,20 @@ void serial_echopair_P(const char* s_P, unsigned long v) { serialprintPGM(s_P);
|
485
|
485
|
|
486
|
486
|
void gcode_M114();
|
487
|
487
|
|
|
488
|
+#if ENABLED(DEBUG_LEVELING_FEATURE)
|
|
489
|
+ void print_xyz(const char* prefix, const float x, const float y, const float z) {
|
|
490
|
+ SERIAL_ECHO(prefix);
|
|
491
|
+ SERIAL_ECHOPAIR(": (", x);
|
|
492
|
+ SERIAL_ECHOPAIR(", ", y);
|
|
493
|
+ SERIAL_ECHOPAIR(", ", z);
|
|
494
|
+ SERIAL_ECHOLNPGM(")");
|
|
495
|
+ }
|
|
496
|
+ void print_xyz(const char* prefix, const float xyz[]) {
|
|
497
|
+ print_xyz(prefix, xyz[X_AXIS], xyz[Y_AXIS], xyz[Z_AXIS]);
|
|
498
|
+ }
|
|
499
|
+ #define DEBUG_POS(PREFIX,VAR) do{ SERIAL_ECHOPGM(PREFIX); print_xyz(" > " STRINGIFY(VAR), VAR); }while(0)
|
|
500
|
+#endif
|
|
501
|
+
|
488
|
502
|
#if ENABLED(DELTA) || ENABLED(SCARA)
|
489
|
503
|
inline void sync_plan_position_delta() {
|
490
|
504
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
|
@@ -715,11 +729,6 @@ void servo_init() {
|
715
|
729
|
*/
|
716
|
730
|
void setup() {
|
717
|
731
|
|
718
|
|
- #if ENABLED(DELTA) || ENABLED(SCARA)
|
719
|
|
- // Vital to init kinematic equivalent for X0 Y0 Z0
|
720
|
|
- sync_plan_position_delta();
|
721
|
|
- #endif
|
722
|
|
-
|
723
|
732
|
#ifdef DISABLE_JTAG
|
724
|
733
|
// Disable JTAG on AT90USB chips to free up pins for IO
|
725
|
734
|
MCUCR = 0x80;
|
|
@@ -779,6 +788,11 @@ void setup() {
|
779
|
788
|
tp_init(); // Initialize temperature loop
|
780
|
789
|
plan_init(); // Initialize planner;
|
781
|
790
|
|
|
791
|
+ #if ENABLED(DELTA) || ENABLED(SCARA)
|
|
792
|
+ // Vital to init kinematic equivalent for X0 Y0 Z0
|
|
793
|
+ sync_plan_position_delta();
|
|
794
|
+ #endif
|
|
795
|
+
|
782
|
796
|
#if ENABLED(USE_WATCHDOG)
|
783
|
797
|
watchdog_init();
|
784
|
798
|
#endif
|
|
@@ -1176,20 +1190,6 @@ XYZ_CONSTS_FROM_CONFIG(signed char, home_dir, HOME_DIR);
|
1176
|
1190
|
|
1177
|
1191
|
#endif //DUAL_X_CARRIAGE
|
1178
|
1192
|
|
1179
|
|
-#if ENABLED(DEBUG_LEVELING_FEATURE)
|
1180
|
|
- void print_xyz(const char* prefix, const float x, const float y, const float z) {
|
1181
|
|
- SERIAL_ECHO(prefix);
|
1182
|
|
- SERIAL_ECHOPAIR(": (", x);
|
1183
|
|
- SERIAL_ECHOPAIR(", ", y);
|
1184
|
|
- SERIAL_ECHOPAIR(", ", z);
|
1185
|
|
- SERIAL_ECHOLNPGM(")");
|
1186
|
|
- }
|
1187
|
|
- void print_xyz(const char* prefix, const float xyz[]) {
|
1188
|
|
- print_xyz(prefix, xyz[X_AXIS], xyz[Y_AXIS], xyz[Z_AXIS]);
|
1189
|
|
- }
|
1190
|
|
- #define DEBUG_POS(PREFIX,VAR) do{ SERIAL_ECHOPGM(PREFIX); print_xyz(" > " STRINGIFY(VAR), VAR); }while(0)
|
1191
|
|
-#endif
|
1192
|
|
-
|
1193
|
1193
|
static void set_axis_is_at_home(AxisEnum axis) {
|
1194
|
1194
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
1195
|
1195
|
if (DEBUGGING(LEVELING)) {
|