|
@@ -829,7 +829,7 @@ void Planner::check_axes_activity() {
|
829
|
829
|
float inverse_millimeters = 1.0 / block->millimeters; // Inverse millimeters to remove multiple divides
|
830
|
830
|
|
831
|
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
|
834
|
int moves_queued = movesplanned();
|
835
|
835
|
|
|
@@ -841,21 +841,21 @@ void Planner::check_axes_activity() {
|
841
|
841
|
#endif
|
842
|
842
|
#if ENABLED(SLOWDOWN)
|
843
|
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
|
845
|
if (mq) {
|
846
|
846
|
if (segment_time < min_segment_time) {
|
847
|
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
|
849
|
#ifdef XY_FREQUENCY_LIMIT
|
850
|
|
- segment_time = lround(1000000.0 / inverse_second);
|
|
850
|
+ segment_time = lround(1000000.0 / inverse_mm_s);
|
851
|
851
|
#endif
|
852
|
852
|
}
|
853
|
853
|
}
|
854
|
854
|
#endif
|
855
|
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
|
860
|
#if ENABLED(FILAMENT_WIDTH_SENSOR)
|
861
|
861
|
static float filwidth_e_count = 0, filwidth_delay_dist = 0;
|
|
@@ -895,7 +895,7 @@ void Planner::check_axes_activity() {
|
895
|
895
|
float current_speed[NUM_AXIS];
|
896
|
896
|
float speed_factor = 1.0; //factor <=1 do decrease speed
|
897
|
897
|
LOOP_XYZE(i) {
|
898
|
|
- current_speed[i] = delta_mm[i] * inverse_second;
|
|
898
|
+ current_speed[i] = delta_mm[i] * inverse_mm_s;
|
899
|
899
|
float cs = fabs(current_speed[i]), mf = max_feedrate_mm_s[i];
|
900
|
900
|
if (cs > mf) speed_factor = min(speed_factor, mf / cs);
|
901
|
901
|
}
|