Browse Source

Remove legacy ADVANCE feature

Scott Lahteine 7 years ago
parent
commit
03f4891fb9
36 changed files with 46 additions and 617 deletions
  1. 0
    14
      Marlin/Configuration_adv.h
  2. 0
    14
      Marlin/src/config/default/Configuration_adv.h
  3. 0
    14
      Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h
  4. 0
    14
      Marlin/src/config/examples/Anet/A6/Configuration_adv.h
  5. 0
    14
      Marlin/src/config/examples/Anet/A8/Configuration_adv.h
  6. 0
    14
      Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h
  7. 0
    14
      Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h
  8. 0
    14
      Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h
  9. 0
    14
      Marlin/src/config/examples/Cartesio/Configuration_adv.h
  10. 0
    14
      Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h
  11. 0
    14
      Marlin/src/config/examples/Felix/Configuration_adv.h
  12. 0
    14
      Marlin/src/config/examples/Folger Tech/i3-2020/Configuration_adv.h
  13. 0
    14
      Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h
  14. 0
    14
      Marlin/src/config/examples/Malyan/M150/Configuration_adv.h
  15. 0
    14
      Marlin/src/config/examples/RigidBot/Configuration_adv.h
  16. 0
    14
      Marlin/src/config/examples/SCARA/Configuration_adv.h
  17. 0
    14
      Marlin/src/config/examples/Sanguinololu/Configuration_adv.h
  18. 0
    14
      Marlin/src/config/examples/TinyBoy2/Configuration_adv.h
  19. 0
    14
      Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h
  20. 0
    14
      Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h
  21. 0
    14
      Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h
  22. 0
    14
      Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h
  23. 0
    14
      Marlin/src/config/examples/delta/generic/Configuration_adv.h
  24. 0
    14
      Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h
  25. 0
    14
      Marlin/src/config/examples/delta/kossel_pro/Configuration_adv.h
  26. 0
    14
      Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h
  27. 0
    14
      Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h
  28. 0
    14
      Marlin/src/config/examples/makibox/Configuration_adv.h
  29. 0
    14
      Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h
  30. 0
    14
      Marlin/src/config/examples/wt150/Configuration_adv.h
  31. 2
    7
      Marlin/src/inc/Conditionals_post.h
  32. 2
    7
      Marlin/src/inc/SanityCheck.h
  33. 1
    25
      Marlin/src/module/planner.cpp
  34. 0
    5
      Marlin/src/module/planner.h
  35. 32
    118
      Marlin/src/module/stepper.cpp
  36. 9
    35
      Marlin/src/module/stepper.h

+ 0
- 14
Marlin/Configuration_adv.h View File

621
 
621
 
622
 // @section extruder
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
  * Implementation of linear pressure control
625
  * Implementation of linear pressure control
640
  *
626
  *

+ 0
- 14
Marlin/src/config/default/Configuration_adv.h View File

621
 
621
 
622
 // @section extruder
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
  * Implementation of linear pressure control
625
  * Implementation of linear pressure control
640
  *
626
  *

+ 0
- 14
Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h View File

621
 
621
 
622
 // @section extruder
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
  * Implementation of linear pressure control
625
  * Implementation of linear pressure control
640
  *
626
  *

+ 0
- 14
Marlin/src/config/examples/Anet/A6/Configuration_adv.h View File

621
 
621
 
622
 // @section extruder
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
  * Implementation of linear pressure control
625
  * Implementation of linear pressure control
640
  *
626
  *

+ 0
- 14
Marlin/src/config/examples/Anet/A8/Configuration_adv.h View File

621
 
621
 
622
 // @section extruder
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
  * Implementation of linear pressure control
625
  * Implementation of linear pressure control
640
  *
626
  *

+ 0
- 14
Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h View File

621
 
621
 
622
 // @section extruder
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 1.75
636
-#endif
637
-
638
 /**
624
 /**
639
  * Implementation of linear pressure control
625
  * Implementation of linear pressure control
640
  *
626
  *

+ 0
- 14
Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h View File

621
 
621
 
622
 // @section extruder
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
  * Implementation of linear pressure control
625
  * Implementation of linear pressure control
640
  *
626
  *

+ 0
- 14
Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h View File

621
 
621
 
622
 // @section extruder
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 1.75
636
-#endif
637
-
638
 /**
624
 /**
639
  * Implementation of linear pressure control
625
  * Implementation of linear pressure control
640
  *
626
  *

+ 0
- 14
Marlin/src/config/examples/Cartesio/Configuration_adv.h View File

621
 
621
 
622
 // @section extruder
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
  * Implementation of linear pressure control
625
  * Implementation of linear pressure control
640
  *
626
  *

+ 0
- 14
Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h View File

614
 
614
 
615
 // @section extruder
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
  * Implementation of linear pressure control
618
  * Implementation of linear pressure control
633
  *
619
  *

+ 0
- 14
Marlin/src/config/examples/Felix/Configuration_adv.h View File

621
 
621
 
622
 // @section extruder
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
  * Implementation of linear pressure control
625
  * Implementation of linear pressure control
640
  *
626
  *

+ 0
- 14
Marlin/src/config/examples/Folger Tech/i3-2020/Configuration_adv.h View File

621
 
621
 
622
 // @section extruder
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
  * Implementation of linear pressure control
625
  * Implementation of linear pressure control
640
  *
626
  *

+ 0
- 14
Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h View File

621
 
621
 
622
 // @section extruder
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
  * Implementation of linear pressure control
625
  * Implementation of linear pressure control
640
  *
626
  *

+ 0
- 14
Marlin/src/config/examples/Malyan/M150/Configuration_adv.h View File

621
 
621
 
622
 // @section extruder
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
  * Implementation of linear pressure control
625
  * Implementation of linear pressure control
640
  *
626
  *

+ 0
- 14
Marlin/src/config/examples/RigidBot/Configuration_adv.h View File

621
 
621
 
622
 // @section extruder
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 1.75
636
-#endif
637
-
638
 /**
624
 /**
639
  * Implementation of linear pressure control
625
  * Implementation of linear pressure control
640
  *
626
  *

+ 0
- 14
Marlin/src/config/examples/SCARA/Configuration_adv.h View File

621
 
621
 
622
 // @section extruder
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 1.75
636
-#endif
637
-
638
 /**
624
 /**
639
  * Implementation of linear pressure control
625
  * Implementation of linear pressure control
640
  *
626
  *

+ 0
- 14
Marlin/src/config/examples/Sanguinololu/Configuration_adv.h View File

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

+ 0
- 14
Marlin/src/config/examples/TinyBoy2/Configuration_adv.h View File

621
 
621
 
622
 // @section extruder
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
  * Implementation of linear pressure control
625
  * Implementation of linear pressure control
640
  *
626
  *

+ 0
- 14
Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h View File

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

+ 0
- 14
Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h View File

621
 
621
 
622
 // @section extruder
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
  * Implementation of linear pressure control
625
  * Implementation of linear pressure control
640
  *
626
  *

+ 0
- 14
Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h View File

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

+ 0
- 14
Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h View File

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

+ 0
- 14
Marlin/src/config/examples/delta/generic/Configuration_adv.h View File

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

+ 0
- 14
Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h View File

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

+ 0
- 14
Marlin/src/config/examples/delta/kossel_pro/Configuration_adv.h View File

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

+ 0
- 14
Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h View File

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

+ 0
- 14
Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h View File

621
 
621
 
622
 // @section extruder
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
  * Implementation of linear pressure control
625
  * Implementation of linear pressure control
640
  *
626
  *

+ 0
- 14
Marlin/src/config/examples/makibox/Configuration_adv.h View File

621
 
621
 
622
 // @section extruder
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
  * Implementation of linear pressure control
625
  * Implementation of linear pressure control
640
  *
626
  *

+ 0
- 14
Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h View File

621
 
621
 
622
 // @section extruder
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
  * Implementation of linear pressure control
625
  * Implementation of linear pressure control
640
  *
626
  *

+ 0
- 14
Marlin/src/config/examples/wt150/Configuration_adv.h View File

621
 
621
 
622
 // @section extruder
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
  * Implementation of linear pressure control
625
  * Implementation of linear pressure control
640
  *
626
  *

+ 2
- 7
Marlin/src/inc/Conditionals_post.h View File

209
      */
209
      */
210
     // Double stepping starts at STEP_DOUBLER_FREQUENCY + 1, quad stepping starts at STEP_DOUBLER_FREQUENCY * 2 + 1
210
     // Double stepping starts at STEP_DOUBLER_FREQUENCY + 1, quad stepping starts at STEP_DOUBLER_FREQUENCY * 2 + 1
211
     #ifndef STEP_DOUBLER_FREQUENCY
211
     #ifndef STEP_DOUBLER_FREQUENCY
212
-      #if ENABLED(ADVANCE) || ENABLED(LIN_ADVANCE)
212
+      #if ENABLED(LIN_ADVANCE)
213
         #define STEP_DOUBLER_FREQUENCY 60000 // Hz
213
         #define STEP_DOUBLER_FREQUENCY 60000 // Hz
214
       #else
214
       #else
215
         #define STEP_DOUBLER_FREQUENCY 80000 // Hz
215
         #define STEP_DOUBLER_FREQUENCY 80000 // Hz
260
   #endif
260
   #endif
261
 
261
 
262
   /**
262
   /**
263
-   * Advance calculated values
263
+   * Override here because this is set in Configuration_adv.h
264
    */
264
    */
265
-  #if ENABLED(ADVANCE)
266
-    #define EXTRUSION_AREA CIRCLE_CIRC(0.5 * D_FILAMENT)
267
-    #define STEPS_PER_CUBIC_MM_E (axis_steps_per_mm[E_AXIS_N] / (EXTRUSION_AREA))
268
-  #endif
269
-
270
   #if ENABLED(ULTIPANEL) && DISABLED(ELB_FULL_GRAPHIC_CONTROLLER)
265
   #if ENABLED(ULTIPANEL) && DISABLED(ELB_FULL_GRAPHIC_CONTROLLER)
271
     #undef SD_DETECT_INVERTED
266
     #undef SD_DETECT_INVERTED
272
   #endif
267
   #endif

+ 2
- 7
Marlin/src/inc/SanityCheck.h View File

208
   #error "CONTROLLERFAN_PIN is now CONTROLLER_FAN_PIN, enabled with USE_CONTROLLER_FAN. Please update your Configuration_adv.h."
208
   #error "CONTROLLERFAN_PIN is now CONTROLLER_FAN_PIN, enabled with USE_CONTROLLER_FAN. Please update your Configuration_adv.h."
209
 #elif defined(MIN_RETRACT)
209
 #elif defined(MIN_RETRACT)
210
   #error "MIN_RETRACT is now MIN_AUTORETRACT and MAX_AUTORETRACT. Please update your Configuration_adv.h."
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
 #endif
213
 #endif
212
 
214
 
213
 /**
215
 /**
814
 #endif // DISABLE_[XYZ]
816
 #endif // DISABLE_[XYZ]
815
 
817
 
816
 /**
818
 /**
817
- * Advance Extrusion
818
- */
819
-#if ENABLED(ADVANCE) && ENABLED(LIN_ADVANCE)
820
-  #error "You can enable ADVANCE or LIN_ADVANCE, but not both."
821
-#endif
822
-
823
-/**
824
  * Filament Width Sensor
819
  * Filament Width Sensor
825
  */
820
  */
826
 #if ENABLED(FILAMENT_WIDTH_SENSOR) && !HAS_FILAMENT_WIDTH_SENSOR
821
 #if ENABLED(FILAMENT_WIDTH_SENSOR) && !HAS_FILAMENT_WIDTH_SENSOR

+ 1
- 25
Marlin/src/module/planner.cpp View File

228
     block->decelerate_after = accelerate_steps + plateau_steps;
228
     block->decelerate_after = accelerate_steps + plateau_steps;
229
     block->initial_rate = initial_rate;
229
     block->initial_rate = initial_rate;
230
     block->final_rate = final_rate;
230
     block->final_rate = final_rate;
231
-    #if ENABLED(ADVANCE)
232
-      block->initial_advance = block->advance * sq(entry_factor);
233
-      block->final_advance = block->advance * sq(exit_factor);
234
-    #endif
235
   }
231
   }
236
   CRITICAL_SECTION_END;
232
   CRITICAL_SECTION_END;
237
 }
233
 }
1432
         * axis_steps_per_mm[E_AXIS_N] * 256.0
1428
         * axis_steps_per_mm[E_AXIS_N] * 256.0
1433
       );
1429
       );
1434
 
1430
 
1435
-  #elif ENABLED(ADVANCE)
1436
-
1437
-    // Calculate advance rate
1438
-    if (esteps && (block->steps[X_AXIS] || block->steps[Y_AXIS] || block->steps[Z_AXIS])) {
1439
-      const long acc_dist = estimate_acceleration_distance(0, block->nominal_rate, block->acceleration_steps_per_s2);
1440
-      const float advance = ((STEPS_PER_CUBIC_MM_E) * (EXTRUDER_ADVANCE_K)) * HYPOT(current_speed[E_AXIS], EXTRUSION_AREA) * 256;
1441
-      block->advance = advance;
1442
-      block->advance_rate = acc_dist ? advance / (float)acc_dist : 0;
1443
-    }
1444
-    else
1445
-      block->advance_rate = block->advance = 0;
1446
-
1447
-    /**
1448
-     SERIAL_ECHO_START();
1449
-     SERIAL_ECHOPGM("advance :");
1450
-     SERIAL_ECHO(block->advance/256.0);
1451
-     SERIAL_ECHOPGM("advance rate :");
1452
-     SERIAL_ECHOLN(block->advance_rate/256.0);
1453
-     */
1454
-
1455
-  #endif // ADVANCE or LIN_ADVANCE
1431
+  #endif // LIN_ADVANCE
1456
 
1432
 
1457
   calculate_trapezoid_for_block(block, block->entry_speed / block->nominal_speed, safe_speed / block->nominal_speed);
1433
   calculate_trapezoid_for_block(block, block->entry_speed / block->nominal_speed, safe_speed / block->nominal_speed);
1458
 
1434
 

+ 0
- 5
Marlin/src/module/planner.h View File

100
   #if ENABLED(LIN_ADVANCE)
100
   #if ENABLED(LIN_ADVANCE)
101
     bool use_advance_lead;
101
     bool use_advance_lead;
102
     uint32_t abs_adv_steps_multiplier8; // Factorised by 2^8 to avoid float
102
     uint32_t abs_adv_steps_multiplier8; // Factorised by 2^8 to avoid float
103
-  #elif ENABLED(ADVANCE)
104
-    int32_t advance_rate;
105
-    volatile int32_t initial_advance;
106
-    volatile int32_t final_advance;
107
-    float advance;
108
   #endif
103
   #endif
109
 
104
 
110
   // Fields used by the motion planner to manage acceleration
105
   // Fields used by the motion planner to manage acceleration

+ 32
- 118
Marlin/src/module/stepper.cpp View File

108
 
108
 
109
 volatile uint32_t Stepper::step_events_completed = 0; // The number of step events executed in the current block
109
 volatile uint32_t Stepper::step_events_completed = 0; // The number of step events executed in the current block
110
 
110
 
111
-#if ENABLED(ADVANCE) || ENABLED(LIN_ADVANCE)
111
+#if ENABLED(LIN_ADVANCE)
112
 
112
 
113
   constexpr HAL_TIMER_TYPE ADV_NEVER = HAL_TIMER_TYPE_MAX;
113
   constexpr HAL_TIMER_TYPE ADV_NEVER = HAL_TIMER_TYPE_MAX;
114
 
114
 
116
          Stepper::nextAdvanceISR = ADV_NEVER,
116
          Stepper::nextAdvanceISR = ADV_NEVER,
117
          Stepper::eISR_Rate = ADV_NEVER;
117
          Stepper::eISR_Rate = ADV_NEVER;
118
 
118
 
119
-  #if ENABLED(LIN_ADVANCE)
120
-    volatile int Stepper::e_steps[E_STEPPERS];
121
-    int Stepper::final_estep_rate,
122
-        Stepper::current_estep_rate[E_STEPPERS],
123
-        Stepper::current_adv_steps[E_STEPPERS];
124
-  #else
125
-    long Stepper::e_steps[E_STEPPERS],
126
-         Stepper::final_advance = 0,
127
-         Stepper::old_advance = 0,
128
-         Stepper::advance_rate,
129
-         Stepper::advance;
130
-  #endif
119
+  volatile int Stepper::e_steps[E_STEPPERS];
120
+  int Stepper::final_estep_rate,
121
+      Stepper::current_estep_rate[E_STEPPERS],
122
+      Stepper::current_adv_steps[E_STEPPERS];
131
 
123
 
132
   /**
124
   /**
133
    * See https://github.com/MarlinFirmware/Marlin/issues/5699#issuecomment-309264382
125
    * See https://github.com/MarlinFirmware/Marlin/issues/5699#issuecomment-309264382
144
     return ADV_NEVER;
136
     return ADV_NEVER;
145
   }
137
   }
146
 
138
 
147
-#endif // ADVANCE || LIN_ADVANCE
139
+#endif // LIN_ADVANCE
148
 
140
 
149
 long Stepper::acceleration_time, Stepper::deceleration_time;
141
 long Stepper::acceleration_time, Stepper::deceleration_time;
150
 
142
 
277
     SET_STEP_DIR(Z); // C
269
     SET_STEP_DIR(Z); // C
278
   #endif
270
   #endif
279
 
271
 
280
-  #if DISABLED(ADVANCE) && DISABLED(LIN_ADVANCE)
272
+  #if DISABLED(LIN_ADVANCE)
281
     if (motor_direction(E_AXIS)) {
273
     if (motor_direction(E_AXIS)) {
282
       REV_E_DIR();
274
       REV_E_DIR();
283
       count_direction[E_AXIS] = -1;
275
       count_direction[E_AXIS] = -1;
286
       NORM_E_DIR();
278
       NORM_E_DIR();
287
       count_direction[E_AXIS] = 1;
279
       count_direction[E_AXIS] = 1;
288
     }
280
     }
289
-  #endif // !ADVANCE && !LIN_ADVANCE
281
+  #endif // !LIN_ADVANCE
290
 }
282
 }
291
 
283
 
292
 #if ENABLED(ENDSTOP_INTERRUPTS_FEATURE)
284
 #if ENABLED(ENDSTOP_INTERRUPTS_FEATURE)
312
 
304
 
313
 HAL_STEP_TIMER_ISR {
305
 HAL_STEP_TIMER_ISR {
314
   HAL_timer_isr_prologue(STEP_TIMER_NUM);
306
   HAL_timer_isr_prologue(STEP_TIMER_NUM);
315
-  #if ENABLED(ADVANCE) || ENABLED(LIN_ADVANCE)
307
+  #if ENABLED(LIN_ADVANCE)
316
     Stepper::advance_isr_scheduler();
308
     Stepper::advance_isr_scheduler();
317
   #else
309
   #else
318
     Stepper::isr();
310
     Stepper::isr();
326
   #define ENDSTOP_NOMINAL_OCR_VAL 1500 * HAL_TICKS_PER_US    // check endstops every 1.5ms to guarantee two stepper ISRs within 5ms for BLTouch
318
   #define ENDSTOP_NOMINAL_OCR_VAL 1500 * HAL_TICKS_PER_US    // check endstops every 1.5ms to guarantee two stepper ISRs within 5ms for BLTouch
327
   #define OCR_VAL_TOLERANCE 500 * HAL_TICKS_PER_US           // First max delay is 2.0ms, last min delay is 0.5ms, all others 1.5ms
319
   #define OCR_VAL_TOLERANCE 500 * HAL_TICKS_PER_US           // First max delay is 2.0ms, last min delay is 0.5ms, all others 1.5ms
328
 
320
 
329
-  #if DISABLED(ADVANCE) && DISABLED(LIN_ADVANCE)
321
+  #if DISABLED(LIN_ADVANCE)
330
     // Disable Timer0 ISRs and enable global ISR again to capture UART events (incoming chars)
322
     // Disable Timer0 ISRs and enable global ISR again to capture UART events (incoming chars)
331
     DISABLE_TEMPERATURE_INTERRUPT(); // Temperature ISR
323
     DISABLE_TEMPERATURE_INTERRUPT(); // Temperature ISR
332
     DISABLE_STEPPER_DRIVER_INTERRUPT();
324
     DISABLE_STEPPER_DRIVER_INTERRUPT();
361
 
353
 
362
     _NEXT_ISR(ocr_val);
354
     _NEXT_ISR(ocr_val);
363
 
355
 
364
-  #if DISABLED(ADVANCE) && DISABLED(LIN_ADVANCE)
356
+  #if DISABLED(LIN_ADVANCE)
365
     #ifdef CPU_32_BIT
357
     #ifdef CPU_32_BIT
366
       HAL_timer_set_count(STEP_TIMER_NUM, ocr_val);
358
       HAL_timer_set_count(STEP_TIMER_NUM, ocr_val);
367
     #else
359
     #else
416
           return;
408
           return;
417
         }
409
         }
418
       #endif
410
       #endif
419
-
420
-      // #if ENABLED(ADVANCE)
421
-      //   e_steps[TOOL_E_INDEX] = 0;
422
-      // #endif
423
     }
411
     }
424
     else {
412
     else {
425
       _NEXT_ISR(HAL_STEPPER_TIMER_RATE / 1000); // Run at slow speed - 1 KHz
413
       _NEXT_ISR(HAL_STEPPER_TIMER_RATE / 1000); // Run at slow speed - 1 KHz
465
         }
453
         }
466
       #endif
454
       #endif
467
 
455
 
468
-    #elif ENABLED(ADVANCE)
469
-
470
-      // Always count the unified E axis
471
-      counter_E += current_block->steps[E_AXIS];
472
-      if (counter_E > 0) {
473
-        counter_E -= current_block->step_event_count;
474
-        #if DISABLED(MIXING_EXTRUDER)
475
-          // Don't step E here for mixing extruder
476
-          motor_direction(E_AXIS) ? --e_steps[TOOL_E_INDEX] : ++e_steps[TOOL_E_INDEX];
477
-        #endif
478
-      }
479
-
480
-      #if ENABLED(MIXING_EXTRUDER)
481
-
482
-        // Step mixing steppers proportionally
483
-        const bool dir = motor_direction(E_AXIS);
484
-        MIXING_STEPPERS_LOOP(j) {
485
-          counter_m[j] += current_block->steps[E_AXIS];
486
-          if (counter_m[j] > 0) {
487
-            counter_m[j] -= current_block->mix_event_count[j];
488
-            dir ? --e_steps[j] : ++e_steps[j];
489
-          }
490
-        }
491
-
492
-      #endif // MIXING_EXTRUDER
493
-
494
-    #endif // ADVANCE or LIN_ADVANCE
456
+    #endif // LIN_ADVANCE
495
 
457
 
496
     #define _COUNTER(AXIS) counter_## AXIS
458
     #define _COUNTER(AXIS) counter_## AXIS
497
     #define _APPLY_STEP(AXIS) AXIS ##_APPLY_STEP
459
     #define _APPLY_STEP(AXIS) AXIS ##_APPLY_STEP
552
     #else
514
     #else
553
       #define _CYCLE_APPROX_6 _CYCLE_APPROX_5
515
       #define _CYCLE_APPROX_6 _CYCLE_APPROX_5
554
     #endif
516
     #endif
555
-    #if DISABLED(ADVANCE) && DISABLED(LIN_ADVANCE)
517
+    #if DISABLED(LIN_ADVANCE)
556
       #if ENABLED(MIXING_EXTRUDER)
518
       #if ENABLED(MIXING_EXTRUDER)
557
         #define _CYCLE_APPROX_7 _CYCLE_APPROX_6 + (MIXING_STEPPERS) * 6
519
         #define _CYCLE_APPROX_7 _CYCLE_APPROX_6 + (MIXING_STEPPERS) * 6
558
       #else
520
       #else
588
     #endif
550
     #endif
589
 
551
 
590
     // For non-advance use linear interpolation for E also
552
     // For non-advance use linear interpolation for E also
591
-    #if DISABLED(ADVANCE) && DISABLED(LIN_ADVANCE)
553
+    #if DISABLED(LIN_ADVANCE)
592
       #if ENABLED(MIXING_EXTRUDER)
554
       #if ENABLED(MIXING_EXTRUDER)
593
         // Keep updating the single E axis
555
         // Keep updating the single E axis
594
         counter_E += current_block->steps[E_AXIS];
556
         counter_E += current_block->steps[E_AXIS];
602
       #else // !MIXING_EXTRUDER
564
       #else // !MIXING_EXTRUDER
603
         PULSE_START(E);
565
         PULSE_START(E);
604
       #endif
566
       #endif
605
-    #endif // !ADVANCE && !LIN_ADVANCE
567
+    #endif // !LIN_ADVANCE
606
 
568
 
607
     // For minimum pulse time wait before stopping pulses
569
     // For minimum pulse time wait before stopping pulses
608
     #if EXTRA_CYCLES_XYZE > 20
570
     #if EXTRA_CYCLES_XYZE > 20
622
       PULSE_STOP(Z);
584
       PULSE_STOP(Z);
623
     #endif
585
     #endif
624
 
586
 
625
-    #if DISABLED(ADVANCE) && DISABLED(LIN_ADVANCE)
587
+    #if DISABLED(LIN_ADVANCE)
626
       #if ENABLED(MIXING_EXTRUDER)
588
       #if ENABLED(MIXING_EXTRUDER)
627
         // Always step the single E axis
589
         // Always step the single E axis
628
         if (counter_E > 0) {
590
         if (counter_E > 0) {
638
       #else // !MIXING_EXTRUDER
600
       #else // !MIXING_EXTRUDER
639
         PULSE_STOP(E);
601
         PULSE_STOP(E);
640
       #endif
602
       #endif
641
-    #endif // !ADVANCE && !LIN_ADVANCE
603
+    #endif // !LIN_ADVANCE
642
 
604
 
643
     if (++step_events_completed >= current_block->step_event_count) {
605
     if (++step_events_completed >= current_block->step_event_count) {
644
       all_steps_done = true;
606
       all_steps_done = true;
655
   } // steps_loop
617
   } // steps_loop
656
 
618
 
657
   #if ENABLED(LIN_ADVANCE)
619
   #if ENABLED(LIN_ADVANCE)
620
+
658
     if (current_block->use_advance_lead) {
621
     if (current_block->use_advance_lead) {
659
       const int delta_adv_steps = current_estep_rate[TOOL_E_INDEX] - current_adv_steps[TOOL_E_INDEX];
622
       const int delta_adv_steps = current_estep_rate[TOOL_E_INDEX] - current_adv_steps[TOOL_E_INDEX];
660
       current_adv_steps[TOOL_E_INDEX] += delta_adv_steps;
623
       current_adv_steps[TOOL_E_INDEX] += delta_adv_steps;
666
         // For most extruders, advance the single E stepper
629
         // For most extruders, advance the single E stepper
667
         e_steps[TOOL_E_INDEX] += delta_adv_steps;
630
         e_steps[TOOL_E_INDEX] += delta_adv_steps;
668
       #endif
631
       #endif
669
-   }
670
-  #endif
671
-
672
-  #if ENABLED(ADVANCE) || ENABLED(LIN_ADVANCE)
632
+    }
673
     // If we have esteps to execute, fire the next advance_isr "now"
633
     // If we have esteps to execute, fire the next advance_isr "now"
674
     if (e_steps[TOOL_E_INDEX]) nextAdvanceISR = 0;
634
     if (e_steps[TOOL_E_INDEX]) nextAdvanceISR = 0;
675
-  #endif
635
+
636
+  #endif // LIN_ADVANCE
676
 
637
 
677
   // Calculate new timer value
638
   // Calculate new timer value
678
   if (step_events_completed <= (uint32_t)current_block->accelerate_until) {
639
   if (step_events_completed <= (uint32_t)current_block->accelerate_until) {
705
           current_estep_rate[TOOL_E_INDEX] = ((uint32_t)acc_step_rate * current_block->abs_adv_steps_multiplier8) >> 17;
666
           current_estep_rate[TOOL_E_INDEX] = ((uint32_t)acc_step_rate * current_block->abs_adv_steps_multiplier8) >> 17;
706
         #endif
667
         #endif
707
       }
668
       }
708
-
709
-    #elif ENABLED(ADVANCE)
710
-
711
-      advance += advance_rate * step_loops;
712
-      //NOLESS(advance, current_block->advance);
713
-
714
-      const long advance_whole = advance >> 8,
715
-                 advance_factor = advance_whole - old_advance;
716
-
717
-      // Do E steps + advance steps
718
-      #if ENABLED(MIXING_EXTRUDER)
719
-        // ...for mixing steppers proportionally
720
-        MIXING_STEPPERS_LOOP(j)
721
-          e_steps[j] += advance_factor * current_block->step_event_count / current_block->mix_event_count[j];
722
-      #else
723
-        // ...for the active extruder
724
-        e_steps[TOOL_E_INDEX] += advance_factor;
725
-      #endif
726
-
727
-      old_advance = advance_whole;
728
-
729
-    #endif // ADVANCE or LIN_ADVANCE
730
-
731
-    #if ENABLED(ADVANCE) || ENABLED(LIN_ADVANCE)
732
-      // TODO: HAL
733
       eISR_Rate = adv_rate(e_steps[TOOL_E_INDEX], timer, step_loops);
669
       eISR_Rate = adv_rate(e_steps[TOOL_E_INDEX], timer, step_loops);
734
-    #endif
670
+
671
+    #endif // LIN_ADVANCE
735
   }
672
   }
736
   else if (step_events_completed > (uint32_t)current_block->decelerate_after) {
673
   else if (step_events_completed > (uint32_t)current_block->decelerate_after) {
737
     HAL_TIMER_TYPE step_rate;
674
     HAL_TIMER_TYPE step_rate;
765
           current_estep_rate[TOOL_E_INDEX] = ((uint32_t)step_rate * current_block->abs_adv_steps_multiplier8) >> 17;
702
           current_estep_rate[TOOL_E_INDEX] = ((uint32_t)step_rate * current_block->abs_adv_steps_multiplier8) >> 17;
766
         #endif
703
         #endif
767
       }
704
       }
768
-
769
-    #elif ENABLED(ADVANCE)
770
-
771
-      advance -= advance_rate * step_loops;
772
-      NOLESS(advance, final_advance);
773
-
774
-      // Do E steps + advance steps
775
-      const long advance_whole = advance >> 8,
776
-                 advance_factor = advance_whole - old_advance;
777
-
778
-      #if ENABLED(MIXING_EXTRUDER)
779
-        MIXING_STEPPERS_LOOP(j)
780
-          e_steps[j] += advance_factor * current_block->step_event_count / current_block->mix_event_count[j];
781
-      #else
782
-        e_steps[TOOL_E_INDEX] += advance_factor;
783
-      #endif
784
-
785
-      old_advance = advance_whole;
786
-
787
-    #endif // ADVANCE or LIN_ADVANCE
788
-
789
-    #if ENABLED(ADVANCE) || ENABLED(LIN_ADVANCE)
790
       eISR_Rate = adv_rate(e_steps[TOOL_E_INDEX], timer, step_loops);
705
       eISR_Rate = adv_rate(e_steps[TOOL_E_INDEX], timer, step_loops);
791
-    #endif
706
+
707
+    #endif // LIN_ADVANCE
792
   }
708
   }
793
   else {
709
   else {
794
 
710
 
807
     step_loops = step_loops_nominal;
723
     step_loops = step_loops_nominal;
808
   }
724
   }
809
 
725
 
810
-  #if DISABLED(ADVANCE) && DISABLED(LIN_ADVANCE)
726
+  #if DISABLED(LIN_ADVANCE)
811
     #ifdef CPU_32_BIT
727
     #ifdef CPU_32_BIT
812
       // Make sure stepper interrupt does not monopolise CPU by adjusting count to give about 8 us room
728
       // Make sure stepper interrupt does not monopolise CPU by adjusting count to give about 8 us room
813
       HAL_TIMER_TYPE stepper_timer_count = HAL_timer_get_count(STEP_TIMER_NUM),
729
       HAL_TIMER_TYPE stepper_timer_count = HAL_timer_get_count(STEP_TIMER_NUM),
823
     current_block = NULL;
739
     current_block = NULL;
824
     planner.discard_current_block();
740
     planner.discard_current_block();
825
   }
741
   }
826
-  #if DISABLED(ADVANCE) && DISABLED(LIN_ADVANCE)
742
+  #if DISABLED(LIN_ADVANCE)
827
     HAL_ENABLE_ISRs(); // re-enable ISRs
743
     HAL_ENABLE_ISRs(); // re-enable ISRs
828
   #endif
744
   #endif
829
 }
745
 }
830
 
746
 
831
-#if ENABLED(ADVANCE) || ENABLED(LIN_ADVANCE)
747
+#if ENABLED(LIN_ADVANCE)
832
 
748
 
833
   #define CYCLES_EATEN_E (E_STEPPERS * 5)
749
   #define CYCLES_EATEN_E (E_STEPPERS * 5)
834
   #define EXTRA_CYCLES_E (STEP_PULSE_CYCLES - (CYCLES_EATEN_E))
750
   #define EXTRA_CYCLES_E (STEP_PULSE_CYCLES - (CYCLES_EATEN_E))
968
     HAL_ENABLE_ISRs();
884
     HAL_ENABLE_ISRs();
969
   }
885
   }
970
 
886
 
971
-#endif // ADVANCE or LIN_ADVANCE
887
+#endif // LIN_ADVANCE
972
 
888
 
973
 void Stepper::init() {
889
 void Stepper::init() {
974
 
890
 
1166
 
1082
 
1167
   ENABLE_STEPPER_DRIVER_INTERRUPT();
1083
   ENABLE_STEPPER_DRIVER_INTERRUPT();
1168
 
1084
 
1169
-  #if ENABLED(ADVANCE) || ENABLED(LIN_ADVANCE)
1085
+  #if ENABLED(LIN_ADVANCE)
1170
     for (uint8_t i = 0; i < COUNT(e_steps); i++) e_steps[i] = 0;
1086
     for (uint8_t i = 0; i < COUNT(e_steps); i++) e_steps[i] = 0;
1171
-    #if ENABLED(LIN_ADVANCE)
1172
-      ZERO(current_adv_steps);
1173
-    #endif
1174
-  #endif // ADVANCE || LIN_ADVANCE
1087
+    ZERO(current_adv_steps);
1088
+  #endif
1175
 
1089
 
1176
   endstops.enable(true); // Start with endstops active. After homing they can be disabled
1090
   endstops.enable(true); // Start with endstops active. After homing they can be disabled
1177
   sei();
1091
   sei();

+ 9
- 35
Marlin/src/module/stepper.h View File

90
     static long counter_X, counter_Y, counter_Z, counter_E;
90
     static long counter_X, counter_Y, counter_Z, counter_E;
91
     static volatile uint32_t step_events_completed; // The number of step events executed in the current block
91
     static volatile uint32_t step_events_completed; // The number of step events executed in the current block
92
 
92
 
93
-    #if ENABLED(ADVANCE) || ENABLED(LIN_ADVANCE)
93
+    #if ENABLED(LIN_ADVANCE)
94
       static HAL_TIMER_TYPE nextMainISR, nextAdvanceISR, eISR_Rate;
94
       static HAL_TIMER_TYPE nextMainISR, nextAdvanceISR, eISR_Rate;
95
       #define _NEXT_ISR(T) nextMainISR = T
95
       #define _NEXT_ISR(T) nextMainISR = T
96
 
96
 
97
-      #if ENABLED(LIN_ADVANCE)
98
-        static volatile int e_steps[E_STEPPERS];
99
-        static int final_estep_rate;
100
-        static int current_estep_rate[E_STEPPERS]; // Actual extruder speed [steps/s]
101
-        static int current_adv_steps[E_STEPPERS];  // The amount of current added esteps due to advance.
102
-                                                   // i.e., the current amount of pressure applied
103
-                                                   // to the spring (=filament).
104
-      #else
105
-        static long e_steps[E_STEPPERS];
106
-        static long advance_rate, advance, final_advance;
107
-        static long old_advance;
108
-      #endif
97
+      static volatile int e_steps[E_STEPPERS];
98
+      static int final_estep_rate;
99
+      static int current_estep_rate[E_STEPPERS]; // Actual extruder speed [steps/s]
100
+      static int current_adv_steps[E_STEPPERS];  // The amount of current added esteps due to advance.
101
+                                                 // i.e., the current amount of pressure applied
102
+                                                 // to the spring (=filament).
109
     #else
103
     #else
110
       #define _NEXT_ISR(T) HAL_timer_set_count(STEP_TIMER_NUM, T);
104
       #define _NEXT_ISR(T) HAL_timer_set_count(STEP_TIMER_NUM, T);
111
-    #endif // ADVANCE or LIN_ADVANCE
105
+    #endif // LIN_ADVANCE
112
 
106
 
113
     static long acceleration_time, deceleration_time;
107
     static long acceleration_time, deceleration_time;
114
     //unsigned long accelerate_until, decelerate_after, acceleration_rate, initial_rate, final_rate, nominal_rate;
108
     //unsigned long accelerate_until, decelerate_after, acceleration_rate, initial_rate, final_rate, nominal_rate;
157
 
151
 
158
     static void isr();
152
     static void isr();
159
 
153
 
160
-    #if ENABLED(ADVANCE) || ENABLED(LIN_ADVANCE)
154
+    #if ENABLED(LIN_ADVANCE)
161
       static void advance_isr();
155
       static void advance_isr();
162
       static void advance_isr_scheduler();
156
       static void advance_isr_scheduler();
163
     #endif
157
     #endif
344
         set_directions();
338
         set_directions();
345
       }
339
       }
346
 
340
 
347
-      #if ENABLED(ADVANCE)
348
-
349
-        advance = current_block->initial_advance;
350
-        final_advance = current_block->final_advance;
351
-
352
-        // Do E steps + advance steps
353
-        #if ENABLED(MIXING_EXTRUDER)
354
-          long advance_factor = (advance >> 8) - old_advance;
355
-          // ...for mixing steppers proportionally
356
-          MIXING_STEPPERS_LOOP(j)
357
-            e_steps[j] += advance_factor * current_block->step_event_count / current_block->mix_event_count[j];
358
-        #else
359
-          // ...for the active extruder
360
-          e_steps[TOOL_E_INDEX] += ((advance >> 8) - old_advance);
361
-        #endif
362
-
363
-        old_advance = advance >> 8;
364
-
365
-      #endif
366
-
367
       deceleration_time = 0;
341
       deceleration_time = 0;
368
       // step_rate to timer interval
342
       // step_rate to timer interval
369
       OCR1A_nominal = calc_timer(current_block->nominal_rate);
343
       OCR1A_nominal = calc_timer(current_block->nominal_rate);

Loading…
Cancel
Save