parent
604a01cd1a
commit
b4c025a451
@ -124,24 +124,18 @@ static void event_handler(lv_obj_t *obj, lv_event_t event) {
|
||||
else if (uiCfg.extruderIndex == 0) {
|
||||
uiCfg.curTempType = TERN(HAS_HEATED_BED, 1, 0);
|
||||
}
|
||||
lv_obj_del(btn_pla);
|
||||
lv_obj_del(btn_abs);
|
||||
}
|
||||
else if (uiCfg.curTempType == 1) {
|
||||
uiCfg.extruderIndex = 0;
|
||||
uiCfg.curTempType = 0;
|
||||
disp_add_dec();
|
||||
disp_ext_heart();
|
||||
lv_obj_del(buttonAdd);
|
||||
lv_obj_del(buttonDec);
|
||||
}
|
||||
|
||||
disp_temp_type();
|
||||
break;
|
||||
case ID_P_STEP:
|
||||
switch (uiCfg.stepHeat) {
|
||||
case 1: uiCfg.stepHeat = 5; break;
|
||||
case 5: uiCfg.stepHeat = 10; break;
|
||||
case 10: uiCfg.stepHeat = 1; break;
|
||||
default: break;
|
||||
}
|
||||
disp_step_heat();
|
||||
break;
|
||||
case ID_P_OFF:
|
||||
if (uiCfg.curTempType == 0) {
|
||||
thermalManager.setTargetHotend(0, uiCfg.extruderIndex);
|
||||
@ -160,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;
|
||||
}
|
||||
}
|
||||
@ -184,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) {
|
||||
|
@ -98,6 +98,7 @@ void disp_det_ok() {
|
||||
lv_obj_set_style(det_info, &det_style);
|
||||
lv_label_set_text(det_info, "det:ok");
|
||||
}
|
||||
|
||||
void disp_det_error() {
|
||||
det_style.text.color.full = 0xF800;
|
||||
lv_obj_set_style(det_info, &det_style);
|
||||
|
Loading…
x
Reference in New Issue
Block a user