Browse Source

🚸 MKS UI LVGL bed preheat presets (#22842)

Malderin 3 years ago
parent
commit
8f9e56afb9
No account linked to committer's email address
1 changed files with 9 additions and 4 deletions
  1. 9
    4
      Marlin/src/lcd/extui/mks_ui/draw_preHeat.cpp

+ 9
- 4
Marlin/src/lcd/extui/mks_ui/draw_preHeat.cpp View File

132
         uiCfg.curTempType = 0;
132
         uiCfg.curTempType = 0;
133
         lv_obj_del(buttonAdd);
133
         lv_obj_del(buttonAdd);
134
         lv_obj_del(buttonDec);
134
         lv_obj_del(buttonDec);
135
-        disp_add_dec();
136
-        disp_ext_heart();
137
       }
135
       }
138
 
136
 
139
       disp_temp_type();
137
       disp_temp_type();
156
       draw_return_ui();
154
       draw_return_ui();
157
       break;
155
       break;
158
     case ID_P_ABS:
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
       break;
161
       break;
161
     case ID_P_PLA:
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
       break;
167
       break;
164
   }
168
   }
165
 }
169
 }
180
   buttonStep = lv_imgbtn_create(scr, nullptr, BTN_X_PIXEL + INTERVAL_V * 2, BTN_Y_PIXEL + INTERVAL_H + titleHeight, event_handler, ID_P_STEP);
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
   if (uiCfg.curTempType == 0) disp_ext_heart();
186
   if (uiCfg.curTempType == 0) disp_ext_heart();
187
+  if (uiCfg.curTempType == 1) disp_ext_heart();
183
 
188
 
184
   #if HAS_ROTARY_ENCODER
189
   #if HAS_ROTARY_ENCODER
185
     if (gCfgItems.encoder_enable) {
190
     if (gCfgItems.encoder_enable) {

Loading…
Cancel
Save