Bladeren bron

Remove legacy ADVANCE feature

Scott Lahteine 7 jaren geleden
bovenliggende
commit
cbfcce09fa
35 gewijzigde bestanden met toevoegingen van 48 en 601 verwijderingen
  1. 1
    6
      Marlin/Conditionals_post.h
  2. 0
    14
      Marlin/Configuration_adv.h
  3. 2
    7
      Marlin/SanityCheck.h
  4. 0
    14
      Marlin/example_configurations/AlephObjects/TAZ4/Configuration_adv.h
  5. 0
    14
      Marlin/example_configurations/Anet/A6/Configuration_adv.h
  6. 0
    14
      Marlin/example_configurations/Anet/A8/Configuration_adv.h
  7. 0
    14
      Marlin/example_configurations/BQ/Hephestos/Configuration_adv.h
  8. 0
    14
      Marlin/example_configurations/BQ/Hephestos_2/Configuration_adv.h
  9. 0
    14
      Marlin/example_configurations/BQ/WITBOX/Configuration_adv.h
  10. 0
    14
      Marlin/example_configurations/Cartesio/Configuration_adv.h
  11. 0
    14
      Marlin/example_configurations/Creality/CR-10/Configuration_adv.h
  12. 0
    14
      Marlin/example_configurations/Felix/Configuration_adv.h
  13. 0
    14
      Marlin/example_configurations/Folger Tech/i3-2020/Configuration_adv.h
  14. 0
    14
      Marlin/example_configurations/Infitary/i3-M508/Configuration_adv.h
  15. 0
    14
      Marlin/example_configurations/Malyan/M150/Configuration_adv.h
  16. 0
    14
      Marlin/example_configurations/RigidBot/Configuration_adv.h
  17. 0
    14
      Marlin/example_configurations/SCARA/Configuration_adv.h
  18. 0
    14
      Marlin/example_configurations/Sanguinololu/Configuration_adv.h
  19. 0
    14
      Marlin/example_configurations/TinyBoy2/Configuration_adv.h
  20. 0
    14
      Marlin/example_configurations/Velleman/K8200/Configuration_adv.h
  21. 0
    14
      Marlin/example_configurations/Velleman/K8400/Configuration_adv.h
  22. 0
    14
      Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration_adv.h
  23. 0
    14
      Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration_adv.h
  24. 0
    14
      Marlin/example_configurations/delta/generic/Configuration_adv.h
  25. 0
    14
      Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h
  26. 0
    14
      Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h
  27. 0
    14
      Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h
  28. 0
    14
      Marlin/example_configurations/gCreate/gMax1.5+/Configuration_adv.h
  29. 0
    14
      Marlin/example_configurations/makibox/Configuration_adv.h
  30. 0
    14
      Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h
  31. 0
    14
      Marlin/example_configurations/wt150/Configuration_adv.h
  32. 1
    25
      Marlin/planner.cpp
  33. 0
    5
      Marlin/planner.h
  34. 31
    116
      Marlin/stepper.cpp
  35. 13
    36
      Marlin/stepper.h

+ 1
- 6
Marlin/Conditionals_post.h Bestand weergeven

@@ -227,13 +227,8 @@
227 227
   #define MICROSTEP16 HIGH,HIGH
228 228
 
229 229
   /**
230
-   * Advance calculated values
230
+   * Override here because this is set in Configuration_adv.h
231 231
    */
232
-  #if ENABLED(ADVANCE)
233
-    #define EXTRUSION_AREA (0.25 * (D_FILAMENT) * (D_FILAMENT) * M_PI)
234
-    #define STEPS_PER_CUBIC_MM_E (axis_steps_per_mm[E_AXIS_N] / (EXTRUSION_AREA))
235
-  #endif
236
-
237 232
   #if ENABLED(ULTIPANEL) && DISABLED(ELB_FULL_GRAPHIC_CONTROLLER)
238 233
     #undef SD_DETECT_INVERTED
239 234
   #endif

+ 0
- 14
Marlin/Configuration_adv.h Bestand weergeven

@@ -614,20 +614,6 @@
614 614
 
615 615
 // @section extruder
616 616
 
617
-// extruder advance constant (s2/mm3)
618
-//
619
-// advance (steps) = STEPS_PER_CUBIC_MM_E * EXTRUDER_ADVANCE_K * cubic mm per second ^ 2
620
-//
621
-// Hooke's law says:    force = k * distance
622
-// Bernoulli's principle says:  v ^ 2 / 2 + g . h + pressure / density = constant
623
-// so: v ^ 2 is proportional to number of steps we advance the extruder
624
-//#define ADVANCE
625
-
626
-#if ENABLED(ADVANCE)
627
-  #define EXTRUDER_ADVANCE_K .0
628
-  #define D_FILAMENT 2.85
629
-#endif
630
-
631 617
 /**
632 618
  * Implementation of linear pressure control
633 619
  *

+ 2
- 7
Marlin/SanityCheck.h Bestand weergeven

@@ -208,6 +208,8 @@
208 208
   #error "CONTROLLERFAN_PIN is now CONTROLLER_FAN_PIN, enabled with USE_CONTROLLER_FAN. Please update your Configuration_adv.h."
209 209
 #elif defined(MIN_RETRACT)
210 210
   #error "MIN_RETRACT is now MIN_AUTORETRACT and MAX_AUTORETRACT. Please update your Configuration_adv.h."
211
+#elif defined(ADVANCE)
212
+  #error "ADVANCE was removed in Marlin 1.1.6. Please use LIN_ADVANCE."
211 213
 #endif
212 214
 
213 215
 /**
@@ -816,13 +818,6 @@ static_assert(1 >= 0
816 818
 #endif // DISABLE_[XYZ]
817 819
 
818 820
 /**
819
- * Advance Extrusion
820
- */
821
-#if ENABLED(ADVANCE) && ENABLED(LIN_ADVANCE)
822
-  #error "You can enable ADVANCE or LIN_ADVANCE, but not both."
823
-#endif
824
-
825
-/**
826 821
  * Filament Width Sensor
827 822
  */
828 823
 #if ENABLED(FILAMENT_WIDTH_SENSOR) && !HAS_FILAMENT_WIDTH_SENSOR

+ 0
- 14
Marlin/example_configurations/AlephObjects/TAZ4/Configuration_adv.h Bestand weergeven

@@ -614,20 +614,6 @@
614 614
 
615 615
 // @section extruder
616 616
 
617
-// extruder advance constant (s2/mm3)
618
-//
619
-// advance (steps) = STEPS_PER_CUBIC_MM_E * EXTRUDER_ADVANCE_K * cubic mm per second ^ 2
620
-//
621
-// Hooke's law says:    force = k * distance
622
-// Bernoulli's principle says:  v ^ 2 / 2 + g . h + pressure / density = constant
623
-// so: v ^ 2 is proportional to number of steps we advance the extruder
624
-//#define ADVANCE
625
-
626
-#if ENABLED(ADVANCE)
627
-  #define EXTRUDER_ADVANCE_K .0
628
-  #define D_FILAMENT 2.85
629
-#endif
630
-
631 617
 /**
632 618
  * Implementation of linear pressure control
633 619
  *

+ 0
- 14
Marlin/example_configurations/Anet/A6/Configuration_adv.h Bestand weergeven

@@ -614,20 +614,6 @@
614 614
 
615 615
 // @section extruder
616 616
 
617
-// extruder advance constant (s2/mm3)
618
-//
619
-// advance (steps) = STEPS_PER_CUBIC_MM_E * EXTRUDER_ADVANCE_K * cubic mm per second ^ 2
620
-//
621
-// Hooke's law says:    force = k * distance
622
-// Bernoulli's principle says:  v ^ 2 / 2 + g . h + pressure / density = constant
623
-// so: v ^ 2 is proportional to number of steps we advance the extruder
624
-//#define ADVANCE
625
-
626
-#if ENABLED(ADVANCE)
627
-  #define EXTRUDER_ADVANCE_K .0
628
-  #define D_FILAMENT 2.85
629
-#endif
630
-
631 617
 /**
632 618
  * Implementation of linear pressure control
633 619
  *

+ 0
- 14
Marlin/example_configurations/Anet/A8/Configuration_adv.h Bestand weergeven

@@ -614,20 +614,6 @@
614 614
 
615 615
 // @section extruder
616 616
 
617
-// extruder advance constant (s2/mm3)
618
-//
619
-// advance (steps) = STEPS_PER_CUBIC_MM_E * EXTRUDER_ADVANCE_K * cubic mm per second ^ 2
620
-//
621
-// Hooke's law says:    force = k * distance
622
-// Bernoulli's principle says:  v ^ 2 / 2 + g . h + pressure / density = constant
623
-// so: v ^ 2 is proportional to number of steps we advance the extruder
624
-//#define ADVANCE
625
-
626
-#if ENABLED(ADVANCE)
627
-  #define EXTRUDER_ADVANCE_K .0
628
-  #define D_FILAMENT 2.85
629
-#endif
630
-
631 617
 /**
632 618
  * Implementation of linear pressure control
633 619
  *

+ 0
- 14
Marlin/example_configurations/BQ/Hephestos/Configuration_adv.h Bestand weergeven

@@ -614,20 +614,6 @@
614 614
 
615 615
 // @section extruder
616 616
 
617
-// extruder advance constant (s2/mm3)
618
-//
619
-// advance (steps) = STEPS_PER_CUBIC_MM_E * EXTRUDER_ADVANCE_K * cubic mm per second ^ 2
620
-//
621
-// Hooke's law says:    force = k * distance
622
-// Bernoulli's principle says:  v ^ 2 / 2 + g . h + pressure / density = constant
623
-// so: v ^ 2 is proportional to number of steps we advance the extruder
624
-//#define ADVANCE
625
-
626
-#if ENABLED(ADVANCE)
627
-  #define EXTRUDER_ADVANCE_K .0
628
-  #define D_FILAMENT 1.75
629
-#endif
630
-
631 617
 /**
632 618
  * Implementation of linear pressure control
633 619
  *

+ 0
- 14
Marlin/example_configurations/BQ/Hephestos_2/Configuration_adv.h Bestand weergeven

@@ -614,20 +614,6 @@
614 614
 
615 615
 // @section extruder
616 616
 
617
-// extruder advance constant (s2/mm3)
618
-//
619
-// advance (steps) = STEPS_PER_CUBIC_MM_E * EXTRUDER_ADVANCE_K * cubic mm per second ^ 2
620
-//
621
-// Hooke's law says:    force = k * distance
622
-// Bernoulli's principle says:  v ^ 2 / 2 + g . h + pressure / density = constant
623
-// so: v ^ 2 is proportional to number of steps we advance the extruder
624
-//#define ADVANCE
625
-
626
-#if ENABLED(ADVANCE)
627
-  #define EXTRUDER_ADVANCE_K .0
628
-  #define D_FILAMENT 2.85
629
-#endif
630
-
631 617
 /**
632 618
  * Implementation of linear pressure control
633 619
  *

+ 0
- 14
Marlin/example_configurations/BQ/WITBOX/Configuration_adv.h Bestand weergeven

@@ -614,20 +614,6 @@
614 614
 
615 615
 // @section extruder
616 616
 
617
-// extruder advance constant (s2/mm3)
618
-//
619
-// advance (steps) = STEPS_PER_CUBIC_MM_E * EXTRUDER_ADVANCE_K * cubic mm per second ^ 2
620
-//
621
-// Hooke's law says:    force = k * distance
622
-// Bernoulli's principle says:  v ^ 2 / 2 + g . h + pressure / density = constant
623
-// so: v ^ 2 is proportional to number of steps we advance the extruder
624
-//#define ADVANCE
625
-
626
-#if ENABLED(ADVANCE)
627
-  #define EXTRUDER_ADVANCE_K .0
628
-  #define D_FILAMENT 1.75
629
-#endif
630
-
631 617
 /**
632 618
  * Implementation of linear pressure control
633 619
  *

+ 0
- 14
Marlin/example_configurations/Cartesio/Configuration_adv.h Bestand weergeven

@@ -614,20 +614,6 @@
614 614
 
615 615
 // @section extruder
616 616
 
617
-// extruder advance constant (s2/mm3)
618
-//
619
-// advance (steps) = STEPS_PER_CUBIC_MM_E * EXTRUDER_ADVANCE_K * cubic mm per second ^ 2
620
-//
621
-// Hooke's law says:    force = k * distance
622
-// Bernoulli's principle says:  v ^ 2 / 2 + g . h + pressure / density = constant
623
-// so: v ^ 2 is proportional to number of steps we advance the extruder
624
-//#define ADVANCE
625
-
626
-#if ENABLED(ADVANCE)
627
-  #define EXTRUDER_ADVANCE_K .0
628
-  #define D_FILAMENT 2.85
629
-#endif
630
-
631 617
 /**
632 618
  * Implementation of linear pressure control
633 619
  *

+ 0
- 14
Marlin/example_configurations/Creality/CR-10/Configuration_adv.h Bestand weergeven

@@ -614,20 +614,6 @@
614 614
 
615 615
 // @section extruder
616 616
 
617
-// extruder advance constant (s2/mm3)
618
-//
619
-// advance (steps) = STEPS_PER_CUBIC_MM_E * EXTRUDER_ADVANCE_K * cubic mm per second ^ 2
620
-//
621
-// Hooke's law says:    force = k * distance
622
-// Bernoulli's principle says:  v ^ 2 / 2 + g . h + pressure / density = constant
623
-// so: v ^ 2 is proportional to number of steps we advance the extruder
624
-//#define ADVANCE
625
-
626
-#if ENABLED(ADVANCE)
627
-  #define EXTRUDER_ADVANCE_K .0
628
-  #define D_FILAMENT 2.85
629
-#endif
630
-
631 617
 /**
632 618
  * Implementation of linear pressure control
633 619
  *

+ 0
- 14
Marlin/example_configurations/Felix/Configuration_adv.h Bestand weergeven

@@ -614,20 +614,6 @@
614 614
 
615 615
 // @section extruder
616 616
 
617
-// extruder advance constant (s2/mm3)
618
-//
619
-// advance (steps) = STEPS_PER_CUBIC_MM_E * EXTRUDER_ADVANCE_K * cubic mm per second ^ 2
620
-//
621
-// Hooke's law says:    force = k * distance
622
-// Bernoulli's principle says:  v ^ 2 / 2 + g . h + pressure / density = constant
623
-// so: v ^ 2 is proportional to number of steps we advance the extruder
624
-//#define ADVANCE
625
-
626
-#if ENABLED(ADVANCE)
627
-  #define EXTRUDER_ADVANCE_K .0
628
-  #define D_FILAMENT 2.85
629
-#endif
630
-
631 617
 /**
632 618
  * Implementation of linear pressure control
633 619
  *

+ 0
- 14
Marlin/example_configurations/Folger Tech/i3-2020/Configuration_adv.h Bestand weergeven

@@ -614,20 +614,6 @@
614 614
 
615 615
 // @section extruder
616 616
 
617
-// extruder advance constant (s2/mm3)
618
-//
619
-// advance (steps) = STEPS_PER_CUBIC_MM_E * EXTRUDER_ADVANCE_K * cubic mm per second ^ 2
620
-//
621
-// Hooke's law says:    force = k * distance
622
-// Bernoulli's principle says:  v ^ 2 / 2 + g . h + pressure / density = constant
623
-// so: v ^ 2 is proportional to number of steps we advance the extruder
624
-//#define ADVANCE
625
-
626
-#if ENABLED(ADVANCE)
627
-  #define EXTRUDER_ADVANCE_K .0
628
-  #define D_FILAMENT 2.85
629
-#endif
630
-
631 617
 /**
632 618
  * Implementation of linear pressure control
633 619
  *

+ 0
- 14
Marlin/example_configurations/Infitary/i3-M508/Configuration_adv.h Bestand weergeven

@@ -614,20 +614,6 @@
614 614
 
615 615
 // @section extruder
616 616
 
617
-// extruder advance constant (s2/mm3)
618
-//
619
-// advance (steps) = STEPS_PER_CUBIC_MM_E * EXTRUDER_ADVANCE_K * cubic mm per second ^ 2
620
-//
621
-// Hooke's law says:    force = k * distance
622
-// Bernoulli's principle says:  v ^ 2 / 2 + g . h + pressure / density = constant
623
-// so: v ^ 2 is proportional to number of steps we advance the extruder
624
-//#define ADVANCE
625
-
626
-#if ENABLED(ADVANCE)
627
-  #define EXTRUDER_ADVANCE_K .0
628
-  #define D_FILAMENT 2.85
629
-#endif
630
-
631 617
 /**
632 618
  * Implementation of linear pressure control
633 619
  *

+ 0
- 14
Marlin/example_configurations/Malyan/M150/Configuration_adv.h Bestand weergeven

@@ -614,20 +614,6 @@
614 614
 
615 615
 // @section extruder
616 616
 
617
-// extruder advance constant (s2/mm3)
618
-//
619
-// advance (steps) = STEPS_PER_CUBIC_MM_E * EXTRUDER_ADVANCE_K * cubic mm per second ^ 2
620
-//
621
-// Hooke's law says:    force = k * distance
622
-// Bernoulli's principle says:  v ^ 2 / 2 + g . h + pressure / density = constant
623
-// so: v ^ 2 is proportional to number of steps we advance the extruder
624
-//#define ADVANCE
625
-
626
-#if ENABLED(ADVANCE)
627
-  #define EXTRUDER_ADVANCE_K .0
628
-  #define D_FILAMENT 2.85
629
-#endif
630
-
631 617
 /**
632 618
  * Implementation of linear pressure control
633 619
  *

+ 0
- 14
Marlin/example_configurations/RigidBot/Configuration_adv.h Bestand weergeven

@@ -614,20 +614,6 @@
614 614
 
615 615
 // @section extruder
616 616
 
617
-// extruder advance constant (s2/mm3)
618
-//
619
-// advance (steps) = STEPS_PER_CUBIC_MM_E * EXTRUDER_ADVANCE_K * cubic mm per second ^ 2
620
-//
621
-// Hooke's law says:    force = k * distance
622
-// Bernoulli's principle says:  v ^ 2 / 2 + g . h + pressure / density = constant
623
-// so: v ^ 2 is proportional to number of steps we advance the extruder
624
-//#define ADVANCE
625
-
626
-#if ENABLED(ADVANCE)
627
-  #define EXTRUDER_ADVANCE_K .0
628
-  #define D_FILAMENT 1.75
629
-#endif
630
-
631 617
 /**
632 618
  * Implementation of linear pressure control
633 619
  *

+ 0
- 14
Marlin/example_configurations/SCARA/Configuration_adv.h Bestand weergeven

@@ -614,20 +614,6 @@
614 614
 
615 615
 // @section extruder
616 616
 
617
-// extruder advance constant (s2/mm3)
618
-//
619
-// advance (steps) = STEPS_PER_CUBIC_MM_E * EXTRUDER_ADVANCE_K * cubic mm per second ^ 2
620
-//
621
-// Hooke's law says:    force = k * distance
622
-// Bernoulli's principle says:  v ^ 2 / 2 + g . h + pressure / density = constant
623
-// so: v ^ 2 is proportional to number of steps we advance the extruder
624
-#define ADVANCE
625
-
626
-#if ENABLED(ADVANCE)
627
-  #define EXTRUDER_ADVANCE_K .0
628
-  #define D_FILAMENT 1.75
629
-#endif
630
-
631 617
 /**
632 618
  * Implementation of linear pressure control
633 619
  *

+ 0
- 14
Marlin/example_configurations/Sanguinololu/Configuration_adv.h Bestand weergeven

@@ -603,20 +603,6 @@
603 603
 
604 604
 // @section extruder
605 605
 
606
-// extruder advance constant (s2/mm3)
607
-//
608
-// advance (steps) = STEPS_PER_CUBIC_MM_E * EXTRUDER_ADVANCE_K * cubic mm per second ^ 2
609
-//
610
-// Hooke's law says:    force = k * distance
611
-// Bernoulli's principle says:  v ^ 2 / 2 + g . h + pressure / density = constant
612
-// so: v ^ 2 is proportional to number of steps we advance the extruder
613
-//#define ADVANCE
614
-
615
-#if ENABLED(ADVANCE)
616
-  #define EXTRUDER_ADVANCE_K .0
617
-  #define D_FILAMENT 2.85
618
-#endif
619
-
620 606
 /**
621 607
  * Implementation of linear pressure control
622 608
  *

+ 0
- 14
Marlin/example_configurations/TinyBoy2/Configuration_adv.h Bestand weergeven

@@ -614,20 +614,6 @@
614 614
 
615 615
 // @section extruder
616 616
 
617
-// extruder advance constant (s2/mm3)
618
-//
619
-// advance (steps) = STEPS_PER_CUBIC_MM_E * EXTRUDER_ADVANCE_K * cubic mm per second ^ 2
620
-//
621
-// Hooke's law says:    force = k * distance
622
-// Bernoulli's principle says:  v ^ 2 / 2 + g . h + pressure / density = constant
623
-// so: v ^ 2 is proportional to number of steps we advance the extruder
624
-//#define ADVANCE
625
-
626
-#if ENABLED(ADVANCE)
627
-  #define EXTRUDER_ADVANCE_K .0
628
-  #define D_FILAMENT 2.85
629
-#endif
630
-
631 617
 /**
632 618
  * Implementation of linear pressure control
633 619
  *

+ 0
- 14
Marlin/example_configurations/Velleman/K8200/Configuration_adv.h Bestand weergeven

@@ -627,20 +627,6 @@
627 627
 
628 628
 // @section extruder
629 629
 
630
-// extruder advance constant (s2/mm3)
631
-//
632
-// advance (steps) = STEPS_PER_CUBIC_MM_E * EXTRUDER_ADVANCE_K * cubic mm per second ^ 2
633
-//
634
-// Hooke's law says:    force = k * distance
635
-// Bernoulli's principle says:  v ^ 2 / 2 + g . h + pressure / density = constant
636
-// so: v ^ 2 is proportional to number of steps we advance the extruder
637
-//#define ADVANCE
638
-
639
-#if ENABLED(ADVANCE)
640
-  #define EXTRUDER_ADVANCE_K .0
641
-  #define D_FILAMENT 2.85
642
-#endif
643
-
644 630
 /**
645 631
  * Implementation of linear pressure control
646 632
  *

+ 0
- 14
Marlin/example_configurations/Velleman/K8400/Configuration_adv.h Bestand weergeven

@@ -614,20 +614,6 @@
614 614
 
615 615
 // @section extruder
616 616
 
617
-// extruder advance constant (s2/mm3)
618
-//
619
-// advance (steps) = STEPS_PER_CUBIC_MM_E * EXTRUDER_ADVANCE_K * cubic mm per second ^ 2
620
-//
621
-// Hooke's law says:    force = k * distance
622
-// Bernoulli's principle says:  v ^ 2 / 2 + g . h + pressure / density = constant
623
-// so: v ^ 2 is proportional to number of steps we advance the extruder
624
-//#define ADVANCE
625
-
626
-#if ENABLED(ADVANCE)
627
-  #define EXTRUDER_ADVANCE_K .0
628
-  #define D_FILAMENT 2.85
629
-#endif
630
-
631 617
 /**
632 618
  * Implementation of linear pressure control
633 619
  *

+ 0
- 14
Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration_adv.h Bestand weergeven

@@ -616,20 +616,6 @@
616 616
 
617 617
 // @section extruder
618 618
 
619
-// extruder advance constant (s2/mm3)
620
-//
621
-// advance (steps) = STEPS_PER_CUBIC_MM_E * EXTRUDER_ADVANCE_K * cubic mm per second ^ 2
622
-//
623
-// Hooke's law says:    force = k * distance
624
-// Bernoulli's principle says:  v ^ 2 / 2 + g . h + pressure / density = constant
625
-// so: v ^ 2 is proportional to number of steps we advance the extruder
626
-//#define ADVANCE
627
-
628
-#if ENABLED(ADVANCE)
629
-  #define EXTRUDER_ADVANCE_K .0
630
-  #define D_FILAMENT 2.85
631
-#endif
632
-
633 619
 /**
634 620
  * Implementation of linear pressure control
635 621
  *

+ 0
- 14
Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration_adv.h Bestand weergeven

@@ -616,20 +616,6 @@
616 616
 
617 617
 // @section extruder
618 618
 
619
-// extruder advance constant (s2/mm3)
620
-//
621
-// advance (steps) = STEPS_PER_CUBIC_MM_E * EXTRUDER_ADVANCE_K * cubic mm per second ^ 2
622
-//
623
-// Hooke's law says:    force = k * distance
624
-// Bernoulli's principle says:  v ^ 2 / 2 + g . h + pressure / density = constant
625
-// so: v ^ 2 is proportional to number of steps we advance the extruder
626
-//#define ADVANCE
627
-
628
-#if ENABLED(ADVANCE)
629
-  #define EXTRUDER_ADVANCE_K .0
630
-  #define D_FILAMENT 2.85
631
-#endif
632
-
633 619
 /**
634 620
  * Implementation of linear pressure control
635 621
  *

+ 0
- 14
Marlin/example_configurations/delta/generic/Configuration_adv.h Bestand weergeven

@@ -616,20 +616,6 @@
616 616
 
617 617
 // @section extruder
618 618
 
619
-// extruder advance constant (s2/mm3)
620
-//
621
-// advance (steps) = STEPS_PER_CUBIC_MM_E * EXTRUDER_ADVANCE_K * cubic mm per second ^ 2
622
-//
623
-// Hooke's law says:    force = k * distance
624
-// Bernoulli's principle says:  v ^ 2 / 2 + g . h + pressure / density = constant
625
-// so: v ^ 2 is proportional to number of steps we advance the extruder
626
-//#define ADVANCE
627
-
628
-#if ENABLED(ADVANCE)
629
-  #define EXTRUDER_ADVANCE_K .0
630
-  #define D_FILAMENT 2.85
631
-#endif
632
-
633 619
 /**
634 620
  * Implementation of linear pressure control
635 621
  *

+ 0
- 14
Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h Bestand weergeven

@@ -616,20 +616,6 @@
616 616
 
617 617
 // @section extruder
618 618
 
619
-// extruder advance constant (s2/mm3)
620
-//
621
-// advance (steps) = STEPS_PER_CUBIC_MM_E * EXTRUDER_ADVANCE_K * cubic mm per second ^ 2
622
-//
623
-// Hooke's law says:    force = k * distance
624
-// Bernoulli's principle says:  v ^ 2 / 2 + g . h + pressure / density = constant
625
-// so: v ^ 2 is proportional to number of steps we advance the extruder
626
-//#define ADVANCE
627
-
628
-#if ENABLED(ADVANCE)
629
-  #define EXTRUDER_ADVANCE_K .0
630
-  #define D_FILAMENT 2.85
631
-#endif
632
-
633 619
 /**
634 620
  * Implementation of linear pressure control
635 621
  *

+ 0
- 14
Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h Bestand weergeven

@@ -621,20 +621,6 @@
621 621
 
622 622
 // @section extruder
623 623
 
624
-// extruder advance constant (s2/mm3)
625
-//
626
-// advance (steps) = STEPS_PER_CUBIC_MM_E * EXTRUDER_ADVANCE_K * cubic mm per second ^ 2
627
-//
628
-// Hooke's law says:    force = k * distance
629
-// Bernoulli's principle says:  v ^ 2 / 2 + g . h + pressure / density = constant
630
-// so: v ^ 2 is proportional to number of steps we advance the extruder
631
-//#define ADVANCE
632
-
633
-#if ENABLED(ADVANCE)
634
-  #define EXTRUDER_ADVANCE_K .0
635
-  #define D_FILAMENT 2.85
636
-#endif
637
-
638 624
 /**
639 625
  * Implementation of linear pressure control
640 626
  *

+ 0
- 14
Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h Bestand weergeven

@@ -616,20 +616,6 @@
616 616
 
617 617
 // @section extruder
618 618
 
619
-// extruder advance constant (s2/mm3)
620
-//
621
-// advance (steps) = STEPS_PER_CUBIC_MM_E * EXTRUDER_ADVANCE_K * cubic mm per second ^ 2
622
-//
623
-// Hooke's law says:    force = k * distance
624
-// Bernoulli's principle says:  v ^ 2 / 2 + g . h + pressure / density = constant
625
-// so: v ^ 2 is proportional to number of steps we advance the extruder
626
-//#define ADVANCE
627
-
628
-#if ENABLED(ADVANCE)
629
-  #define EXTRUDER_ADVANCE_K .0
630
-  #define D_FILAMENT 2.85
631
-#endif
632
-
633 619
 /**
634 620
  * Implementation of linear pressure control
635 621
  *

+ 0
- 14
Marlin/example_configurations/gCreate/gMax1.5+/Configuration_adv.h Bestand weergeven

@@ -614,20 +614,6 @@
614 614
 
615 615
 // @section extruder
616 616
 
617
-// extruder advance constant (s2/mm3)
618
-//
619
-// advance (steps) = STEPS_PER_CUBIC_MM_E * EXTRUDER_ADVANCE_K * cubic mm per second ^ 2
620
-//
621
-// Hooke's law says:    force = k * distance
622
-// Bernoulli's principle says:  v ^ 2 / 2 + g . h + pressure / density = constant
623
-// so: v ^ 2 is proportional to number of steps we advance the extruder
624
-//#define ADVANCE
625
-
626
-#if ENABLED(ADVANCE)
627
-  #define EXTRUDER_ADVANCE_K .0
628
-  #define D_FILAMENT 2.85
629
-#endif
630
-
631 617
 /**
632 618
  * Implementation of linear pressure control
633 619
  *

+ 0
- 14
Marlin/example_configurations/makibox/Configuration_adv.h Bestand weergeven

@@ -614,20 +614,6 @@
614 614
 
615 615
 // @section extruder
616 616
 
617
-// extruder advance constant (s2/mm3)
618
-//
619
-// advance (steps) = STEPS_PER_CUBIC_MM_E * EXTRUDER_ADVANCE_K * cubic mm per second ^ 2
620
-//
621
-// Hooke's law says:    force = k * distance
622
-// Bernoulli's principle says:  v ^ 2 / 2 + g . h + pressure / density = constant
623
-// so: v ^ 2 is proportional to number of steps we advance the extruder
624
-//#define ADVANCE
625
-
626
-#if ENABLED(ADVANCE)
627
-  #define EXTRUDER_ADVANCE_K .0
628
-  #define D_FILAMENT 2.85
629
-#endif
630
-
631 617
 /**
632 618
  * Implementation of linear pressure control
633 619
  *

+ 0
- 14
Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h Bestand weergeven

@@ -614,20 +614,6 @@
614 614
 
615 615
 // @section extruder
616 616
 
617
-// extruder advance constant (s2/mm3)
618
-//
619
-// advance (steps) = STEPS_PER_CUBIC_MM_E * EXTRUDER_ADVANCE_K * cubic mm per second ^ 2
620
-//
621
-// Hooke's law says:    force = k * distance
622
-// Bernoulli's principle says:  v ^ 2 / 2 + g . h + pressure / density = constant
623
-// so: v ^ 2 is proportional to number of steps we advance the extruder
624
-//#define ADVANCE
625
-
626
-#if ENABLED(ADVANCE)
627
-  #define EXTRUDER_ADVANCE_K .0
628
-  #define D_FILAMENT 2.85
629
-#endif
630
-
631 617
 /**
632 618
  * Implementation of linear pressure control
633 619
  *

+ 0
- 14
Marlin/example_configurations/wt150/Configuration_adv.h Bestand weergeven

@@ -614,20 +614,6 @@
614 614
 
615 615
 // @section extruder
616 616
 
617
-// extruder advance constant (s2/mm3)
618
-//
619
-// advance (steps) = STEPS_PER_CUBIC_MM_E * EXTRUDER_ADVANCE_K * cubic mm per second ^ 2
620
-//
621
-// Hooke's law says:    force = k * distance
622
-// Bernoulli's principle says:  v ^ 2 / 2 + g . h + pressure / density = constant
623
-// so: v ^ 2 is proportional to number of steps we advance the extruder
624
-//#define ADVANCE
625
-
626
-#if ENABLED(ADVANCE)
627
-  #define EXTRUDER_ADVANCE_K .0
628
-  #define D_FILAMENT 2.85
629
-#endif
630
-
631 617
 /**
632 618
  * Implementation of linear pressure control
633 619
  *

+ 1
- 25
Marlin/planner.cpp Bestand weergeven

@@ -211,10 +211,6 @@ void Planner::calculate_trapezoid_for_block(block_t* const block, const float &e
211 211
     block->decelerate_after = accelerate_steps + plateau_steps;
212 212
     block->initial_rate = initial_rate;
213 213
     block->final_rate = final_rate;
214
-    #if ENABLED(ADVANCE)
215
-      block->initial_advance = block->advance * sq(entry_factor);
216
-      block->final_advance = block->advance * sq(exit_factor);
217
-    #endif
218 214
   }
219 215
   CRITICAL_SECTION_END;
220 216
 }
@@ -1405,27 +1401,7 @@ void Planner::_buffer_line(const float &a, const float &b, const float &c, const
1405 1401
         * axis_steps_per_mm[E_AXIS_N] * 256.0
1406 1402
       );
1407 1403
 
1408
-  #elif ENABLED(ADVANCE)
1409
-
1410
-    // Calculate advance rate
1411
-    if (esteps && (block->steps[X_AXIS] || block->steps[Y_AXIS] || block->steps[Z_AXIS])) {
1412
-      const long acc_dist = estimate_acceleration_distance(0, block->nominal_rate, block->acceleration_steps_per_s2);
1413
-      const float advance = ((STEPS_PER_CUBIC_MM_E) * (EXTRUDER_ADVANCE_K)) * HYPOT(current_speed[E_AXIS], EXTRUSION_AREA) * 256;
1414
-      block->advance = advance;
1415
-      block->advance_rate = acc_dist ? advance / (float)acc_dist : 0;
1416
-    }
1417
-    else
1418
-      block->advance_rate = block->advance = 0;
1419
-
1420
-    /**
1421
-     SERIAL_ECHO_START();
1422
-     SERIAL_ECHOPGM("advance :");
1423
-     SERIAL_ECHO(block->advance/256.0);
1424
-     SERIAL_ECHOPGM("advance rate :");
1425
-     SERIAL_ECHOLN(block->advance_rate/256.0);
1426
-     */
1427
-
1428
-  #endif // ADVANCE or LIN_ADVANCE
1404
+  #endif // LIN_ADVANCE
1429 1405
 
1430 1406
   calculate_trapezoid_for_block(block, block->entry_speed / block->nominal_speed, safe_speed / block->nominal_speed);
1431 1407
 

+ 0
- 5
Marlin/planner.h Bestand weergeven

@@ -96,11 +96,6 @@ typedef struct {
96 96
   #if ENABLED(LIN_ADVANCE)
97 97
     bool use_advance_lead;
98 98
     uint32_t abs_adv_steps_multiplier8; // Factorised by 2^8 to avoid float
99
-  #elif ENABLED(ADVANCE)
100
-    int32_t advance_rate;
101
-    volatile int32_t initial_advance;
102
-    volatile int32_t final_advance;
103
-    float advance;
104 99
   #endif
105 100
 
106 101
   // Fields used by the motion planner to manage acceleration

+ 31
- 116
Marlin/stepper.cpp Bestand weergeven

@@ -97,7 +97,7 @@ long Stepper::counter_X = 0,
97 97
 
98 98
 volatile uint32_t Stepper::step_events_completed = 0; // The number of step events executed in the current block
99 99
 
100
-#if ENABLED(ADVANCE) || ENABLED(LIN_ADVANCE)
100
+#if ENABLED(LIN_ADVANCE)
101 101
 
102 102
   constexpr uint16_t ADV_NEVER = 65535;
103 103
 
@@ -105,18 +105,10 @@ volatile uint32_t Stepper::step_events_completed = 0; // The number of step even
105 105
            Stepper::nextAdvanceISR = ADV_NEVER,
106 106
            Stepper::eISR_Rate = ADV_NEVER;
107 107
 
108
-  #if ENABLED(LIN_ADVANCE)
109
-    volatile int Stepper::e_steps[E_STEPPERS];
110
-    int Stepper::final_estep_rate,
111
-        Stepper::current_estep_rate[E_STEPPERS],
112
-        Stepper::current_adv_steps[E_STEPPERS];
113
-  #else
114
-    long Stepper::e_steps[E_STEPPERS],
115
-         Stepper::final_advance = 0,
116
-         Stepper::old_advance = 0,
117
-         Stepper::advance_rate,
118
-         Stepper::advance;
119
-  #endif
108
+  volatile int Stepper::e_steps[E_STEPPERS];
109
+  int Stepper::final_estep_rate,
110
+      Stepper::current_estep_rate[E_STEPPERS],
111
+      Stepper::current_adv_steps[E_STEPPERS];
120 112
 
121 113
   /**
122 114
    * See https://github.com/MarlinFirmware/Marlin/issues/5699#issuecomment-309264382
@@ -133,7 +125,7 @@ volatile uint32_t Stepper::step_events_completed = 0; // The number of step even
133 125
     return ADV_NEVER;
134 126
   }
135 127
 
136
-#endif // ADVANCE || LIN_ADVANCE
128
+#endif // LIN_ADVANCE
137 129
 
138 130
 long Stepper::acceleration_time, Stepper::deceleration_time;
139 131
 
@@ -325,7 +317,7 @@ void Stepper::set_directions() {
325 317
     SET_STEP_DIR(Z); // C
326 318
   #endif
327 319
 
328
-  #if DISABLED(ADVANCE) && DISABLED(LIN_ADVANCE)
320
+  #if DISABLED(LIN_ADVANCE)
329 321
     if (motor_direction(E_AXIS)) {
330 322
       REV_E_DIR();
331 323
       count_direction[E_AXIS] = -1;
@@ -334,7 +326,7 @@ void Stepper::set_directions() {
334 326
       NORM_E_DIR();
335 327
       count_direction[E_AXIS] = 1;
336 328
     }
337
-  #endif // !ADVANCE && !LIN_ADVANCE
329
+  #endif // !LIN_ADVANCE
338 330
 }
339 331
 
340 332
 #if ENABLED(ENDSTOP_INTERRUPTS_FEATURE)
@@ -356,7 +348,7 @@ void Stepper::set_directions() {
356 348
  *  4000   500  Hz - init rate
357 349
  */
358 350
 ISR(TIMER1_COMPA_vect) {
359
-  #if ENABLED(ADVANCE) || ENABLED(LIN_ADVANCE)
351
+  #if ENABLED(LIN_ADVANCE)
360 352
     Stepper::advance_isr_scheduler();
361 353
   #else
362 354
     Stepper::isr();
@@ -372,7 +364,7 @@ void Stepper::isr() {
372 364
   #define ENDSTOP_NOMINAL_OCR_VAL 3000    // check endstops every 1.5ms to guarantee two stepper ISRs within 5ms for BLTouch
373 365
   #define OCR_VAL_TOLERANCE 1000          // First max delay is 2.0ms, last min delay is 0.5ms, all others 1.5ms
374 366
 
375
-  #if DISABLED(ADVANCE) && DISABLED(LIN_ADVANCE)
367
+  #if DISABLED(LIN_ADVANCE)
376 368
     // Disable Timer0 ISRs and enable global ISR again to capture UART events (incoming chars)
377 369
     CBI(TIMSK0, OCIE0B); // Temperature ISR
378 370
     DISABLE_STEPPER_DRIVER_INTERRUPT();
@@ -455,10 +447,6 @@ void Stepper::isr() {
455 447
           return;
456 448
         }
457 449
       #endif
458
-
459
-      // #if ENABLED(ADVANCE)
460
-      //   e_steps[TOOL_E_INDEX] = 0;
461
-      // #endif
462 450
     }
463 451
     else {
464 452
       _NEXT_ISR(2000); // Run at slow speed - 1 KHz
@@ -504,33 +492,7 @@ void Stepper::isr() {
504 492
         }
505 493
       #endif
506 494
 
507
-    #elif ENABLED(ADVANCE)
508
-
509
-      // Always count the unified E axis
510
-      counter_E += current_block->steps[E_AXIS];
511
-      if (counter_E > 0) {
512
-        counter_E -= current_block->step_event_count;
513
-        #if DISABLED(MIXING_EXTRUDER)
514
-          // Don't step E here for mixing extruder
515
-          motor_direction(E_AXIS) ? --e_steps[TOOL_E_INDEX] : ++e_steps[TOOL_E_INDEX];
516
-        #endif
517
-      }
518
-
519
-      #if ENABLED(MIXING_EXTRUDER)
520
-
521
-        // Step mixing steppers proportionally
522
-        const bool dir = motor_direction(E_AXIS);
523
-        MIXING_STEPPERS_LOOP(j) {
524
-          counter_m[j] += current_block->steps[E_AXIS];
525
-          if (counter_m[j] > 0) {
526
-            counter_m[j] -= current_block->mix_event_count[j];
527
-            dir ? --e_steps[j] : ++e_steps[j];
528
-          }
529
-        }
530
-
531
-      #endif // MIXING_EXTRUDER
532
-
533
-    #endif // ADVANCE or LIN_ADVANCE
495
+    #endif // LIN_ADVANCE
534 496
 
535 497
     #define _COUNTER(AXIS) counter_## AXIS
536 498
     #define _APPLY_STEP(AXIS) AXIS ##_APPLY_STEP
@@ -591,7 +553,7 @@ void Stepper::isr() {
591 553
     #else
592 554
       #define _CYCLE_APPROX_6 _CYCLE_APPROX_5
593 555
     #endif
594
-    #if DISABLED(ADVANCE) && DISABLED(LIN_ADVANCE)
556
+    #if DISABLED(LIN_ADVANCE)
595 557
       #if ENABLED(MIXING_EXTRUDER)
596 558
         #define _CYCLE_APPROX_7 _CYCLE_APPROX_6 + (MIXING_STEPPERS) * 6
597 559
       #else
@@ -627,7 +589,7 @@ void Stepper::isr() {
627 589
     #endif
628 590
 
629 591
     // For non-advance use linear interpolation for E also
630
-    #if DISABLED(ADVANCE) && DISABLED(LIN_ADVANCE)
592
+    #if DISABLED(LIN_ADVANCE)
631 593
       #if ENABLED(MIXING_EXTRUDER)
632 594
         // Keep updating the single E axis
633 595
         counter_E += current_block->steps[E_AXIS];
@@ -641,7 +603,7 @@ void Stepper::isr() {
641 603
       #else // !MIXING_EXTRUDER
642 604
         PULSE_START(E);
643 605
       #endif
644
-    #endif // !ADVANCE && !LIN_ADVANCE
606
+    #endif // !LIN_ADVANCE
645 607
 
646 608
     // For minimum pulse time wait before stopping pulses
647 609
     #if EXTRA_CYCLES_XYZE > 20
@@ -661,7 +623,7 @@ void Stepper::isr() {
661 623
       PULSE_STOP(Z);
662 624
     #endif
663 625
 
664
-    #if DISABLED(ADVANCE) && DISABLED(LIN_ADVANCE)
626
+    #if DISABLED(LIN_ADVANCE)
665 627
       #if ENABLED(MIXING_EXTRUDER)
666 628
         // Always step the single E axis
667 629
         if (counter_E > 0) {
@@ -677,7 +639,7 @@ void Stepper::isr() {
677 639
       #else // !MIXING_EXTRUDER
678 640
         PULSE_STOP(E);
679 641
       #endif
680
-    #endif // !ADVANCE && !LIN_ADVANCE
642
+    #endif // !LIN_ADVANCE
681 643
 
682 644
     if (++step_events_completed >= current_block->step_event_count) {
683 645
       all_steps_done = true;
@@ -694,6 +656,7 @@ void Stepper::isr() {
694 656
   } // steps_loop
695 657
 
696 658
   #if ENABLED(LIN_ADVANCE)
659
+
697 660
     if (current_block->use_advance_lead) {
698 661
       const int delta_adv_steps = current_estep_rate[TOOL_E_INDEX] - current_adv_steps[TOOL_E_INDEX];
699 662
       current_adv_steps[TOOL_E_INDEX] += delta_adv_steps;
@@ -705,13 +668,11 @@ void Stepper::isr() {
705 668
         // For most extruders, advance the single E stepper
706 669
         e_steps[TOOL_E_INDEX] += delta_adv_steps;
707 670
       #endif
708
-   }
709
-  #endif
710
-
711
-  #if ENABLED(ADVANCE) || ENABLED(LIN_ADVANCE)
671
+    }
712 672
     // If we have esteps to execute, fire the next advance_isr "now"
713 673
     if (e_steps[TOOL_E_INDEX]) nextAdvanceISR = 0;
714
-  #endif
674
+
675
+  #endif // LIN_ADVANCE
715 676
 
716 677
   // Calculate new timer value
717 678
   if (step_events_completed <= (uint32_t)current_block->accelerate_until) {
@@ -740,32 +701,9 @@ void Stepper::isr() {
740 701
           current_estep_rate[TOOL_E_INDEX] = ((uint32_t)acc_step_rate * current_block->abs_adv_steps_multiplier8) >> 17;
741 702
         #endif
742 703
       }
743
-
744
-    #elif ENABLED(ADVANCE)
745
-
746
-      advance += advance_rate * step_loops;
747
-      //NOLESS(advance, current_block->advance);
748
-
749
-      const long advance_whole = advance >> 8,
750
-                 advance_factor = advance_whole - old_advance;
751
-
752
-      // Do E steps + advance steps
753
-      #if ENABLED(MIXING_EXTRUDER)
754
-        // ...for mixing steppers proportionally
755
-        MIXING_STEPPERS_LOOP(j)
756
-          e_steps[j] += advance_factor * current_block->step_event_count / current_block->mix_event_count[j];
757
-      #else
758
-        // ...for the active extruder
759
-        e_steps[TOOL_E_INDEX] += advance_factor;
760
-      #endif
761
-
762
-      old_advance = advance_whole;
763
-
764
-    #endif // ADVANCE or LIN_ADVANCE
765
-
766
-    #if ENABLED(ADVANCE) || ENABLED(LIN_ADVANCE)
767 704
       eISR_Rate = adv_rate(e_steps[TOOL_E_INDEX], timer, step_loops);
768
-    #endif
705
+
706
+    #endif // LIN_ADVANCE
769 707
   }
770 708
   else if (step_events_completed > (uint32_t)current_block->decelerate_after) {
771 709
     uint16_t step_rate;
@@ -796,30 +734,9 @@ void Stepper::isr() {
796 734
           current_estep_rate[TOOL_E_INDEX] = ((uint32_t)step_rate * current_block->abs_adv_steps_multiplier8) >> 17;
797 735
         #endif
798 736
       }
799
-
800
-    #elif ENABLED(ADVANCE)
801
-
802
-      advance -= advance_rate * step_loops;
803
-      NOLESS(advance, final_advance);
804
-
805
-      // Do E steps + advance steps
806
-      const long advance_whole = advance >> 8,
807
-                 advance_factor = advance_whole - old_advance;
808
-
809
-      #if ENABLED(MIXING_EXTRUDER)
810
-        MIXING_STEPPERS_LOOP(j)
811
-          e_steps[j] += advance_factor * current_block->step_event_count / current_block->mix_event_count[j];
812
-      #else
813
-        e_steps[TOOL_E_INDEX] += advance_factor;
814
-      #endif
815
-
816
-      old_advance = advance_whole;
817
-
818
-    #endif // ADVANCE or LIN_ADVANCE
819
-
820
-    #if ENABLED(ADVANCE) || ENABLED(LIN_ADVANCE)
821 737
       eISR_Rate = adv_rate(e_steps[TOOL_E_INDEX], timer, step_loops);
822
-    #endif
738
+
739
+    #endif // LIN_ADVANCE
823 740
   }
824 741
   else {
825 742
 
@@ -839,7 +756,7 @@ void Stepper::isr() {
839 756
     step_loops = step_loops_nominal;
840 757
   }
841 758
 
842
-  #if DISABLED(ADVANCE) && DISABLED(LIN_ADVANCE)
759
+  #if DISABLED(LIN_ADVANCE)
843 760
     NOLESS(OCR1A, TCNT1 + 16);
844 761
   #endif
845 762
 
@@ -848,12 +765,12 @@ void Stepper::isr() {
848 765
     current_block = NULL;
849 766
     planner.discard_current_block();
850 767
   }
851
-  #if DISABLED(ADVANCE) && DISABLED(LIN_ADVANCE)
768
+  #if DISABLED(LIN_ADVANCE)
852 769
     _ENABLE_ISRs(); // re-enable ISRs
853 770
   #endif
854 771
 }
855 772
 
856
-#if ENABLED(ADVANCE) || ENABLED(LIN_ADVANCE)
773
+#if ENABLED(LIN_ADVANCE)
857 774
 
858 775
   #define CYCLES_EATEN_E (E_STEPPERS * 5)
859 776
   #define EXTRA_CYCLES_E (STEP_PULSE_CYCLES - (CYCLES_EATEN_E))
@@ -987,7 +904,7 @@ void Stepper::isr() {
987 904
     _ENABLE_ISRs();
988 905
   }
989 906
 
990
-#endif // ADVANCE or LIN_ADVANCE
907
+#endif // LIN_ADVANCE
991 908
 
992 909
 void Stepper::init() {
993 910
 
@@ -1170,12 +1087,10 @@ void Stepper::init() {
1170 1087
   TCNT1 = 0;
1171 1088
   ENABLE_STEPPER_DRIVER_INTERRUPT();
1172 1089
 
1173
-  #if ENABLED(ADVANCE) || ENABLED(LIN_ADVANCE)
1090
+  #if ENABLED(LIN_ADVANCE)
1174 1091
     for (uint8_t i = 0; i < COUNT(e_steps); i++) e_steps[i] = 0;
1175
-    #if ENABLED(LIN_ADVANCE)
1176
-      ZERO(current_adv_steps);
1177
-    #endif
1178
-  #endif // ADVANCE || LIN_ADVANCE
1092
+    ZERO(current_adv_steps);
1093
+  #endif
1179 1094
 
1180 1095
   endstops.enable(true); // Start with endstops active. After homing they can be disabled
1181 1096
   sei();

+ 13
- 36
Marlin/stepper.h Bestand weergeven

@@ -111,24 +111,21 @@ class Stepper {
111 111
     static long counter_X, counter_Y, counter_Z, counter_E;
112 112
     static volatile uint32_t step_events_completed; // The number of step events executed in the current block
113 113
 
114
-    #if ENABLED(ADVANCE) || ENABLED(LIN_ADVANCE)
114
+    #if ENABLED(LIN_ADVANCE)
115
+
115 116
       static uint16_t nextMainISR, nextAdvanceISR, eISR_Rate;
116 117
       #define _NEXT_ISR(T) nextMainISR = T
117
-      #if ENABLED(LIN_ADVANCE)
118
-        static volatile int e_steps[E_STEPPERS];
119
-        static int final_estep_rate;
120
-        static int current_estep_rate[E_STEPPERS]; // Actual extruder speed [steps/s]
121
-        static int current_adv_steps[E_STEPPERS];  // The amount of current added esteps due to advance.
122
-                                                   // i.e., the current amount of pressure applied
123
-                                                   // to the spring (=filament).
124
-      #else
125
-        static long e_steps[E_STEPPERS];
126
-        static long advance_rate, advance, final_advance;
127
-        static long old_advance;
128
-      #endif
129
-    #else
118
+      static volatile int e_steps[E_STEPPERS];
119
+      static int final_estep_rate;
120
+      static int current_estep_rate[E_STEPPERS]; // Actual extruder speed [steps/s]
121
+      static int current_adv_steps[E_STEPPERS];  // The amount of current added esteps due to advance.
122
+                                                 // i.e., the current amount of pressure applied
123
+                                                 // to the spring (=filament).
124
+    #else // !LIN_ADVANCE
125
+
130 126
       #define _NEXT_ISR(T) OCR1A = T
131
-    #endif // ADVANCE or LIN_ADVANCE
127
+
128
+    #endif // !LIN_ADVANCE
132 129
 
133 130
     static long acceleration_time, deceleration_time;
134 131
     //unsigned long accelerate_until, decelerate_after, acceleration_rate, initial_rate, final_rate, nominal_rate;
@@ -177,7 +174,7 @@ class Stepper {
177 174
 
178 175
     static void isr();
179 176
 
180
-    #if ENABLED(ADVANCE) || ENABLED(LIN_ADVANCE)
177
+    #if ENABLED(LIN_ADVANCE)
181 178
       static void advance_isr();
182 179
       static void advance_isr_scheduler();
183 180
     #endif
@@ -337,26 +334,6 @@ class Stepper {
337 334
         set_directions();
338 335
       }
339 336
 
340
-      #if ENABLED(ADVANCE)
341
-
342
-        advance = current_block->initial_advance;
343
-        final_advance = current_block->final_advance;
344
-
345
-        // Do E steps + advance steps
346
-        #if ENABLED(MIXING_EXTRUDER)
347
-          long advance_factor = (advance >> 8) - old_advance;
348
-          // ...for mixing steppers proportionally
349
-          MIXING_STEPPERS_LOOP(j)
350
-            e_steps[j] += advance_factor * current_block->step_event_count / current_block->mix_event_count[j];
351
-        #else
352
-          // ...for the active extruder
353
-          e_steps[TOOL_E_INDEX] += ((advance >> 8) - old_advance);
354
-        #endif
355
-
356
-        old_advance = advance >> 8;
357
-
358
-      #endif
359
-
360 337
       deceleration_time = 0;
361 338
       // step_rate to timer interval
362 339
       OCR1A_nominal = calc_timer(current_block->nominal_rate);

Laden…
Annuleren
Opslaan