🐛 Fix MKS LVGL UI retraction (#23267)

This commit is contained in:
Sola 2021-12-09 03:37:45 +08:00 committed by Scott Lahteine
parent 39c2c038be
commit 9871800874

View file

@ -55,7 +55,7 @@ static void event_handler(lv_obj_t *obj, lv_event_t event) {
if (event != LV_EVENT_RELEASED) return;
switch (obj->mks_obj_id) {
case ID_E_ADD:
if (thermalManager.degHotend(uiCfg.extruderIndex) >= EXTRUDE_MINTEMP) {
if (thermalManager.hotEnoughToExtrude(uiCfg.extruderIndex)) {
sprintf_P((char *)public_buf_l, PSTR("G91\nG1 E%d F%d\nG90"), uiCfg.extruStep, 60 * uiCfg.extruSpeed);
queue.inject(public_buf_l);
extrudeAmount += uiCfg.extruStep;
@ -63,9 +63,9 @@ static void event_handler(lv_obj_t *obj, lv_event_t event) {
}
break;
case ID_E_DEC:
if (thermalManager.degHotend(uiCfg.extruderIndex) >= EXTRUDE_MINTEMP) {
if (thermalManager.hotEnoughToExtrude(uiCfg.extruderIndex)) {
sprintf_P((char *)public_buf_l, PSTR("G91\nG1 E%d F%d\nG90"), 0 - uiCfg.extruStep, 60 * uiCfg.extruSpeed);
queue.enqueue_one_now(public_buf_l);
queue.inject(public_buf_l);
extrudeAmount -= uiCfg.extruStep;
disp_extru_amount();
}