Apply loop shorthand macros (#17159)

This commit is contained in:
Scott Lahteine
2020-03-13 23:18:16 -05:00
committed by GitHub
parent a96be32fae
commit 118bd2f8b2
93 changed files with 465 additions and 505 deletions

View File

@@ -98,13 +98,13 @@ void Mixer::normalize(const uint8_t tool_index) {
void Mixer::reset_vtools() {
// Virtual Tools 0, 1, 2, 3 = Filament 1, 2, 3, 4, etc.
// Every virtual tool gets a pure filament
for (uint8_t t = 0; t < MIXING_VIRTUAL_TOOLS && t < MIXING_STEPPERS; t++)
LOOP_L_N(t, MIXING_VIRTUAL_TOOLS && t < MIXING_STEPPERS)
MIXER_STEPPER_LOOP(i)
color[t][i] = (t == i) ? COLOR_A_MASK : 0;
// Remaining virtual tools are 100% filament 1
#if MIXING_VIRTUAL_TOOLS > MIXING_STEPPERS
for (uint8_t t = MIXING_STEPPERS; t < MIXING_VIRTUAL_TOOLS; t++)
LOOP_S_L_N(t, MIXING_STEPPERS, MIXING_VIRTUAL_TOOLS)
MIXER_STEPPER_LOOP(i)
color[t][i] = (i == 0) ? COLOR_A_MASK : 0;
#endif