Browse Source

M166 Gradients, LCD Menu for 2-channel Mixer (Geeetech A10M/A20M) (#13022)

pull/1/head
Scott Lahteine 6 years ago
committed by GitHub
parent
commit
6de3d34378
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      Marlin/Configuration.h
  2. 4
      Marlin/src/config/default/Configuration.h
  3. 4
      Marlin/src/config/examples/3DFabXYZ/Migbot/Configuration.h
  4. 4
      Marlin/src/config/examples/AlephObjects/TAZ4/Configuration.h
  5. 4
      Marlin/src/config/examples/AliExpress/CL-260/Configuration.h
  6. 4
      Marlin/src/config/examples/Anet/A2/Configuration.h
  7. 4
      Marlin/src/config/examples/Anet/A2plus/Configuration.h
  8. 4
      Marlin/src/config/examples/Anet/A6/Configuration.h
  9. 4
      Marlin/src/config/examples/Anet/A8/Configuration.h
  10. 4
      Marlin/src/config/examples/AnyCubic/i3/Configuration.h
  11. 4
      Marlin/src/config/examples/ArmEd/Configuration.h
  12. 4
      Marlin/src/config/examples/Azteeg/X5GT/Configuration.h
  13. 4
      Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration.h
  14. 4
      Marlin/src/config/examples/BIBO/TouchX/default/Configuration.h
  15. 4
      Marlin/src/config/examples/BQ/Hephestos/Configuration.h
  16. 4
      Marlin/src/config/examples/BQ/Hephestos_2/Configuration.h
  17. 4
      Marlin/src/config/examples/BQ/WITBOX/Configuration.h
  18. 4
      Marlin/src/config/examples/Cartesio/Configuration.h
  19. 4
      Marlin/src/config/examples/Creality/CR-10/Configuration.h
  20. 4
      Marlin/src/config/examples/Creality/CR-10S/Configuration.h
  21. 4
      Marlin/src/config/examples/Creality/CR-10mini/Configuration.h
  22. 4
      Marlin/src/config/examples/Creality/CR-8/Configuration.h
  23. 4
      Marlin/src/config/examples/Creality/Ender-2/Configuration.h
  24. 4
      Marlin/src/config/examples/Creality/Ender-3/Configuration.h
  25. 4
      Marlin/src/config/examples/Creality/Ender-4/Configuration.h
  26. 4
      Marlin/src/config/examples/Einstart-S/Configuration.h
  27. 4
      Marlin/src/config/examples/Felix/Configuration.h
  28. 4
      Marlin/src/config/examples/Felix/DUAL/Configuration.h
  29. 4
      Marlin/src/config/examples/FlashForge/CreatorPro/Configuration.h
  30. 4
      Marlin/src/config/examples/FolgerTech/i3-2020/Configuration.h
  31. 4
      Marlin/src/config/examples/Formbot/Raptor/Configuration.h
  32. 4
      Marlin/src/config/examples/Formbot/T_Rex_2+/Configuration.h
  33. 4
      Marlin/src/config/examples/Formbot/T_Rex_3/Configuration.h
  34. 2093
      Marlin/src/config/examples/Geeetech/A10M/Configuration.h
  35. 2243
      Marlin/src/config/examples/Geeetech/A10M/Configuration_adv.h
  36. 2097
      Marlin/src/config/examples/Geeetech/A20M/Configuration.h
  37. 2243
      Marlin/src/config/examples/Geeetech/A20M/Configuration_adv.h
  38. 4
      Marlin/src/config/examples/Geeetech/GT2560/Configuration.h
  39. 4
      Marlin/src/config/examples/Geeetech/I3_Pro_X-GT2560/Configuration.h
  40. 4
      Marlin/src/config/examples/Geeetech/MeCreator2/Configuration.h
  41. 4
      Marlin/src/config/examples/Geeetech/Prusa i3 Pro B/bltouch/Configuration.h
  42. 4
      Marlin/src/config/examples/Geeetech/Prusa i3 Pro B/noprobe/Configuration.h
  43. 4
      Marlin/src/config/examples/Geeetech/Prusa i3 Pro C/Configuration.h
  44. 4
      Marlin/src/config/examples/Geeetech/Prusa i3 Pro W/Configuration.h
  45. 4
      Marlin/src/config/examples/Infitary/i3-M508/Configuration.h
  46. 4
      Marlin/src/config/examples/JGAurora/A5/Configuration.h
  47. 4
      Marlin/src/config/examples/MakerParts/Configuration.h
  48. 4
      Marlin/src/config/examples/Malyan/M150/Configuration.h
  49. 4
      Marlin/src/config/examples/Malyan/M200/Configuration.h
  50. 4
      Marlin/src/config/examples/Micromake/C1/basic/Configuration.h
  51. 4
      Marlin/src/config/examples/Micromake/C1/enhanced/Configuration.h
  52. 4
      Marlin/src/config/examples/Mks/Robin/Configuration.h
  53. 4
      Marlin/src/config/examples/Mks/Sbase/Configuration.h
  54. 4
      Marlin/src/config/examples/RapideLite/RL200/Configuration.h
  55. 4
      Marlin/src/config/examples/RepRapPro/Huxley/Configuration.h
  56. 4
      Marlin/src/config/examples/RepRapWorld/Megatronics/Configuration.h
  57. 4
      Marlin/src/config/examples/RigidBot/Configuration.h
  58. 4
      Marlin/src/config/examples/SCARA/Configuration.h
  59. 4
      Marlin/src/config/examples/STM32F10/Configuration.h
  60. 4
      Marlin/src/config/examples/STM32F4/Configuration.h
  61. 4
      Marlin/src/config/examples/Sanguinololu/Configuration.h
  62. 4
      Marlin/src/config/examples/TheBorg/Configuration.h
  63. 4
      Marlin/src/config/examples/TinyBoy2/Configuration.h
  64. 4
      Marlin/src/config/examples/Tronxy/X1/Configuration.h
  65. 4
      Marlin/src/config/examples/Tronxy/X3A/Configuration.h
  66. 4
      Marlin/src/config/examples/Tronxy/X5S/Configuration.h
  67. 4
      Marlin/src/config/examples/Tronxy/XY100/Configuration.h
  68. 4
      Marlin/src/config/examples/UltiMachine/Archim1/Configuration.h
  69. 4
      Marlin/src/config/examples/UltiMachine/Archim2/Configuration.h
  70. 4
      Marlin/src/config/examples/VORONDesign/Configuration.h
  71. 4
      Marlin/src/config/examples/Velleman/K8200/Configuration.h
  72. 4
      Marlin/src/config/examples/Velleman/K8400/Configuration.h
  73. 4
      Marlin/src/config/examples/Velleman/K8400/Dual-head/Configuration.h
  74. 4
      Marlin/src/config/examples/WASP/PowerWASP/Configuration.h
  75. 4
      Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration.h
  76. 4
      Marlin/src/config/examples/adafruit/ST7565/Configuration.h
  77. 4
      Marlin/src/config/examples/delta/Anycubic/Kossel/Configuration.h
  78. 4
      Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration.h
  79. 4
      Marlin/src/config/examples/delta/FLSUN/kossel/Configuration.h
  80. 4
      Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration.h
  81. 4
      Marlin/src/config/examples/delta/Geeetech/Rostock 301/Configuration.h
  82. 4
      Marlin/src/config/examples/delta/Hatchbox_Alpha/Configuration.h
  83. 4
      Marlin/src/config/examples/delta/MKS/SBASE/Configuration.h
  84. 4
      Marlin/src/config/examples/delta/Tevo Little Monster/Configuration.h
  85. 4
      Marlin/src/config/examples/delta/generic/Configuration.h
  86. 4
      Marlin/src/config/examples/delta/kossel_mini/Configuration.h
  87. 4
      Marlin/src/config/examples/delta/kossel_pro/Configuration.h
  88. 4
      Marlin/src/config/examples/delta/kossel_xl/Configuration.h
  89. 4
      Marlin/src/config/examples/gCreate/gMax1.5+/Configuration.h
  90. 4
      Marlin/src/config/examples/makibox/Configuration.h
  91. 4
      Marlin/src/config/examples/stm32f103ret6/Configuration.h
  92. 4
      Marlin/src/config/examples/tvrrug/Round2/Configuration.h
  93. 4
      Marlin/src/config/examples/wt150/Configuration.h
  94. 86
      Marlin/src/feature/mixing.cpp
  95. 207
      Marlin/src/feature/mixing.h
  96. 8
      Marlin/src/feature/power_loss_recovery.cpp
  97. 13
      Marlin/src/feature/power_loss_recovery.h
  98. 12
      Marlin/src/gcode/feature/mixing/M163-M165.cpp
  99. 100
      Marlin/src/gcode/feature/mixing/M166.cpp
  100. 3
      Marlin/src/gcode/gcode.cpp

4
Marlin/Configuration.h

@ -271,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
//#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
#if ENABLED(GRADIENT_MIX)
//#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
#endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).

4
Marlin/src/config/default/Configuration.h

@ -271,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
//#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
#if ENABLED(GRADIENT_MIX)
//#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
#endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).

4
Marlin/src/config/examples/3DFabXYZ/Migbot/Configuration.h

@ -271,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
//#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
#if ENABLED(GRADIENT_MIX)
//#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
#endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).

4
Marlin/src/config/examples/AlephObjects/TAZ4/Configuration.h

@ -271,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
//#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
#if ENABLED(GRADIENT_MIX)
//#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
#endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).

4
Marlin/src/config/examples/AliExpress/CL-260/Configuration.h

@ -271,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
//#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
#if ENABLED(GRADIENT_MIX)
//#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
#endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).

4
Marlin/src/config/examples/Anet/A2/Configuration.h

@ -271,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
//#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
#if ENABLED(GRADIENT_MIX)
//#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
#endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).

4
Marlin/src/config/examples/Anet/A2plus/Configuration.h

@ -271,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
//#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
#if ENABLED(GRADIENT_MIX)
//#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
#endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).

4
Marlin/src/config/examples/Anet/A6/Configuration.h

@ -271,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
//#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
#if ENABLED(GRADIENT_MIX)
//#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
#endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).

4
Marlin/src/config/examples/Anet/A8/Configuration.h

@ -272,6 +272,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
//#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
#if ENABLED(GRADIENT_MIX)
//#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
#endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).

4
Marlin/src/config/examples/AnyCubic/i3/Configuration.h

@ -272,6 +272,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
//#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
#if ENABLED(GRADIENT_MIX)
//#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
#endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).

4
Marlin/src/config/examples/ArmEd/Configuration.h

@ -271,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
//#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
#if ENABLED(GRADIENT_MIX)
//#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
#endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).

4
Marlin/src/config/examples/Azteeg/X5GT/Configuration.h

@ -271,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
//#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
#if ENABLED(GRADIENT_MIX)
//#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
#endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).

4
Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration.h

@ -271,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
//#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
#if ENABLED(GRADIENT_MIX)
//#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
#endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).

4
Marlin/src/config/examples/BIBO/TouchX/default/Configuration.h

@ -271,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
//#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
#if ENABLED(GRADIENT_MIX)
//#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
#endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).

4
Marlin/src/config/examples/BQ/Hephestos/Configuration.h

@ -271,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
//#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
#if ENABLED(GRADIENT_MIX)
//#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
#endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).

4
Marlin/src/config/examples/BQ/Hephestos_2/Configuration.h

@ -279,6 +279,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
//#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
#if ENABLED(GRADIENT_MIX)
//#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
#endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).

4
Marlin/src/config/examples/BQ/WITBOX/Configuration.h

@ -271,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
//#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
#if ENABLED(GRADIENT_MIX)
//#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
#endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).

4
Marlin/src/config/examples/Cartesio/Configuration.h

@ -272,6 +272,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
//#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
#if ENABLED(GRADIENT_MIX)
//#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
#endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).

4
Marlin/src/config/examples/Creality/CR-10/Configuration.h

@ -271,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
//#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
#if ENABLED(GRADIENT_MIX)
//#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
#endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).

4
Marlin/src/config/examples/Creality/CR-10S/Configuration.h

@ -271,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
//#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
#if ENABLED(GRADIENT_MIX)
//#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
#endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).

4
Marlin/src/config/examples/Creality/CR-10mini/Configuration.h

@ -280,6 +280,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
//#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
#if ENABLED(GRADIENT_MIX)
//#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
#endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).

4
Marlin/src/config/examples/Creality/CR-8/Configuration.h

@ -271,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
//#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
#if ENABLED(GRADIENT_MIX)
//#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
#endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).

4
Marlin/src/config/examples/Creality/Ender-2/Configuration.h

@ -271,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
//#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
#if ENABLED(GRADIENT_MIX)
//#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
#endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).

4
Marlin/src/config/examples/Creality/Ender-3/Configuration.h

@ -271,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
//#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
#if ENABLED(GRADIENT_MIX)
//#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
#endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).

4
Marlin/src/config/examples/Creality/Ender-4/Configuration.h

@ -271,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
//#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
#if ENABLED(GRADIENT_MIX)
//#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
#endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).

4
Marlin/src/config/examples/Einstart-S/Configuration.h

@ -271,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
//#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
#if ENABLED(GRADIENT_MIX)
//#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
#endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).

4
Marlin/src/config/examples/Felix/Configuration.h

@ -271,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
//#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
#if ENABLED(GRADIENT_MIX)
//#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
#endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).

4
Marlin/src/config/examples/Felix/DUAL/Configuration.h

@ -271,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
//#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
#if ENABLED(GRADIENT_MIX)
//#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
#endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).

4
Marlin/src/config/examples/FlashForge/CreatorPro/Configuration.h

@ -271,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
//#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
#if ENABLED(GRADIENT_MIX)
//#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
#endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).

4
Marlin/src/config/examples/FolgerTech/i3-2020/Configuration.h

@ -271,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
//#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
#if ENABLED(GRADIENT_MIX)
//#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
#endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).

4
Marlin/src/config/examples/Formbot/Raptor/Configuration.h

@ -312,6 +312,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
//#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
#if ENABLED(GRADIENT_MIX)
//#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
#endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).

4
Marlin/src/config/examples/Formbot/T_Rex_2+/Configuration.h

@ -274,6 +274,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
//#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
#if ENABLED(GRADIENT_MIX)
//#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
#endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).

4
Marlin/src/config/examples/Formbot/T_Rex_3/Configuration.h

@ -275,6 +275,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
//#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
#if ENABLED(GRADIENT_MIX)
//#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
#endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).

2093
Marlin/src/config/examples/Geeetech/A10M/Configuration.h

File diff suppressed because it is too large

2243
Marlin/src/config/examples/Geeetech/A10M/Configuration_adv.h

File diff suppressed because it is too large

2097
Marlin/src/config/examples/Geeetech/A20M/Configuration.h

File diff suppressed because it is too large

2243
Marlin/src/config/examples/Geeetech/A20M/Configuration_adv.h

File diff suppressed because it is too large

4
Marlin/src/config/examples/Geeetech/GT2560/Configuration.h

@ -271,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
//#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
#if ENABLED(GRADIENT_MIX)
//#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
#endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).

4
Marlin/src/config/examples/Geeetech/I3_Pro_X-GT2560/Configuration.h

@ -271,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
//#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
#if ENABLED(GRADIENT_MIX)
//#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
#endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).

4
Marlin/src/config/examples/Geeetech/MeCreator2/Configuration.h

@ -271,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
//#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
#if ENABLED(GRADIENT_MIX)
//#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
#endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).

4
Marlin/src/config/examples/Geeetech/Prusa i3 Pro B/bltouch/Configuration.h

@ -271,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
//#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
#if ENABLED(GRADIENT_MIX)
//#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
#endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).

4
Marlin/src/config/examples/Geeetech/Prusa i3 Pro B/noprobe/Configuration.h

@ -271,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
//#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
#if ENABLED(GRADIENT_MIX)
//#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
#endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).

4
Marlin/src/config/examples/Geeetech/Prusa i3 Pro C/Configuration.h

@ -271,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
//#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
#if ENABLED(GRADIENT_MIX)
//#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
#endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).

4
Marlin/src/config/examples/Geeetech/Prusa i3 Pro W/Configuration.h

@ -271,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
//#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
#if ENABLED(GRADIENT_MIX)
//#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
#endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).

4
Marlin/src/config/examples/Infitary/i3-M508/Configuration.h

@ -271,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
//#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
#if ENABLED(GRADIENT_MIX)
//#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
#endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).

4
Marlin/src/config/examples/JGAurora/A5/Configuration.h

@ -276,6 +276,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
//#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
#if ENABLED(GRADIENT_MIX)
//#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
#endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).

4
Marlin/src/config/examples/MakerParts/Configuration.h

@ -291,6 +291,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
//#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
#if ENABLED(GRADIENT_MIX)
//#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
#endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).

4
Marlin/src/config/examples/Malyan/M150/Configuration.h

@ -276,6 +276,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
//#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
#if ENABLED(GRADIENT_MIX)
//#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
#endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).

4
Marlin/src/config/examples/Malyan/M200/Configuration.h

@ -271,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
//#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
#if ENABLED(GRADIENT_MIX)
//#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
#endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).

4
Marlin/src/config/examples/Micromake/C1/basic/Configuration.h

@ -271,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
//#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
#if ENABLED(GRADIENT_MIX)
//#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
#endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).

4
Marlin/src/config/examples/Micromake/C1/enhanced/Configuration.h

@ -271,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
//#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
#if ENABLED(GRADIENT_MIX)
//#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
#endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).

4
Marlin/src/config/examples/Mks/Robin/Configuration.h

@ -272,6 +272,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
//#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
#if ENABLED(GRADIENT_MIX)
//#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
#endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).

4
Marlin/src/config/examples/Mks/Sbase/Configuration.h

@ -271,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
//#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
#if ENABLED(GRADIENT_MIX)
//#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
#endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).

4
Marlin/src/config/examples/RapideLite/RL200/Configuration.h

@ -271,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
//#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
#if ENABLED(GRADIENT_MIX)
//#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
#endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).

4
Marlin/src/config/examples/RepRapPro/Huxley/Configuration.h

@ -271,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
//#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
#if ENABLED(GRADIENT_MIX)
//#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
#endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).

4
Marlin/src/config/examples/RepRapWorld/Megatronics/Configuration.h

@ -271,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
//#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
#if ENABLED(GRADIENT_MIX)
//#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
#endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).

4
Marlin/src/config/examples/RigidBot/Configuration.h

@ -274,6 +274,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
//#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
#if ENABLED(GRADIENT_MIX)
//#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
#endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).

4
Marlin/src/config/examples/SCARA/Configuration.h

@ -302,6 +302,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
//#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
#if ENABLED(GRADIENT_MIX)
//#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
#endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).

4
Marlin/src/config/examples/STM32F10/Configuration.h

@ -271,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
//#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
#if ENABLED(GRADIENT_MIX)
//#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
#endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).

4
Marlin/src/config/examples/STM32F4/Configuration.h

@ -271,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
//#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
#if ENABLED(GRADIENT_MIX)
//#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
#endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).

4
Marlin/src/config/examples/Sanguinololu/Configuration.h

@ -271,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
//#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
#if ENABLED(GRADIENT_MIX)
//#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
#endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).

4
Marlin/src/config/examples/TheBorg/Configuration.h

@ -271,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
//#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
#if ENABLED(GRADIENT_MIX)
//#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
#endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).

4
Marlin/src/config/examples/TinyBoy2/Configuration.h

@ -293,6 +293,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
//#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
#if ENABLED(GRADIENT_MIX)
//#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
#endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).

4
Marlin/src/config/examples/Tronxy/X1/Configuration.h

@ -271,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
//#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
#if ENABLED(GRADIENT_MIX)
//#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
#endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).

4
Marlin/src/config/examples/Tronxy/X3A/Configuration.h

@ -271,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
//#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
#if ENABLED(GRADIENT_MIX)
//#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
#endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).

4
Marlin/src/config/examples/Tronxy/X5S/Configuration.h

@ -271,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
//#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
#if ENABLED(GRADIENT_MIX)
//#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
#endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).

4
Marlin/src/config/examples/Tronxy/XY100/Configuration.h

@ -271,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
//#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
#if ENABLED(GRADIENT_MIX)
//#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
#endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).

4
Marlin/src/config/examples/UltiMachine/Archim1/Configuration.h

@ -271,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
//#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
#if ENABLED(GRADIENT_MIX)
//#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
#endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).

4
Marlin/src/config/examples/UltiMachine/Archim2/Configuration.h

@ -271,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
//#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
#if ENABLED(GRADIENT_MIX)
//#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
#endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).

4
Marlin/src/config/examples/VORONDesign/Configuration.h

@ -271,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
//#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
#if ENABLED(GRADIENT_MIX)
//#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
#endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).

4
Marlin/src/config/examples/Velleman/K8200/Configuration.h

@ -291,6 +291,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
//#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
#if ENABLED(GRADIENT_MIX)
//#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
#endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).

4
Marlin/src/config/examples/Velleman/K8400/Configuration.h

@ -271,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
//#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
#if ENABLED(GRADIENT_MIX)
//#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
#endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).

4
Marlin/src/config/examples/Velleman/K8400/Dual-head/Configuration.h

@ -271,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
//#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
#if ENABLED(GRADIENT_MIX)
//#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
#endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).

4
Marlin/src/config/examples/WASP/PowerWASP/Configuration.h

@ -290,6 +290,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
//#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
#if ENABLED(GRADIENT_MIX)
//#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
#endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).

4
Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration.h

@ -271,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
//#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
#if ENABLED(GRADIENT_MIX)
//#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
#endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).

4
Marlin/src/config/examples/adafruit/ST7565/Configuration.h

@ -271,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
//#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
#if ENABLED(GRADIENT_MIX)
//#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
#endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).

4
Marlin/src/config/examples/delta/Anycubic/Kossel/Configuration.h

@ -286,6 +286,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
//#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
#if ENABLED(GRADIENT_MIX)
//#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
#endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).

4
Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration.h

@ -271,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
//#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
#if ENABLED(GRADIENT_MIX)
//#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
#endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).

4
Marlin/src/config/examples/delta/FLSUN/kossel/Configuration.h

@ -271,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
//#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
#if ENABLED(GRADIENT_MIX)
//#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
#endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).

4
Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration.h

@ -271,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
//#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
#if ENABLED(GRADIENT_MIX)
//#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
#endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).

4
Marlin/src/config/examples/delta/Geeetech/Rostock 301/Configuration.h

@ -271,6 +271,10 @@
#define MIXING_STEPPERS 3 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
//#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
#if ENABLED(GRADIENT_MIX)
//#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
#endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).

4
Marlin/src/config/examples/delta/Hatchbox_Alpha/Configuration.h

@ -276,6 +276,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
//#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
#if ENABLED(GRADIENT_MIX)
//#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
#endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).

4
Marlin/src/config/examples/delta/MKS/SBASE/Configuration.h

@ -271,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
//#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
#if ENABLED(GRADIENT_MIX)
//#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
#endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).

4
Marlin/src/config/examples/delta/Tevo Little Monster/Configuration.h

@ -271,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
//#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
#if ENABLED(GRADIENT_MIX)
//#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
#endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).

4
Marlin/src/config/examples/delta/generic/Configuration.h

@ -271,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
//#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
#if ENABLED(GRADIENT_MIX)
//#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
#endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).

4
Marlin/src/config/examples/delta/kossel_mini/Configuration.h

@ -271,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
//#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
#if ENABLED(GRADIENT_MIX)
//#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
#endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).

4
Marlin/src/config/examples/delta/kossel_pro/Configuration.h

@ -275,6 +275,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
//#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
#if ENABLED(GRADIENT_MIX)
//#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
#endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).

4
Marlin/src/config/examples/delta/kossel_xl/Configuration.h

@ -271,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
//#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
#if ENABLED(GRADIENT_MIX)
//#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
#endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).

4
Marlin/src/config/examples/gCreate/gMax1.5+/Configuration.h

@ -276,6 +276,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
//#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
#if ENABLED(GRADIENT_MIX)
//#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
#endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).

4
Marlin/src/config/examples/makibox/Configuration.h

@ -271,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
//#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
#if ENABLED(GRADIENT_MIX)
//#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
#endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).

4
Marlin/src/config/examples/stm32f103ret6/Configuration.h

@ -271,6 +271,10 @@
#define MIXING_STEPPERS 3 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
//#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
#if ENABLED(GRADIENT_MIX)
//#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
#endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).

4
Marlin/src/config/examples/tvrrug/Round2/Configuration.h

@ -271,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
//#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
#if ENABLED(GRADIENT_MIX)
//#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
#endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).

4
Marlin/src/config/examples/wt150/Configuration.h

@ -271,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
//#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
#if ENABLED(GRADIENT_MIX)
//#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
#endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).

86
Marlin/src/feature/mixing.cpp

@ -44,6 +44,10 @@ int_fast8_t Mixer::runner = 0;
mixer_comp_t Mixer::s_color[MIXING_STEPPERS];
mixer_accu_t Mixer::accu[MIXING_STEPPERS] = { 0 };
#if DUAL_MIXING_EXTRUDER || ENABLED(GRADIENT_MIX)
mixer_perc_t Mixer::mix[MIXING_STEPPERS];
#endif
void Mixer::normalize(const uint8_t tool_index) {
float cmax = 0;
#ifdef MIXER_NORMALIZER_DEBUG
@ -66,9 +70,8 @@ void Mixer::normalize(const uint8_t tool_index) {
#endif
// Scale all values so their maximum is COLOR_A_MASK
const float inverse_max = RECIPROCAL(cmax);
MIXER_STEPPER_LOOP(i)
color[tool_index][i] = collector[i] * COLOR_A_MASK * inverse_max;
const float scale = float(COLOR_A_MASK) / cmax;
MIXER_STEPPER_LOOP(i) color[tool_index][i] = collector[i] * scale;
#ifdef MIXER_NORMALIZER_DEBUG
csum = 0;
@ -86,6 +89,10 @@ void Mixer::normalize(const uint8_t tool_index) {
}
SERIAL_ECHOLNPGM("]");
#endif
#if ENABLED(GRADIENT_MIX)
refresh_gradient();
#endif
}
void Mixer::reset_vtools() {
@ -115,6 +122,79 @@ void Mixer::init() {
#endif
ZERO(collector);
#if DUAL_MIXING_EXTRUDER || ENABLED(GRADIENT_MIX)
update_mix_from_vtool();
#endif
#if ENABLED(GRADIENT_MIX)
update_gradient_for_planner_z();
#endif
}
void Mixer::refresh_collector(const float proportion/*=1.0*/, const uint8_t t/*=selected_vtool*/) {
float csum = 0, cmax = 0;
MIXER_STEPPER_LOOP(i) {
const float v = color[t][i];
cmax = MAX(cmax, v);
csum += v;
}
//SERIAL_ECHOPAIR("Mixer::refresh_collector(", proportion);
//SERIAL_ECHOPAIR(", ", int(t));
//SERIAL_ECHOPAIR(") cmax=", cmax);
//SERIAL_ECHOPAIR(" csum=", csum);
//SERIAL_ECHOPGM(" color");
const float inv_prop = proportion / csum;
MIXER_STEPPER_LOOP(i) {
collector[i] = color[t][i] * inv_prop;
//SERIAL_ECHOPAIR(" [", int(t));
//SERIAL_ECHOPAIR("][", int(i));
//SERIAL_ECHOPAIR("] = ", int(color[t][i]));
//SERIAL_ECHOPAIR(" (", collector[i]);
//SERIAL_ECHOPGM(") ");
}
//SERIAL_EOL();
}
#if ENABLED(GRADIENT_MIX)
#include "../module/motion.h"
#include "../module/planner.h"
gradient_t Mixer::gradient = {
false, // enabled
{0}, // color (array)
0, 0, // start_z, end_z
0, 1, // start_vtool, end_vtool
{0}, {0} // start_mix[], end_mix[]
#if ENABLED(GRADIENT_VTOOL)
, -1 // vtool_index
#endif
};
float Mixer::prev_z; // = 0
void Mixer::update_gradient_for_z(const float z) {
if (z == prev_z) return;
prev_z = z;
const float slice = gradient.end_z - gradient.start_z;
float pct = (z - gradient.start_z) / slice;
NOLESS(pct, 0.0f); NOMORE(pct, 1.0f);
MIXER_STEPPER_LOOP(i) {
const mixer_perc_t sm = gradient.start_mix[i];
mix[i] = sm + (gradient.end_mix[i] - sm) * pct;
}
copy_mix_to_color(gradient.color);
}
void Mixer::update_gradient_for_planner_z() {
update_gradient_for_z(planner.get_axis_position_mm(Z_AXIS));
}
#endif // GRADIENT_MIX
#endif // MIXING_EXTRUDER

207
Marlin/src/feature/mixing.h

@ -23,34 +23,46 @@
#include "../inc/MarlinConfig.h"
#ifdef __AVR__
//#define MIXER_NORMALIZER_DEBUG
#if !defined(__AVR__) // || DUAL_MIXING_EXTRUDER
// Use 16-bit (or fastest) data for the integer mix factors
typedef uint_fast16_t mixer_comp_t;
typedef uint_fast16_t mixer_accu_t;
#define COLOR_A_MASK 0x8000
#define COLOR_MASK 0x7FFF
#else
// Use 8-bit data for the integer mix factors
// Exactness is sacrificed for speed
#define MIXER_ACCU_SIGNED
typedef uint8_t mixer_comp_t;
typedef int8_t mixer_accu_t;
#define COLOR_A_MASK 0x80
#define COLOR_MASK 0x7F
#else
typedef uint_fast16_t mixer_comp_t;
typedef uint_fast16_t mixer_accu_t;
#define COLOR_A_MASK 0x8000
#define COLOR_MASK 0x7FFF
#endif
typedef int8_t mixer_perc_t;
#ifndef MIXING_VIRTUAL_TOOLS
#define MIXING_VIRTUAL_TOOLS 1
#endif
#ifdef RETRACT_SYNC_MIXING
#define NR_MIXING_VIRTUAL_TOOLS (MIXING_VIRTUAL_TOOLS + 1)
#define MIXER_AUTORETRACT_TOOL MIXING_VIRTUAL_TOOLS
#if NR_MIXING_VIRTUAL_TOOLS > 254
#error "MIXING_VIRTUAL_TOOLS must be <= 254!"
enum MixTool {
FIRST_USER_VIRTUAL_TOOL = 0,
LAST_USER_VIRTUAL_TOOL = MIXING_VIRTUAL_TOOLS - 1,
NR_USER_VIRTUAL_TOOLS,
#ifdef RETRACT_SYNC_MIXING
MIXER_AUTORETRACT_TOOL = NR_USER_VIRTUAL_TOOLS,
NR_MIXING_VIRTUAL_TOOLS
#else
NR_MIXING_VIRTUAL_TOOLS = NR_USER_VIRTUAL_TOOLS
#endif
};
#ifdef RETRACT_SYNC_MIXING
static_assert(NR_MIXING_VIRTUAL_TOOLS <= 254, "MIXING_VIRTUAL_TOOLS must be <= 254!");
#else
#define NR_MIXING_VIRTUAL_TOOLS (MIXING_VIRTUAL_TOOLS)
#if NR_MIXING_VIRTUAL_TOOLS > 255
#error "MIXING_VIRTUAL_TOOLS must be <= 255!"
#endif
static_assert(NR_MIXING_VIRTUAL_TOOLS <= 255, "MIXING_VIRTUAL_TOOLS must be <= 255!");
#endif
#define MIXER_STEPPER_LOOP(VAR) \
@ -60,6 +72,22 @@
#define MIXER_POPULATE_BLOCK() mixer.populate_block(block->b_color)
#define MIXER_STEPPER_SETUP() mixer.stepper_setup(current_block->b_color)
#if ENABLED(GRADIENT_MIX)
typedef struct {
bool enabled; // This gradient is enabled
mixer_comp_t color[MIXING_STEPPERS]; // The current gradient color
float start_z, end_z; // Region for gradient
int8_t start_vtool, end_vtool; // Start and end virtual tools
mixer_perc_t start_mix[MIXING_STEPPERS], // Start and end mixes from those tools
end_mix[MIXING_STEPPERS];
#if ENABLED(GRADIENT_VTOOL)
int8_t vtool_index; // Use this virtual tool number as index
#endif
} gradient_t;
#endif
/**
* @brief Mixer class
* @details Contains data and behaviors for a Mixing Extruder
@ -67,27 +95,157 @@
class Mixer {
public:
static void init();
static float collector[MIXING_STEPPERS]; // M163 components, also editable from LCD
static void init(); // Populate colors at boot time
static void reset_vtools();
static void refresh_collector(const float proportion=1.0, const uint8_t t=selected_vtool);
// Used up to Planner level
FORCE_INLINE static void set_collector(const uint8_t c, const float f) { collector[c] = MAX(f, 0.0f); }
static void normalize(const uint8_t tool_index);
FORCE_INLINE static void normalize() { normalize(selected_vtool); }
FORCE_INLINE static uint8_t get_current_vtool() { return selected_vtool; }
FORCE_INLINE static void T(const uint_fast8_t c) { selected_vtool = c; }
FORCE_INLINE static void set_collector(const uint8_t c, const float f) { collector[c] = f; }
FORCE_INLINE static void T(const uint_fast8_t c) {
selected_vtool = c;
#if ENABLED(GRADIENT_VTOOL)
refresh_gradient();
#endif
#if DUAL_MIXING_EXTRUDER
update_mix_from_vtool();
#endif
}
// Used when dealing with blocks
FORCE_INLINE static void populate_block(mixer_comp_t b_color[]) {
uint_fast8_t j = get_current_vtool();
MIXER_STEPPER_LOOP(i) b_color[i] = color[j][i];
FORCE_INLINE static void populate_block(mixer_comp_t b_color[MIXING_STEPPERS]) {
#if ENABLED(GRADIENT_MIX)
if (gradient.enabled) {
MIXER_STEPPER_LOOP(i) b_color[i] = gradient.color[i];
return;
}
#endif
MIXER_STEPPER_LOOP(i) b_color[i] = color[selected_vtool][i];
}
FORCE_INLINE static void stepper_setup(mixer_comp_t b_color[]) { MIXER_STEPPER_LOOP(i) s_color[i] = b_color[i]; }
FORCE_INLINE static void stepper_setup(mixer_comp_t b_color[MIXING_STEPPERS]) {
MIXER_STEPPER_LOOP(i) s_color[i] = b_color[i];
}
#if DUAL_MIXING_EXTRUDER || ENABLED(GRADIENT_MIX)
static mixer_perc_t mix[MIXING_STEPPERS]; // Scratch array for the Mix in proportion to 100
static inline void copy_mix_to_color(mixer_comp_t (&tcolor)[MIXING_STEPPERS]) {
// Scale each component to the largest one in terms of COLOR_A_MASK
// So the largest component will be COLOR_A_MASK and the other will be in proportion to it
const float scale = (COLOR_A_MASK) * RECIPROCAL(float(MAX(mix[0], mix[1])));
// Scale all values so their maximum is COLOR_A_MASK
MIXER_STEPPER_LOOP(i) tcolor[i] = mix[i] * scale;
#ifdef MIXER_NORMALIZER_DEBUG
SERIAL_ECHOPAIR("Mix [", int(mix[0]));
SERIAL_ECHOPAIR(", ", int(mix[1]));
SERIAL_ECHOPAIR("] to Color [", int(tcolor[0]));
SERIAL_ECHOPAIR(", ", int(tcolor[1]));
SERIAL_ECHOLNPGM("]");
#endif
}
static inline void update_mix_from_vtool(const uint8_t j=selected_vtool) {
float ctot = 0;
MIXER_STEPPER_LOOP(i) ctot += color[j][i];
//MIXER_STEPPER_LOOP(i) mix[i] = 100.0f * color[j][i] / ctot;
mix[0] = mixer_perc_t(100.0f * color[j][0] / ctot);
mix[1] = 100 - mix[0];
#ifdef MIXER_NORMALIZER_DEBUG
SERIAL_ECHOPAIR("V-tool ", int(j));
SERIAL_ECHOPAIR(" [", int(color[j][0]));
SERIAL_ECHOPAIR(", ", int(color[j][1]));
SERIAL_ECHOPAIR("] to Mix [", int(mix[0]));
SERIAL_ECHOPAIR(", ", int(mix[1]));
SERIAL_ECHOLNPGM("]");
#endif
}
#endif // DUAL_MIXING_EXTRUDER || GRADIENT_MIX
#if DUAL_MIXING_EXTRUDER
// Update the virtual tool from an edited mix
static inline void update_vtool_from_mix() {
copy_mix_to_color(color[selected_vtool]);
#if ENABLED(GRADIENT_MIX)
refresh_gradient();
#endif
// MIXER_STEPPER_LOOP(i) collector[i] = mix[i];
// normalize();
}
#endif // DUAL_MIXING_EXTRUDER
#if ENABLED(GRADIENT_MIX)
static gradient_t gradient;
static float prev_z;
// Update the current mix from the gradient for a given Z
static void update_gradient_for_z(const float z);
static void update_gradient_for_planner_z();
static inline void gradient_control(const float z) {
if (gradient.enabled) {
if (z >= gradient.end_z)
T(gradient.end_vtool);
else
update_gradient_for_z(z);
}
}
static inline void update_mix_from_gradient() {
float ctot = 0;
MIXER_STEPPER_LOOP(i) ctot += gradient.color[i];
mix[0] = (mixer_perc_t)CEIL(100.0f * gradient.color[0] / ctot);
mix[1] = 100 - mix[0];
#ifdef MIXER_NORMALIZER_DEBUG
SERIAL_ECHOPAIR("Gradient [", int(gradient.color[0]));
SERIAL_ECHOPAIR(", ", int(gradient.color[1]));
SERIAL_ECHOPAIR("] to Mix [", int(mix[0]));
SERIAL_ECHOPAIR(", ", int(mix[1]));
SERIAL_ECHOLNPGM("]");
#endif
}
// Refresh the gradient after a change
static void refresh_gradient() {
#if ENABLED(GRADIENT_VTOOL)
const bool is_grd = (selected_vtool == gradient.vtool_index);
#else
constexpr bool is_grd = true;
#endif
gradient.enabled = is_grd && gradient.start_vtool != gradient.end_vtool && gradient.start_z < gradient.end_z;
if (gradient.enabled) {
mixer_perc_t mix_bak[MIXING_STEPPERS];
COPY(mix_bak, mix);
update_mix_from_vtool(gradient.start_vtool);
COPY(gradient.start_mix, mix);
update_mix_from_vtool(gradient.end_vtool);
COPY(gradient.end_mix, mix);
update_gradient_for_planner_z();
COPY(mix, mix_bak);
prev_z = -1;
}
}
#endif // GRADIENT_MIX
// Used in Stepper
FORCE_INLINE static uint8_t get_stepper() { return runner; }
FORCE_INLINE static uint8_t get_next_stepper() {
do {
for (;;) {
if (--runner < 0) runner = MIXING_STEPPERS - 1;
accu[runner] += s_color[runner];
if (
@ -100,14 +258,13 @@ class Mixer {
accu[runner] &= COLOR_MASK;
return runner;
}
} while( true );
}
}
private:
// Used up to Planner level
static uint_fast8_t selected_vtool;
static float collector[MIXING_STEPPERS];
static mixer_comp_t color[NR_MIXING_VIRTUAL_TOOLS][MIXING_STEPPERS];
// Used in Stepper

8
Marlin/src/feature/power_loss_recovery.cpp

@ -176,6 +176,10 @@ void PrintJobRecovery::save(const bool force/*=false*/, const bool save_queue/*=
);
#endif
#if ENABLED(GRADIENT_MIX)
memcpy(&info.gradient, &mixer.gradient, sizeof(info.gradient));
#endif
#if ENABLED(FWRETRACT)
COPY(info.retract, fwretract.current_retract);
info.retract_hop = fwretract.current_hop;
@ -305,6 +309,10 @@ void PrintJobRecovery::resume() {
}
#endif
#if ENABLED(GRADIENT_MIX)
memcpy(&mixer.gradient, &info.gradient, sizeof(info.gradient));
#endif
// Restore Z (plus raise) and E positions with G92.0
dtostrf(info.current_position[Z_AXIS] + RECOVERY_ZRAISE, 1, 3, str_1);
dtostrf(info.current_position[E_AXIS]

13
Marlin/src/feature/power_loss_recovery.h

@ -28,6 +28,10 @@
#include "../sd/cardreader.h"
#include "../inc/MarlinConfigPre.h"
#if ENABLED(MIXING_EXTRUDER)
#include "../feature/mixing.h"
#endif
#define SAVE_INFO_INTERVAL_MS 0
//#define SAVE_EACH_CMD_MODE
//#define DEBUG_POWER_LOSS_RECOVERY
@ -63,6 +67,15 @@ typedef struct {
float retract[EXTRUDERS], retract_hop;
#endif
// Mixing extruder and gradient
#if ENABLED(MIXING_EXTRUDER)
//uint_fast8_t selected_vtool;
//mixer_comp_t color[NR_MIXING_VIRTUAL_TOOLS][MIXING_STEPPERS];
#if ENABLED(GRADIENT_MIX)
gradient_t gradient;
#endif
#endif
// Command queue
uint8_t commands_in_queue, cmd_queue_index_r;
char command_queue[BUFSIZE][MAX_CMD_SIZE];

12
Marlin/src/gcode/feature/mixing/M163-M165.cpp

@ -38,7 +38,7 @@
void GcodeSuite::M163() {
const int mix_index = parser.intval('S');
if (mix_index < MIXING_STEPPERS)
mixer.set_collector(mix_index, MAX(parser.floatval('P'), 0.0));
mixer.set_collector(mix_index, parser.floatval('P'));
}
/**
@ -53,10 +53,12 @@ void GcodeSuite::M164() {
#else
constexpr int tool_index = 0;
#endif
if (WITHIN(tool_index, 0, MIXING_VIRTUAL_TOOLS - 1))
if (tool_index >= 0) {
if (tool_index < MIXING_VIRTUAL_TOOLS)
mixer.normalize(tool_index);
}
else
mixer.normalize(mixer.get_current_vtool());
mixer.normalize();
}
#if ENABLED(DIRECT_MIXING_IN_G1)
@ -95,7 +97,7 @@ void GcodeSuite::M164() {
MIXER_STEPPER_LOOP(i) {
if (parser.seenval(mixing_codes[i])) {
SBI(mix_bits, i);
mixer.set_collector(i, MAX(parser.value_float(), 0.0f));
mixer.set_collector(i, parser.value_float());
}
}
// If any mixing factors were included, clear the rest
@ -103,7 +105,7 @@ void GcodeSuite::M164() {
if (mix_bits) {
MIXER_STEPPER_LOOP(i)
if (!TEST(mix_bits, i)) mixer.set_collector(i, 0.0f);
mixer.normalize(mixer.get_current_vtool());
mixer.normalize();
}
}

100
Marlin/src/gcode/feature/mixing/M166.cpp

@ -0,0 +1,100 @@
/**
* Marlin 3D Printer Firmware
* Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#include "../../../inc/MarlinConfig.h"
#if ENABLED(GRADIENT_MIX)
#include "../../gcode.h"
#include "../../../module/motion.h"
#include "../../../module/planner.h"
#include "../../../feature/mixing.h"
inline void echo_mix() {
SERIAL_ECHOPAIR(" (", int(mixer.mix[0]));
SERIAL_ECHOPAIR("%|", int(mixer.mix[1]));
SERIAL_ECHOPGM("%)");
}
inline void echo_zt(const int t, const float &z) {
mixer.update_mix_from_vtool(t);
SERIAL_ECHOPAIR(" Z", z);
SERIAL_ECHOPAIR(" T", t);
echo_mix();
}
/**
* M166: Set a simple gradient mix for a two-component mixer
* based on the Geeetech A10M implementation by Jone Liu.
*
* S[bool] - Enable / disable gradients
* A[float] - Starting Z for the gradient
* Z[float] - Ending Z for the gradient. (Must be greater than the starting Z.)
* I[index] - V-Tool to use as the starting mix.
* J[index] - V-Tool to use as the ending mix.
*
* T[index] - A V-Tool index to use as an alias for the Gradient (Requires GRADIENT_VTOOL)
* T with no index clears the setting. Note: This can match the I or J value.
*
* Example: M166 S1 A0 Z20 I0 J1
*/
void GcodeSuite::M166() {
if (parser.seenval('A')) mixer.gradient.start_z = parser.value_float();
if (parser.seenval('Z')) mixer.gradient.end_z = parser.value_float();
if (parser.seenval('I')) mixer.gradient.start_vtool = (uint8_t)constrain(parser.value_int(), 0, MIXING_VIRTUAL_TOOLS);
if (parser.seenval('J')) mixer.gradient.end_vtool = (uint8_t)constrain(parser.value_int(), 0, MIXING_VIRTUAL_TOOLS);
#if ENABLED(GRADIENT_VTOOL)
if (parser.seen('T')) mixer.gradient.vtool_index = parser.byteval('T', -1);
#endif
if (parser.seen('S')) mixer.gradient.enabled = parser.value_bool();
SERIAL_ECHOPGM("Gradient Mix ");
serialprint_onoff(mixer.gradient.enabled);
if (mixer.gradient.enabled) {
mixer.refresh_gradient();
#if ENABLED(GRADIENT_VTOOL)
if (mixer.gradient.vtool_index >= 0) {
SERIAL_ECHOPAIR(" (T", int(mixer.gradient.vtool_index));
SERIAL_CHAR(')');
}
#endif
SERIAL_ECHOPGM(" ; Start");
echo_zt(mixer.gradient.start_vtool, mixer.gradient.start_z);
SERIAL_ECHOPGM(" ; End");
echo_zt(mixer.gradient.end_vtool, mixer.gradient.end_z);
mixer.update_mix_from_gradient();
SERIAL_ECHOPAIR(" ; Current Z", planner.get_axis_position_mm(Z_AXIS));
echo_mix();
}
SERIAL_EOL();
}
#endif // GRADIENT_MIX

3
Marlin/src/gcode/gcode.cpp

@ -443,6 +443,9 @@ void GcodeSuite::process_parsed_command(
#if ENABLED(DIRECT_MIXING_IN_G1)
case 165: M165(); break; // M165: Set multiple mix weights
#endif
#if ENABLED(GRADIENT_MIX)
case 166: M166(); break; // M166: Set Gradient Mix
#endif
#endif
#if DISABLED(NO_VOLUMETRICS)

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save