瀏覽代碼

OLD_SLOWDOWN does nothing, so remove it

Scott Lahteine 8 年之前
父節點
當前提交
12167bc8f3
共有 1 個檔案被更改,包括 11 行新增17 行删除
  1. 11
    17
      Marlin/planner.cpp

+ 11
- 17
Marlin/planner.cpp 查看文件

@@ -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…
取消
儲存