Selaa lähdekoodia

🚸 MKS UI LVGL bed preheat presets (#22842)

Malderin 3 vuotta sitten
vanhempi
commit
8f9e56afb9
No account linked to committer's email address
1 muutettua tiedostoa jossa 9 lisäystä ja 4 poistoa
  1. 9
    4
      Marlin/src/lcd/extui/mks_ui/draw_preHeat.cpp

+ 9
- 4
Marlin/src/lcd/extui/mks_ui/draw_preHeat.cpp Näytä tiedosto

@@ -132,8 +132,6 @@ static void event_handler(lv_obj_t *obj, lv_event_t event) {
132 132
         uiCfg.curTempType = 0;
133 133
         lv_obj_del(buttonAdd);
134 134
         lv_obj_del(buttonDec);
135
-        disp_add_dec();
136
-        disp_ext_heart();
137 135
       }
138 136
 
139 137
       disp_temp_type();
@@ -156,10 +154,16 @@ static void event_handler(lv_obj_t *obj, lv_event_t event) {
156 154
       draw_return_ui();
157 155
       break;
158 156
     case ID_P_ABS:
159
-      thermalManager.setTargetHotend(PREHEAT_2_TEMP_HOTEND, 0);
157
+      if (uiCfg.curTempType == 0)
158
+        thermalManager.setTargetHotend(PREHEAT_2_TEMP_HOTEND, 0);
159
+      else if (uiCfg.curTempType == 1)
160
+        thermalManager.setTargetBed(PREHEAT_2_TEMP_BED);
160 161
       break;
161 162
     case ID_P_PLA:
162
-      thermalManager.setTargetHotend(PREHEAT_1_TEMP_HOTEND, 0);
163
+      if (uiCfg.curTempType == 0)
164
+        thermalManager.setTargetHotend(PREHEAT_1_TEMP_HOTEND, 0);
165
+      else if (uiCfg.curTempType == 1)
166
+        thermalManager.setTargetBed(PREHEAT_1_TEMP_BED);
163 167
       break;
164 168
   }
165 169
 }
@@ -180,6 +184,7 @@ void lv_draw_preHeat() {
180 184
   buttonStep = lv_imgbtn_create(scr, nullptr, BTN_X_PIXEL + INTERVAL_V * 2, BTN_Y_PIXEL + INTERVAL_H + titleHeight, event_handler, ID_P_STEP);
181 185
 
182 186
   if (uiCfg.curTempType == 0) disp_ext_heart();
187
+  if (uiCfg.curTempType == 1) disp_ext_heart();
183 188
 
184 189
   #if HAS_ROTARY_ENCODER
185 190
     if (gCfgItems.encoder_enable) {

Loading…
Peruuta
Tallenna