Browse Source

Merge pull request #8687 from AnHardt/1_first_move_probing_homing

[1.1.x] Don't split first_move while homing or probing
Scott Lahteine 7 years ago
parent
commit
348e989a50
No account linked to committer's email address
3 changed files with 7 additions and 2 deletions
  1. 2
    0
      Marlin/Marlin_main.cpp
  2. 4
    2
      Marlin/planner.cpp
  3. 1
    0
      Marlin/planner.h

+ 2
- 0
Marlin/Marlin_main.cpp View File

@@ -1719,6 +1719,7 @@ static void setup_for_endstop_or_probe_move() {
1719 1719
   saved_feedrate_percentage = feedrate_percentage;
1720 1720
   feedrate_percentage = 100;
1721 1721
   refresh_cmd_timeout();
1722
+  planner.split_first_move = false; 
1722 1723
 }
1723 1724
 
1724 1725
 static void clean_up_after_endstop_or_probe_move() {
@@ -1728,6 +1729,7 @@ static void clean_up_after_endstop_or_probe_move() {
1728 1729
   feedrate_mm_s = saved_feedrate_mm_s;
1729 1730
   feedrate_percentage = saved_feedrate_percentage;
1730 1731
   refresh_cmd_timeout();
1732
+  planner.split_first_move = true; 
1731 1733
 }
1732 1734
 
1733 1735
 #if HAS_BED_PROBE

+ 4
- 2
Marlin/planner.cpp View File

@@ -92,6 +92,8 @@ float Planner::max_feedrate_mm_s[XYZE_N], // Max speeds in mm per second
92 92
   uint8_t Planner::last_extruder = 0;     // Respond to extruder change
93 93
 #endif
94 94
 
95
+bool Planner::split_first_move = true;
96
+
95 97
 int16_t Planner::flow_percentage[EXTRUDERS] = ARRAY_BY_EXTRUDERS1(100); // Extrusion factor for each extruder
96 98
 
97 99
 float Planner::e_factor[EXTRUDERS],               // The flow percentage and volumetric multiplier combine to scale E movement
@@ -1433,8 +1435,8 @@ void Planner::_buffer_line(const float &a, const float &b, const float &c, const
1433 1435
   if (DEBUGGING(DRYRUN))
1434 1436
     position[E_AXIS] = target[E_AXIS];
1435 1437
 
1436
-  // Always split the first move into one longer and one shorter move
1437
-  if (!blocks_queued()) {
1438
+  // Always split the first move into two (if not homing or probing)
1439
+  if (!blocks_queued() && split_first_move) {
1438 1440
     #define _BETWEEN(A) (position[A##_AXIS] + target[A##_AXIS]) >> 1
1439 1441
     const int32_t between[XYZE] = { _BETWEEN(X), _BETWEEN(Y), _BETWEEN(Z), _BETWEEN(E) };
1440 1442
     DISABLE_STEPPER_DRIVER_INTERRUPT();

+ 1
- 0
Marlin/planner.h View File

@@ -161,6 +161,7 @@ class Planner {
161 161
                  travel_acceleration,  // Travel acceleration mm/s^2  DEFAULT ACCELERATION for all NON printing moves. M204 MXXXX
162 162
                  max_jerk[XYZE],       // The largest speed change requiring no acceleration
163 163
                  min_travel_feedrate_mm_s;
164
+    static bool split_first_move;
164 165
 
165 166
     #if HAS_LEVELING
166 167
       static bool leveling_active;          // Flag that bed leveling is enabled

Loading…
Cancel
Save