MKS UI prelim. cleanup (#20763)

This commit is contained in:
Scott Lahteine
2021-01-12 21:02:35 -06:00
parent 104aceb44a
commit 5c181562f6
78 changed files with 296 additions and 937 deletions

View File

@@ -25,10 +25,6 @@
#include "draw_ui.h"
#include <lv_conf.h>
//#include "../lvgl/src/lv_objx/lv_imgbtn.h"
//#include "../lvgl/src/lv_objx/lv_img.h"
//#include "../lvgl/src/lv_core/lv_disp.h"
//#include "../lvgl/src/lv_core/lv_refr.h"
#include "../../../../MarlinCore.h" // for marlin_state
#include "../../../../module/temperature.h"
@@ -75,10 +71,7 @@ static void event_handler(lv_obj_t *obj, lv_event_t event) {
switch (obj->mks_obj_id) {
case ID_PAUSE:
if (uiCfg.print_state == WORKING) {
// #if ENABLED(PARK_HEAD_ON_PAUSE)
// queue.inject_P(PSTR("M25 P\nM24"));
#if ENABLED(SDSUPPORT)
// queue.inject_P(PSTR("M25\nG91\nG1 Z10\nG90"));
card.pauseSDPrint();
stop_print_time();
uiCfg.print_state = PAUSING;
@@ -99,7 +92,6 @@ static void event_handler(lv_obj_t *obj, lv_event_t event) {
lv_imgbtn_set_src_both(obj, "F:/bmp_pause.bin");
lv_label_set_text(labelPause, printing_menu.pause);
lv_obj_align(labelPause, buttonPause, LV_ALIGN_CENTER, 30, 0);
// recovery.resume();
print_time.minutes = recovery.info.print_job_elapsed / 60;
print_time.seconds = recovery.info.print_job_elapsed % 60;
print_time.hours = print_time.minutes / 60;
@@ -164,20 +156,6 @@ void lv_draw_printing(void) {
}
#endif
// Create labels on the image buttons
//lv_btn_set_layout(buttonExt1, LV_LAYOUT_OFF);
//#if HAS_MULTI_EXTRUDER
// lv_btn_set_layout(buttonExt2, LV_LAYOUT_OFF);
//#endif
//#if HAS_HEATED_BED
// lv_btn_set_layout(buttonBedstate, LV_LAYOUT_OFF);
//#endif
//lv_btn_set_layout(buttonFanstate, LV_LAYOUT_OFF);
//lv_btn_set_layout(buttonTime, LV_LAYOUT_OFF);
//lv_btn_set_layout(buttonZpos, LV_LAYOUT_OFF);
labelExt1 = lv_label_create(scr, 250, 146, nullptr);
#if HAS_MULTI_EXTRUDER
@@ -262,12 +240,10 @@ void disp_fan_Zpos() {
}
void reset_print_time() {
// print_time.days = 0;
print_time.hours = 0;
print_time.minutes = 0;
print_time.seconds = 0;
print_time.ms_10 = 0;
// print_time.start = 1;
}
void start_print_time() { print_time.start = 1; }
@@ -290,7 +266,6 @@ void setProBarRate() {
#endif
rate = (rate_tmp_r - (PREVIEW_SIZE + To_pre_view)) * 100 / (gCfgItems.curFilesize - (PREVIEW_SIZE + To_pre_view));
}
// gCurFileState.totalSend = rate;
if (rate <= 0) return;