Fix MIN/MAX function collision with macros

This commit is contained in:
Scott Lahteine
2019-07-05 18:01:21 -05:00
parent b6546ea33a
commit 750a16ad38
63 changed files with 167 additions and 167 deletions

View File

@@ -103,7 +103,7 @@ class Mixer {
static void refresh_collector(const float proportion=1.0, const uint8_t t=selected_vtool, float (&c)[MIXING_STEPPERS]=collector);
// Used up to Planner level
FORCE_INLINE static void set_collector(const uint8_t c, const float f) { collector[c] = MAX(f, 0.0f); }
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); }
@@ -142,7 +142,7 @@ class Mixer {
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])));
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;