🩹 Fix displayed mix percentages
This commit is contained in:
@@ -24,8 +24,6 @@
|
|||||||
|
|
||||||
#if ENABLED(MIXING_EXTRUDER)
|
#if ENABLED(MIXING_EXTRUDER)
|
||||||
|
|
||||||
//#define MIXER_NORMALIZER_DEBUG
|
|
||||||
|
|
||||||
#include "mixing.h"
|
#include "mixing.h"
|
||||||
|
|
||||||
Mixer mixer;
|
Mixer mixer;
|
||||||
|
@@ -148,8 +148,7 @@ class Mixer {
|
|||||||
static void update_mix_from_vtool(const uint8_t j=selected_vtool) {
|
static void update_mix_from_vtool(const uint8_t j=selected_vtool) {
|
||||||
float ctot = 0;
|
float ctot = 0;
|
||||||
MIXER_STEPPER_LOOP(i) ctot += color[j][i];
|
MIXER_STEPPER_LOOP(i) ctot += color[j][i];
|
||||||
//MIXER_STEPPER_LOOP(i) mix[i] = 100.0f * color[j][i] / ctot;
|
MIXER_STEPPER_LOOP(i) mix[i] = mixer_perc_t(100.0f * color[j][i] / ctot + 0.5f);
|
||||||
MIXER_STEPPER_LOOP(i) mix[i] = mixer_perc_t(100.0f * color[j][i] / ctot);
|
|
||||||
|
|
||||||
#ifdef MIXER_NORMALIZER_DEBUG
|
#ifdef MIXER_NORMALIZER_DEBUG
|
||||||
SERIAL_ECHOPGM("V-tool ", j, " [ ");
|
SERIAL_ECHOPGM("V-tool ", j, " [ ");
|
||||||
|
Reference in New Issue
Block a user