Browse Source

inverse_second => inverse_mm_s

Scott Lahteine 8 years ago
parent
commit
753283e020
1 changed files with 7 additions and 7 deletions
  1. 7
    7
      Marlin/planner.cpp

+ 7
- 7
Marlin/planner.cpp View File

829
   float inverse_millimeters = 1.0 / block->millimeters;  // Inverse millimeters to remove multiple divides
829
   float inverse_millimeters = 1.0 / block->millimeters;  // Inverse millimeters to remove multiple divides
830
 
830
 
831
   // Calculate moves/second for this move. No divide by zero due to previous checks.
831
   // Calculate moves/second for this move. No divide by zero due to previous checks.
832
-  float inverse_second = fr_mm_s * inverse_millimeters;
832
+  float inverse_mm_s = fr_mm_s * inverse_millimeters;
833
 
833
 
834
   int moves_queued = movesplanned();
834
   int moves_queued = movesplanned();
835
 
835
 
841
     #endif
841
     #endif
842
     #if ENABLED(SLOWDOWN)
842
     #if ENABLED(SLOWDOWN)
843
       //  segment time im micro seconds
843
       //  segment time im micro seconds
844
-      unsigned long segment_time = lround(1000000.0/inverse_second);
844
+      unsigned long segment_time = lround(1000000.0/inverse_mm_s);
845
       if (mq) {
845
       if (mq) {
846
         if (segment_time < min_segment_time) {
846
         if (segment_time < min_segment_time) {
847
           // buffer is draining, add extra time.  The amount of time added increases if the buffer is still emptied more.
847
           // buffer is draining, add extra time.  The amount of time added increases if the buffer is still emptied more.
848
-          inverse_second = 1000000.0 / (segment_time + lround(2 * (min_segment_time - segment_time) / moves_queued));
848
+          inverse_mm_s = 1000000.0 / (segment_time + lround(2 * (min_segment_time - segment_time) / moves_queued));
849
           #ifdef XY_FREQUENCY_LIMIT
849
           #ifdef XY_FREQUENCY_LIMIT
850
-            segment_time = lround(1000000.0 / inverse_second);
850
+            segment_time = lround(1000000.0 / inverse_mm_s);
851
           #endif
851
           #endif
852
         }
852
         }
853
       }
853
       }
854
     #endif
854
     #endif
855
   #endif
855
   #endif
856
 
856
 
857
-  block->nominal_speed = block->millimeters * inverse_second; // (mm/sec) Always > 0
858
-  block->nominal_rate = ceil(block->step_event_count * inverse_second); // (step/sec) Always > 0
857
+  block->nominal_speed = block->millimeters * inverse_mm_s; // (mm/sec) Always > 0
858
+  block->nominal_rate = ceil(block->step_event_count * inverse_mm_s); // (step/sec) Always > 0
859
 
859
 
860
   #if ENABLED(FILAMENT_WIDTH_SENSOR)
860
   #if ENABLED(FILAMENT_WIDTH_SENSOR)
861
     static float filwidth_e_count = 0, filwidth_delay_dist = 0;
861
     static float filwidth_e_count = 0, filwidth_delay_dist = 0;
895
   float current_speed[NUM_AXIS];
895
   float current_speed[NUM_AXIS];
896
   float speed_factor = 1.0; //factor <=1 do decrease speed
896
   float speed_factor = 1.0; //factor <=1 do decrease speed
897
   LOOP_XYZE(i) {
897
   LOOP_XYZE(i) {
898
-    current_speed[i] = delta_mm[i] * inverse_second;
898
+    current_speed[i] = delta_mm[i] * inverse_mm_s;
899
     float cs = fabs(current_speed[i]), mf = max_feedrate_mm_s[i];
899
     float cs = fabs(current_speed[i]), mf = max_feedrate_mm_s[i];
900
     if (cs > mf) speed_factor = min(speed_factor, mf / cs);
900
     if (cs > mf) speed_factor = min(speed_factor, mf / cs);
901
   }
901
   }

Loading…
Cancel
Save