Browse Source

Merge pull request #3487 from thinkyhead/rc_redo_esenpaj_3479

Apply esenapaj 3479 and delta/scara position bugfix
Scott Lahteine 8 years ago
parent
commit
c1b953d38f
1 changed files with 19 additions and 19 deletions
  1. 19
    19
      Marlin/Marlin_main.cpp

+ 19
- 19
Marlin/Marlin_main.cpp View File

485
 
485
 
486
 void gcode_M114();
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
 #if ENABLED(DELTA) || ENABLED(SCARA)
502
 #if ENABLED(DELTA) || ENABLED(SCARA)
489
   inline void sync_plan_position_delta() {
503
   inline void sync_plan_position_delta() {
490
     #if ENABLED(DEBUG_LEVELING_FEATURE)
504
     #if ENABLED(DEBUG_LEVELING_FEATURE)
715
  */
729
  */
716
 void setup() {
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
   #ifdef DISABLE_JTAG
732
   #ifdef DISABLE_JTAG
724
     // Disable JTAG on AT90USB chips to free up pins for IO
733
     // Disable JTAG on AT90USB chips to free up pins for IO
725
     MCUCR = 0x80;
734
     MCUCR = 0x80;
779
   tp_init();    // Initialize temperature loop
788
   tp_init();    // Initialize temperature loop
780
   plan_init();  // Initialize planner;
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
   #if ENABLED(USE_WATCHDOG)
796
   #if ENABLED(USE_WATCHDOG)
783
     watchdog_init();
797
     watchdog_init();
784
   #endif
798
   #endif
1176
 
1190
 
1177
 #endif //DUAL_X_CARRIAGE
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
 static void set_axis_is_at_home(AxisEnum axis) {
1193
 static void set_axis_is_at_home(AxisEnum axis) {
1194
   #if ENABLED(DEBUG_LEVELING_FEATURE)
1194
   #if ENABLED(DEBUG_LEVELING_FEATURE)
1195
     if (DEBUGGING(LEVELING)) {
1195
     if (DEBUGGING(LEVELING)) {

Loading…
Cancel
Save