Browse Source

Merge pull request #5141 from thinkyhead/rc_old_slowdown_what

OLD_SLOWDOWN does nothing, so remove it
Scott Lahteine 8 years ago
parent
commit
0269347682
1 changed files with 11 additions and 17 deletions
  1. 11
    17
      Marlin/planner.cpp

+ 11
- 17
Marlin/planner.cpp View File

@@ -929,24 +929,18 @@ void Planner::_buffer_line(const float &a, const float &b, const float &c, const
929 929
   int moves_queued = movesplanned();
930 930
 
931 931
   // Slow down when the buffer starts to empty, rather than wait at the corner for a buffer refill
932
-  #if ENABLED(OLD_SLOWDOWN) || ENABLED(SLOWDOWN)
933
-    bool mq = moves_queued > 1 && moves_queued < (BLOCK_BUFFER_SIZE) / 2;
934
-    #if ENABLED(OLD_SLOWDOWN)
935
-      if (mq) fr_mm_s *= 2.0 * moves_queued / (BLOCK_BUFFER_SIZE);
936
-    #endif
937
-    #if ENABLED(SLOWDOWN)
938
-      //  segment time im micro seconds
939
-      unsigned long segment_time = lround(1000000.0/inverse_mm_s);
940
-      if (mq) {
941
-        if (segment_time < min_segment_time) {
942
-          // buffer is draining, add extra time.  The amount of time added increases if the buffer is still emptied more.
943
-          inverse_mm_s = 1000000.0 / (segment_time + lround(2 * (min_segment_time - segment_time) / moves_queued));
944
-          #ifdef XY_FREQUENCY_LIMIT
945
-            segment_time = lround(1000000.0 / inverse_mm_s);
946
-          #endif
947
-        }
932
+  #if ENABLED(SLOWDOWN)
933
+    // Segment time im micro seconds
934
+    unsigned long segment_time = lround(1000000.0 / inverse_mm_s);
935
+    if (moves_queued > 1 && moves_queued < (BLOCK_BUFFER_SIZE) / 2) {
936
+      if (segment_time < min_segment_time) {
937
+        // buffer is draining, add extra time.  The amount of time added increases if the buffer is still emptied more.
938
+        inverse_mm_s = 1000000.0 / (segment_time + lround(2 * (min_segment_time - segment_time) / moves_queued));
939
+        #ifdef XY_FREQUENCY_LIMIT
940
+          segment_time = lround(1000000.0 / inverse_mm_s);
941
+        #endif
948 942
       }
949
-    #endif
943
+    }
950 944
   #endif
951 945
 
952 946
   block->nominal_speed = block->millimeters * inverse_mm_s; // (mm/sec) Always > 0

Loading…
Cancel
Save