|
@@ -438,7 +438,9 @@ void check_axes_activity() {
|
438
|
438
|
}
|
439
|
439
|
else {
|
440
|
440
|
#if FAN_PIN > -1
|
441
|
|
- if (FanSpeed != 0) analogWrite(FAN_PIN,FanSpeed); // If buffer is empty use current fan speed
|
|
441
|
+ if (FanSpeed != 0){
|
|
442
|
+ analogWrite(FAN_PIN,FanSpeed); // If buffer is empty use current fan speed
|
|
443
|
+ }
|
442
|
444
|
#endif
|
443
|
445
|
}
|
444
|
446
|
if((DISABLE_X) && (x_active == 0)) disable_x();
|
|
@@ -446,11 +448,14 @@ void check_axes_activity() {
|
446
|
448
|
if((DISABLE_Z) && (z_active == 0)) disable_z();
|
447
|
449
|
if((DISABLE_E) && (e_active == 0)) { disable_e0();disable_e1();disable_e2(); }
|
448
|
450
|
#if FAN_PIN > -1
|
449
|
|
- if((FanSpeed == 0) && (fan_speed ==0)) analogWrite(FAN_PIN, 0);
|
450
|
|
- #endif
|
|
451
|
+ if((FanSpeed == 0) && (fan_speed ==0)) {
|
|
452
|
+ analogWrite(FAN_PIN, 0);
|
|
453
|
+ }
|
|
454
|
+
|
451
|
455
|
if (FanSpeed != 0 && tail_fan_speed !=0) {
|
452
|
456
|
analogWrite(FAN_PIN,tail_fan_speed);
|
453
|
457
|
}
|
|
458
|
+ #endif
|
454
|
459
|
}
|
455
|
460
|
|
456
|
461
|
|
|
@@ -714,9 +719,9 @@ void plan_buffer_line(const float &x, const float &y, const float &z, const floa
|
714
|
719
|
if(abs(current_speed[E_AXIS]) > max_e_jerk/2)
|
715
|
720
|
vmax_junction = min(vmax_junction, max_e_jerk/2);
|
716
|
721
|
|
717
|
|
- if ((moves_queued > 1) && (previous_nominal_speed > 0.0)) {
|
|
722
|
+ if ((moves_queued > 1) && (previous_nominal_speed > 0.0001)) {
|
718
|
723
|
float jerk = sqrt(pow((current_speed[X_AXIS]-previous_speed[X_AXIS]), 2)+pow((current_speed[Y_AXIS]-previous_speed[Y_AXIS]), 2));
|
719
|
|
- if((previous_speed[X_AXIS] != 0.0) || (previous_speed[Y_AXIS] != 0.0)) {
|
|
724
|
+ if((abs(previous_speed[X_AXIS]) > 0.0001) || (abs(previous_speed[Y_AXIS]) > 0.0001)) {
|
720
|
725
|
vmax_junction = block->nominal_speed;
|
721
|
726
|
}
|
722
|
727
|
if (jerk > max_xy_jerk) {
|
|
@@ -750,6 +755,7 @@ void plan_buffer_line(const float &x, const float &y, const float &z, const floa
|
750
|
755
|
// Update previous path unit_vector and nominal speed
|
751
|
756
|
memcpy(previous_speed, current_speed, sizeof(previous_speed)); // previous_speed[] = current_speed[]
|
752
|
757
|
previous_nominal_speed = block->nominal_speed;
|
|
758
|
+
|
753
|
759
|
|
754
|
760
|
#ifdef ADVANCE
|
755
|
761
|
// Calculate advance rate
|