Explorar el Código

Draw flags followup

Scott Lahteine hace 2 años
padre
commit
931e243116
Se han modificado 1 ficheros con 8 adiciones y 5 borrados
  1. 8
    5
      Marlin/src/lcd/e3v2/marlinui/ui_status_480x272.cpp

+ 8
- 5
Marlin/src/lcd/e3v2/marlinui/ui_status_480x272.cpp Ver fichero

@@ -210,11 +210,13 @@ FORCE_INLINE void _draw_heater_status(const heater_id_t heater, const uint16_t x
210 210
   #endif
211 211
 
212 212
   #if HAS_HOTEND && HAS_HEATED_BED
213
+    float tc, tt;
214
+    bool c_draw, t_draw, i_draw, ta;
213 215
     const bool isBed = heater < 0;
214
-    bool c_draw, t_draw, i_draw;
215 216
     if (isBed) {
216
-      const float tc = thermalManager.degBed(), tt = thermalManager.degTargetBed();
217
-      const bool ta = thermalManager.isHeatingBed();
217
+      tc = thermalManager.degBed();
218
+      tt = thermalManager.degTargetBed();
219
+      ta = thermalManager.isHeatingBed();
218 220
       c_draw = tc != old_bed_temp;
219 221
       t_draw = tt != old_bed_target;
220 222
       i_draw = ta != old_bed_on;
@@ -223,8 +225,9 @@ FORCE_INLINE void _draw_heater_status(const heater_id_t heater, const uint16_t x
223 225
       old_bed_on = ta;
224 226
     }
225 227
     else {
226
-      const float tc = thermalManager.degHotend(heater), tt = thermalManager.degTargetHotend(heater);
227
-      const bool ta = thermalManager.isHeatingHotend(heater);
228
+      tc = thermalManager.degHotend(heater);
229
+      tt = thermalManager.degTargetHotend(heater);
230
+      ta = thermalManager.isHeatingHotend(heater);
228 231
       c_draw = tc != old_temp[heater];
229 232
       t_draw = tt != old_target[heater];
230 233
       i_draw = ta != old_on[heater];

Loading…
Cancelar
Guardar