M166 Gradients, LCD Menu for 2-channel Mixer (Geeetech A10M/A20M) (#13022)

This commit is contained in:
Scott Lahteine
2019-02-10 04:54:23 -06:00
committed by GitHub
parent 7ee35c2611
commit 6de3d34378
114 changed files with 9901 additions and 61 deletions

View File

@ -832,11 +832,35 @@ void MarlinUI::draw_status_screen() {
#else // HOTENDS <= 2 && (HOTENDS <= 1 || !HAS_HEATED_BED)
_draw_axis_value(X_AXIS, ftostr4sign(LOGICAL_X_POSITION(current_position[X_AXIS])), blink);
#if DUAL_MIXING_EXTRUDER
lcd_put_wchar(' ');
// Two-component mix / gradient instead of XY
_draw_axis_value(Y_AXIS, ftostr4sign(LOGICAL_Y_POSITION(current_position[Y_AXIS])), blink);
char mixer_messages[12];
const char *mix_label;
#if ENABLED(GRADIENT_MIX)
if (mixer.gradient.enabled) {
mixer.update_mix_from_gradient();
mix_label = "Gr";
}
else
#endif
{
mixer.update_mix_from_vtool();
mix_label = "Mx";
}
sprintf_P(mixer_messages, PSTR("%s %d;%d%% "), mix_label, int(mixer.mix[0]), int(mixer.mix[1]));
lcd_put_u8str(mixer_messages);
#else
_draw_axis_value(X_AXIS, ftostr4sign(LOGICAL_X_POSITION(current_position[X_AXIS])), blink);
lcd_put_wchar(' ');
_draw_axis_value(Y_AXIS, ftostr4sign(LOGICAL_Y_POSITION(current_position[Y_AXIS])), blink);
#endif
#endif // HOTENDS <= 2 && (HOTENDS <= 1 || !HAS_HEATED_BED)