Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MKS UI LVGL bed preheat presets #22842

Merged
merged 4 commits into from
Sep 27, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions Marlin/src/lcd/extui/mks_ui/draw_preHeat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,6 @@ static void event_handler(lv_obj_t *obj, lv_event_t event) {
uiCfg.curTempType = 0;
lv_obj_del(buttonAdd);
lv_obj_del(buttonDec);
disp_add_dec();
disp_ext_heart();
}

disp_temp_type();
Expand All @@ -156,10 +154,16 @@ static void event_handler(lv_obj_t *obj, lv_event_t event) {
draw_return_ui();
break;
case ID_P_ABS:
thermalManager.setTargetHotend(PREHEAT_2_TEMP_HOTEND, 0);
if (uiCfg.curTempType == 0)
thermalManager.setTargetHotend(PREHEAT_2_TEMP_HOTEND, 0);
else if (uiCfg.curTempType == 1)
thermalManager.setTargetBed(PREHEAT_2_TEMP_BED);
break;
case ID_P_PLA:
thermalManager.setTargetHotend(PREHEAT_1_TEMP_HOTEND, 0);
if (uiCfg.curTempType == 0)
thermalManager.setTargetHotend(PREHEAT_1_TEMP_HOTEND, 0);
else if (uiCfg.curTempType == 1)
thermalManager.setTargetBed(PREHEAT_1_TEMP_BED);
break;
}
}
Expand All @@ -180,6 +184,7 @@ void lv_draw_preHeat() {
buttonStep = lv_imgbtn_create(scr, nullptr, BTN_X_PIXEL + INTERVAL_V * 2, BTN_Y_PIXEL + INTERVAL_H + titleHeight, event_handler, ID_P_STEP);

if (uiCfg.curTempType == 0) disp_ext_heart();
if (uiCfg.curTempType == 1) disp_ext_heart();

#if HAS_ROTARY_ENCODER
if (gCfgItems.encoder_enable) {
Expand Down