Skip to content

Commit 4b8e4ef

Browse files
committedJun 6, 2023
⚡️ Mixer label in PROGMEM
1 parent 17cc5fa commit 4b8e4ef

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed
 

‎Marlin/src/lcd/HD44780/marlinui_HD44780.cpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -973,20 +973,20 @@ void MarlinUI::draw_status_screen() {
973973

974974
// Two-component mix / gradient instead of XY
975975

976-
char mixer_messages[12];
977-
const char *mix_label;
976+
char mixer_messages[15];
977+
PGM_P mix_label;
978978
#if ENABLED(GRADIENT_MIX)
979979
if (mixer.gradient.enabled) {
980980
mixer.update_mix_from_gradient();
981-
mix_label = "Gr";
981+
mix_label = PSTR("Gr");
982982
}
983983
else
984984
#endif
985985
{
986986
mixer.update_mix_from_vtool();
987-
mix_label = "Mx";
987+
mix_label = PSTR("Mx");
988988
}
989-
sprintf_P(mixer_messages, PSTR("%s %d;%d%% "), mix_label, int(mixer.mix[0]), int(mixer.mix[1]));
989+
sprintf_P(mixer_messages, PSTR(S_FMT " %d;%d%% "), mix_label, int(mixer.mix[0]), int(mixer.mix[1]));
990990
lcd_put_u8str(mixer_messages);
991991

992992
#else // !HAS_DUAL_MIXING

‎Marlin/src/lcd/TFTGLCD/marlinui_TFTGLCD.cpp

+6-6
Original file line numberDiff line numberDiff line change
@@ -866,23 +866,23 @@ void MarlinUI::draw_status_screen() {
866866
//
867867

868868
#if HOTENDS <= 1 || (HOTENDS <= 2 && !HAS_HEATED_BED)
869-
#if DUAL_MIXING_EXTRUDER
869+
#if HAS_DUAL_MIXING
870870
lcd_moveto(0, 4);
871871
// Two-component mix / gradient instead of XY
872-
char mixer_messages[12];
873-
const char *mix_label;
872+
char mixer_messages[15];
873+
PGM_P mix_label;
874874
#if ENABLED(GRADIENT_MIX)
875875
if (mixer.gradient.enabled) {
876876
mixer.update_mix_from_gradient();
877-
mix_label = "Gr";
877+
mix_label = PSTR("Gr");
878878
}
879879
else
880880
#endif
881881
{
882882
mixer.update_mix_from_vtool();
883-
mix_label = "Mx";
883+
mix_label = PSTR("Mx");
884884
}
885-
sprintf_P(mixer_messages, PSTR("%s %d;%d%% "), mix_label, int(mixer.mix[0]), int(mixer.mix[1]));
885+
sprintf_P(mixer_messages, PSTR(S_FMT " %d;%d%% "), mix_label, int(mixer.mix[0]), int(mixer.mix[1]));
886886
lcd_put_u8str(mixer_messages);
887887
#endif
888888
#endif

0 commit comments

Comments
 (0)
Please sign in to comment.