Sfoglia il codice sorgente

Merge pull request #3707 from thinkyhead/rc_fix_delta_blocking_move

Fix dipping on DELTA robots during G29
Scott Lahteine 9 anni fa
parent
commit
5f7ad16b19
1 ha cambiato i file con 14 aggiunte e 4 eliminazioni
  1. 14
    4
      Marlin/Marlin_main.cpp

+ 14
- 4
Marlin/Marlin_main.cpp Vedi File

343
 #if ENABLED(AUTO_BED_LEVELING_FEATURE)
343
 #if ENABLED(AUTO_BED_LEVELING_FEATURE)
344
   int xy_travel_speed = XY_TRAVEL_SPEED;
344
   int xy_travel_speed = XY_TRAVEL_SPEED;
345
   float zprobe_zoffset = Z_PROBE_OFFSET_FROM_EXTRUDER;
345
   float zprobe_zoffset = Z_PROBE_OFFSET_FROM_EXTRUDER;
346
+  bool bed_leveling_in_progress = false;
346
 #endif
347
 #endif
347
 
348
 
348
 #if ENABLED(Z_DUAL_ENDSTOPS) && DISABLED(DELTA)
349
 #if ENABLED(Z_DUAL_ENDSTOPS) && DISABLED(DELTA)
1632
       destination[X_AXIS] = x;
1633
       destination[X_AXIS] = x;
1633
       destination[Y_AXIS] = y;
1634
       destination[Y_AXIS] = y;
1634
       destination[Z_AXIS] = z;
1635
       destination[Z_AXIS] = z;
1635
-      prepare_move_raw(); // this will also set_current_to_destination
1636
+
1637
+      if (x == current_position[X_AXIS] && y == current_position[Y_AXIS])
1638
+        prepare_move_raw(); // this will also set_current_to_destination
1639
+      else
1640
+        prepare_move();     // this will also set_current_to_destination
1641
+
1636
       stepper.synchronize();
1642
       stepper.synchronize();
1637
 
1643
 
1638
     #else
1644
     #else
3238
 
3244
 
3239
     feedrate = homing_feedrate[Z_AXIS];
3245
     feedrate = homing_feedrate[Z_AXIS];
3240
 
3246
 
3247
+    bed_leveling_in_progress = true;
3248
+
3241
     #if ENABLED(AUTO_BED_LEVELING_GRID)
3249
     #if ENABLED(AUTO_BED_LEVELING_GRID)
3242
 
3250
 
3243
       // probe at the points of a lattice grid
3251
       // probe at the points of a lattice grid
3585
       stepper.synchronize();
3593
       stepper.synchronize();
3586
     #endif
3594
     #endif
3587
 
3595
 
3588
-    KEEPALIVE_STATE(IN_HANDLER);
3589
-
3590
     #if ENABLED(DEBUG_LEVELING_FEATURE)
3596
     #if ENABLED(DEBUG_LEVELING_FEATURE)
3591
       if (DEBUGGING(LEVELING)) {
3597
       if (DEBUGGING(LEVELING)) {
3592
         SERIAL_ECHOLNPGM("<<< gcode_G29");
3598
         SERIAL_ECHOLNPGM("<<< gcode_G29");
3593
       }
3599
       }
3594
     #endif
3600
     #endif
3595
 
3601
 
3602
+    bed_leveling_in_progress = false;
3603
+
3596
     report_current_position();
3604
     report_current_position();
3605
+
3606
+    KEEPALIVE_STATE(IN_HANDLER);
3597
   }
3607
   }
3598
 
3608
 
3599
   #if DISABLED(Z_PROBE_SLED) // could be avoided
3609
   #if DISABLED(Z_PROBE_SLED) // could be avoided
7305
       calculate_delta(target);
7315
       calculate_delta(target);
7306
 
7316
 
7307
       #if ENABLED(AUTO_BED_LEVELING_FEATURE)
7317
       #if ENABLED(AUTO_BED_LEVELING_FEATURE)
7308
-        adjust_delta(target);
7318
+        if (!bed_leveling_in_progress) adjust_delta(target);
7309
       #endif
7319
       #endif
7310
 
7320
 
7311
       //DEBUG_POS("prepare_move_delta", target);
7321
       //DEBUG_POS("prepare_move_delta", target);

Loading…
Annulla
Salva