@@ -110,10 +110,11 @@ void _draw_axis_value(const AxisEnum axis, const char *value, const bool blink,
110
110
111
111
void _draw_e_value (const_float_t value, const uint16_t x, const uint16_t y) {
112
112
const uint8_t scale = value >= 100000 .0f ? 10 : 1 ; // show cm after 99,999mm
113
+ const bool e_redraw = !ui.did_first_redraw || old_is_printing != print_job_timer.isRunning ();
113
114
114
115
#if ENABLED(DWIN_MARLINUI_PORTRAIT)
115
116
116
- if (!ui. did_first_redraw ) {
117
+ if (e_redraw ) {
117
118
// Extra spaces to erase previous value
118
119
dwin_string.set (F (" E " ));
119
120
DWIN_Draw_String (true , font16x32, Color_IconBlue, Color_Bg_Black, x + (4 * 14 / 2 ) - 7 , y + 2 , S (dwin_string.string ()));
@@ -127,7 +128,7 @@ void _draw_axis_value(const AxisEnum axis, const char *value, const bool blink,
127
128
128
129
#else // !DWIN_MARLINUI_PORTRAIT
129
130
130
- if (!ui. did_first_redraw || ui. old_is_printing != print_job_timer. isRunning () ) {
131
+ if (e_redraw ) {
131
132
dwin_string.set (F (" E " ));
132
133
DWIN_Draw_String (true , font16x32, Color_IconBlue, Color_Bg_Black, x, y, S (dwin_string.string ()));
133
134
}
@@ -147,11 +148,10 @@ void _draw_axis_value(const AxisEnum axis, const char *value, const bool blink,
147
148
//
148
149
FORCE_INLINE void _draw_fan_status (const uint16_t x, const uint16_t y) {
149
150
const uint16_t fanx = (4 * STATUS_CHR_WIDTH - STATUS_FAN_WIDTH) / 2 ;
150
- const uint8_t fan_pct = thermalManager.scaledFanSpeedPercent (0 );
151
- const bool fan_on = !!fan_pct;
151
+ const bool fan_on = !!thermalManager.scaledFanSpeed (0 );
152
152
if (fan_on) {
153
153
DWIN_ICON_Animation (0 , fan_on, ICON, ICON_Fan0, ICON_Fan3, x + fanx, y, 25 );
154
- dwin_string.set (i8tostr3rj (fan_pct ));
154
+ dwin_string.set (i8tostr3rj (thermalManager. scaledFanSpeedPercent ( 0 ) ));
155
155
dwin_string.add (' %' );
156
156
DWIN_Draw_String (true , font14x28, Color_White, Color_Bg_Black, x, y + STATUS_FAN_HEIGHT, S (dwin_string.string ()));
157
157
}
0 commit comments