Skip to content

Commit

Permalink
⚡️ Mixer label in PROGMEM
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead authored and Andy-Big committed Jul 19, 2023
1 parent 1621fae commit d1a7b56
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
10 changes: 5 additions & 5 deletions Marlin/src/lcd/HD44780/marlinui_HD44780.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -973,20 +973,20 @@ void MarlinUI::draw_status_screen() {

// Two-component mix / gradient instead of XY

char mixer_messages[12];
const char *mix_label;
char mixer_messages[15];
PGM_P mix_label;
#if ENABLED(GRADIENT_MIX)
if (mixer.gradient.enabled) {
mixer.update_mix_from_gradient();
mix_label = "Gr";
mix_label = PSTR("Gr");
}
else
#endif
{
mixer.update_mix_from_vtool();
mix_label = "Mx";
mix_label = PSTR("Mx");
}
sprintf_P(mixer_messages, PSTR("%s %d;%d%% "), mix_label, int(mixer.mix[0]), int(mixer.mix[1]));
sprintf_P(mixer_messages, PSTR(S_FMT " %d;%d%% "), mix_label, int(mixer.mix[0]), int(mixer.mix[1]));
lcd_put_u8str(mixer_messages);

#else // !HAS_DUAL_MIXING
Expand Down
12 changes: 6 additions & 6 deletions Marlin/src/lcd/TFTGLCD/marlinui_TFTGLCD.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -866,23 +866,23 @@ void MarlinUI::draw_status_screen() {
//

#if HOTENDS <= 1 || (HOTENDS <= 2 && !HAS_HEATED_BED)
#if DUAL_MIXING_EXTRUDER
#if HAS_DUAL_MIXING
lcd_moveto(0, 4);
// Two-component mix / gradient instead of XY
char mixer_messages[12];
const char *mix_label;
char mixer_messages[15];
PGM_P mix_label;
#if ENABLED(GRADIENT_MIX)
if (mixer.gradient.enabled) {
mixer.update_mix_from_gradient();
mix_label = "Gr";
mix_label = PSTR("Gr");
}
else
#endif
{
mixer.update_mix_from_vtool();
mix_label = "Mx";
mix_label = PSTR("Mx");
}
sprintf_P(mixer_messages, PSTR("%s %d;%d%% "), mix_label, int(mixer.mix[0]), int(mixer.mix[1]));
sprintf_P(mixer_messages, PSTR(S_FMT " %d;%d%% "), mix_label, int(mixer.mix[0]), int(mixer.mix[1]));
lcd_put_u8str(mixer_messages);
#endif
#endif
Expand Down

0 comments on commit d1a7b56

Please sign in to comment.