Allow SERIAL_ECHOPAIR to take up to 12 pairs (#13311)

This commit is contained in:
Scott Lahteine
2019-03-05 06:46:19 -06:00
committed by GitHub
parent 4771e372a1
commit cfdb38eda4
30 changed files with 474 additions and 611 deletions

View File

@@ -139,19 +139,11 @@ void Mixer::refresh_collector(const float proportion/*=1.0*/, const uint8_t t/*=
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");
//SERIAL_ECHOPAIR("Mixer::refresh_collector(", proportion, ", ", int(t), ") cmax=", cmax, " csum=", csum, " 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_ECHOPAIR(" [", int(t), "][", int(i), "] = ", int(color[t][i]), " (", collector[i], ") ");
}
//SERIAL_EOL();
}