|
@@ -106,11 +106,32 @@ void Mixer::reset_vtools() {
|
106
|
106
|
MIXER_STEPPER_LOOP(i)
|
107
|
107
|
color[t][i] = (i == 0) ? COLOR_A_MASK : 0;
|
108
|
108
|
#endif
|
|
109
|
+
|
|
110
|
+ // MIXING_PRESETS: Set a variety of obvious mixes as presets
|
|
111
|
+ #if ENABLED(MIXING_PRESETS) && WITHIN(MIXING_STEPPERS, 2, 3)
|
|
112
|
+ #if MIXING_STEPPERS == 2
|
|
113
|
+ if (MIXING_VIRTUAL_TOOLS > 2) { collector[0] = 1; collector[1] = 1; mixer.normalize(2); } // 1:1
|
|
114
|
+ if (MIXING_VIRTUAL_TOOLS > 3) { collector[0] = 3; mixer.normalize(3); } // 3:1
|
|
115
|
+ if (MIXING_VIRTUAL_TOOLS > 4) { collector[0] = 1; collector[1] = 3; mixer.normalize(4); } // 1:3
|
|
116
|
+ if (MIXING_VIRTUAL_TOOLS > 5) { collector[1] = 2; mixer.normalize(5); } // 1:2
|
|
117
|
+ if (MIXING_VIRTUAL_TOOLS > 6) { collector[0] = 2; collector[1] = 1; mixer.normalize(6); } // 2:1
|
|
118
|
+ if (MIXING_VIRTUAL_TOOLS > 7) { collector[0] = 3; collector[1] = 2; mixer.normalize(7); } // 3:2
|
|
119
|
+ #else
|
|
120
|
+ if (MIXING_VIRTUAL_TOOLS > 3) { collector[0] = 1; collector[1] = 1; collector[2] = 1; mixer.normalize(3); } // 1:1:1
|
|
121
|
+ if (MIXING_VIRTUAL_TOOLS > 4) { collector[1] = 3; collector[2] = 0; mixer.normalize(4); } // 1:3:0
|
|
122
|
+ if (MIXING_VIRTUAL_TOOLS > 5) { collector[0] = 0; collector[2] = 1; mixer.normalize(5); } // 0:3:1
|
|
123
|
+ if (MIXING_VIRTUAL_TOOLS > 6) { collector[1] = 1; mixer.normalize(6); } // 0:1:1
|
|
124
|
+ if (MIXING_VIRTUAL_TOOLS > 7) { collector[0] = 1; collector[2] = 0; mixer.normalize(7); } // 1:1:0
|
|
125
|
+ #endif
|
|
126
|
+ ZERO(collector);
|
|
127
|
+ #endif
|
109
|
128
|
}
|
110
|
129
|
|
111
|
130
|
// called at boot
|
112
|
131
|
void Mixer::init() {
|
113
|
132
|
|
|
133
|
+ ZERO(collector);
|
|
134
|
+
|
114
|
135
|
reset_vtools();
|
115
|
136
|
|
116
|
137
|
#if HAS_MIXER_SYNC_CHANNEL
|
|
@@ -119,8 +140,6 @@ void Mixer::init() {
|
119
|
140
|
color[MIXER_AUTORETRACT_TOOL][i] = COLOR_A_MASK;
|
120
|
141
|
#endif
|
121
|
142
|
|
122
|
|
- ZERO(collector);
|
123
|
|
-
|
124
|
143
|
#if EITHER(HAS_DUAL_MIXING, GRADIENT_MIX)
|
125
|
144
|
update_mix_from_vtool();
|
126
|
145
|
#endif
|