|
@@ -74,6 +74,7 @@ float acceleration; // Normal acceleration mm/s^2 THIS IS THE DEFAULT A
|
74
|
74
|
float retract_acceleration; // mm/s^2 filament pull-pack and push-forward while standing still in the other axis M204 TXXXX
|
75
|
75
|
float max_xy_jerk; //speed than can be stopped at once, if i understand correctly.
|
76
|
76
|
float max_z_jerk;
|
|
77
|
+float max_e_jerk;
|
77
|
78
|
float mintravelfeedrate;
|
78
|
79
|
unsigned long axis_steps_per_sqr_second[NUM_AXIS];
|
79
|
80
|
|
|
@@ -531,6 +532,13 @@ void plan_buffer_line(const float &x, const float &y, const float &z, const floa
|
531
|
532
|
if(block->steps_e != 0) { enable_e0();enable_e1();enable_e2(); }
|
532
|
533
|
|
533
|
534
|
|
|
535
|
+ if (block->steps_e == 0) {
|
|
536
|
+ if(feed_rate<mintravelfeedrate) feed_rate=mintravelfeedrate;
|
|
537
|
+ }
|
|
538
|
+ else {
|
|
539
|
+ if(feed_rate<minimumfeedrate) feed_rate=minimumfeedrate;
|
|
540
|
+ }
|
|
541
|
+
|
534
|
542
|
// slow down when de buffer starts to empty, rather than wait at the corner for a buffer refill
|
535
|
543
|
int moves_queued=(block_buffer_head-block_buffer_tail + BLOCK_BUFFER_SIZE) & (BLOCK_BUFFER_SIZE - 1);
|
536
|
544
|
#ifdef SLOWDOWN
|
|
@@ -555,12 +563,6 @@ void plan_buffer_line(const float &x, const float &y, const float &z, const floa
|
555
|
563
|
block->nominal_speed = block->millimeters * inverse_second; // (mm/sec) Always > 0
|
556
|
564
|
block->nominal_rate = ceil(block->step_event_count * inverse_second); // (step/sec) Always > 0
|
557
|
565
|
|
558
|
|
- if (block->steps_e == 0) {
|
559
|
|
- if(feed_rate<mintravelfeedrate) feed_rate=mintravelfeedrate;
|
560
|
|
- }
|
561
|
|
- else {
|
562
|
|
- if(feed_rate<minimumfeedrate) feed_rate=minimumfeedrate;
|
563
|
|
- }
|
564
|
566
|
|
565
|
567
|
/*
|
566
|
568
|
// segment time im micro seconds
|
|
@@ -705,7 +707,9 @@ void plan_buffer_line(const float &x, const float &y, const float &z, const floa
|
705
|
707
|
if(abs(current_speed[Z_AXIS]) > max_z_jerk/2)
|
706
|
708
|
vmax_junction = max_z_jerk/2;
|
707
|
709
|
vmax_junction = min(vmax_junction, block->nominal_speed);
|
708
|
|
-
|
|
710
|
+ if(abs(current_speed[E_AXIS]) > max_e_jerk/2)
|
|
711
|
+ vmax_junction = min(vmax_junction, max_z_jerk/2);
|
|
712
|
+
|
709
|
713
|
if ((moves_queued > 1) && (previous_nominal_speed > 0.0)) {
|
710
|
714
|
float jerk = sqrt(pow((current_speed[X_AXIS]-previous_speed[X_AXIS]), 2)+pow((current_speed[Y_AXIS]-previous_speed[Y_AXIS]), 2));
|
711
|
715
|
if((previous_speed[X_AXIS] != 0.0) || (previous_speed[Y_AXIS] != 0.0)) {
|
|
@@ -717,6 +721,9 @@ void plan_buffer_line(const float &x, const float &y, const float &z, const floa
|
717
|
721
|
if(abs(current_speed[Z_AXIS] - previous_speed[Z_AXIS]) > max_z_jerk) {
|
718
|
722
|
vmax_junction *= (max_z_jerk/abs(current_speed[Z_AXIS] - previous_speed[Z_AXIS]));
|
719
|
723
|
}
|
|
724
|
+ if(abs(current_speed[E_AXIS] - previous_speed[E_AXIS]) > max_e_jerk) {
|
|
725
|
+ vmax_junction *= (max_e_jerk/abs(current_speed[E_AXIS] - previous_speed[E_AXIS]));
|
|
726
|
+ }
|
720
|
727
|
}
|
721
|
728
|
block->max_entry_speed = vmax_junction;
|
722
|
729
|
|