General cleanup, mostly MKS UI (#19825)
This commit is contained in:
parent
1f7c085527
commit
072f996af7
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -77,7 +77,6 @@ tags
|
||||||
*.out
|
*.out
|
||||||
*.app
|
*.app
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# C
|
# C
|
||||||
#
|
#
|
||||||
|
|
|
@ -341,7 +341,7 @@
|
||||||
#define DOGLCD
|
#define DOGLCD
|
||||||
#define IS_ULTIPANEL 1
|
#define IS_ULTIPANEL 1
|
||||||
#define DELAYED_BACKLIGHT_INIT
|
#define DELAYED_BACKLIGHT_INIT
|
||||||
#elif ENABLED(TFT_LVGL_UI)
|
#elif HAS_TFT_LVGL_UI
|
||||||
#define DELAYED_BACKLIGHT_INIT
|
#define DELAYED_BACKLIGHT_INIT
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -957,16 +957,16 @@
|
||||||
// FSMC/SPI TFT Panels using standard HAL/tft/tft_(fsmc|spi).h
|
// FSMC/SPI TFT Panels using standard HAL/tft/tft_(fsmc|spi).h
|
||||||
#if ENABLED(TFT_INTERFACE_FSMC)
|
#if ENABLED(TFT_INTERFACE_FSMC)
|
||||||
#define HAS_FSMC_TFT 1
|
#define HAS_FSMC_TFT 1
|
||||||
#if ENABLED(TFT_CLASSIC_UI)
|
#if TFT_SCALED_DOGLCD
|
||||||
#define HAS_FSMC_GRAPHICAL_TFT 1
|
#define HAS_FSMC_GRAPHICAL_TFT 1
|
||||||
#elif ENABLED(TFT_LVGL_UI)
|
#elif HAS_TFT_LVGL_UI
|
||||||
#define HAS_TFT_LVGL_UI_FSMC 1
|
#define HAS_TFT_LVGL_UI_FSMC 1
|
||||||
#endif
|
#endif
|
||||||
#elif ENABLED(TFT_INTERFACE_SPI)
|
#elif ENABLED(TFT_INTERFACE_SPI)
|
||||||
#define HAS_SPI_TFT 1
|
#define HAS_SPI_TFT 1
|
||||||
#if ENABLED(TFT_CLASSIC_UI)
|
#if TFT_SCALED_DOGLCD
|
||||||
#define HAS_SPI_GRAPHICAL_TFT 1
|
#define HAS_SPI_GRAPHICAL_TFT 1
|
||||||
#elif ENABLED(TFT_LVGL_UI)
|
#elif HAS_TFT_LVGL_UI
|
||||||
#define HAS_TFT_LVGL_UI_SPI 1
|
#define HAS_TFT_LVGL_UI_SPI 1
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -23,15 +23,14 @@
|
||||||
|
|
||||||
#if HAS_TFT_LVGL_UI
|
#if HAS_TFT_LVGL_UI
|
||||||
|
|
||||||
#include "lv_conf.h"
|
|
||||||
#include "draw_ui.h"
|
#include "draw_ui.h"
|
||||||
|
#include <lv_conf.h>
|
||||||
//#include "../lvgl/src/lv_objx/lv_imgbtn.h"
|
//#include "../lvgl/src/lv_objx/lv_imgbtn.h"
|
||||||
//#include "../lvgl/src/lv_objx/lv_img.h"
|
//#include "../lvgl/src/lv_objx/lv_img.h"
|
||||||
//#include "../lvgl/src/lv_core/lv_disp.h"
|
//#include "../lvgl/src/lv_core/lv_disp.h"
|
||||||
//#include "../lvgl/src/lv_core/lv_refr.h"
|
//#include "../lvgl/src/lv_core/lv_refr.h"
|
||||||
|
|
||||||
#include "../../../../MarlinCore.h"
|
#include "../../../../inc/MarlinConfig.h"
|
||||||
#include "../../../../module/temperature.h"
|
|
||||||
|
|
||||||
extern lv_group_t * g;
|
extern lv_group_t * g;
|
||||||
static lv_obj_t * scr;
|
static lv_obj_t * scr;
|
||||||
|
@ -94,7 +93,7 @@ void lv_draw_about(void) {
|
||||||
// Create a label on the image button
|
// Create a label on the image button
|
||||||
label_Back = lv_label_create(buttonBack, NULL);
|
label_Back = lv_label_create(buttonBack, NULL);
|
||||||
|
|
||||||
if (gCfgItems.multiple_language != 0) {
|
if (gCfgItems.multiple_language) {
|
||||||
lv_label_set_text(label_Back, common_menu.text_back);
|
lv_label_set_text(label_Back, common_menu.text_back);
|
||||||
lv_obj_align(label_Back, buttonBack, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET);
|
lv_obj_align(label_Back, buttonBack, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET);
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,11 +23,11 @@
|
||||||
|
|
||||||
#if HAS_TFT_LVGL_UI
|
#if HAS_TFT_LVGL_UI
|
||||||
|
|
||||||
#include "lv_conf.h"
|
|
||||||
#include "draw_ui.h"
|
#include "draw_ui.h"
|
||||||
|
#include <lv_conf.h>
|
||||||
|
|
||||||
#include "../../../../MarlinCore.h"
|
|
||||||
#include "../../../../module/planner.h"
|
#include "../../../../module/planner.h"
|
||||||
|
#include "../../../../inc/MarlinConfig.h"
|
||||||
|
|
||||||
extern lv_group_t * g;
|
extern lv_group_t * g;
|
||||||
static lv_obj_t * scr;
|
static lv_obj_t * scr;
|
||||||
|
@ -383,7 +383,7 @@ void lv_draw_acceleration_settings(void) {
|
||||||
//lv_obj_set_pos(buttonBack, PARA_UI_BACL_POS_X, PARA_UI_BACL_POS_Y);
|
//lv_obj_set_pos(buttonBack, PARA_UI_BACL_POS_X, PARA_UI_BACL_POS_Y);
|
||||||
//lv_btn_set_layout(buttonBack, LV_LAYOUT_OFF);
|
//lv_btn_set_layout(buttonBack, LV_LAYOUT_OFF);
|
||||||
|
|
||||||
if (gCfgItems.multiple_language != 0) {
|
if (gCfgItems.multiple_language) {
|
||||||
if (uiCfg.para_ui_page != 1) {
|
if (uiCfg.para_ui_page != 1) {
|
||||||
|
|
||||||
lv_label_set_text(labelTurnPage, machine_menu.next);
|
lv_label_set_text(labelTurnPage, machine_menu.next);
|
||||||
|
|
|
@ -23,10 +23,10 @@
|
||||||
|
|
||||||
#if HAS_TFT_LVGL_UI
|
#if HAS_TFT_LVGL_UI
|
||||||
|
|
||||||
#include "lv_conf.h"
|
|
||||||
#include "draw_ui.h"
|
#include "draw_ui.h"
|
||||||
|
#include <lv_conf.h>
|
||||||
|
|
||||||
#include "../../../../MarlinCore.h"
|
#include "../../../../inc/MarlinConfig.h"
|
||||||
|
|
||||||
extern lv_group_t * g;
|
extern lv_group_t * g;
|
||||||
static lv_obj_t * scr;
|
static lv_obj_t * scr;
|
||||||
|
@ -302,7 +302,7 @@ void lv_draw_advance_settings(void) {
|
||||||
lv_btn_set_layout(buttonBack, LV_LAYOUT_OFF);
|
lv_btn_set_layout(buttonBack, LV_LAYOUT_OFF);
|
||||||
label_Back = lv_label_create(buttonBack, NULL);
|
label_Back = lv_label_create(buttonBack, NULL);
|
||||||
|
|
||||||
if (gCfgItems.multiple_language != 0) {
|
if (gCfgItems.multiple_language) {
|
||||||
lv_label_set_text(label_Back, common_menu.text_back);
|
lv_label_set_text(label_Back, common_menu.text_back);
|
||||||
lv_obj_align(label_Back, buttonBack, LV_ALIGN_CENTER, 0, 0);
|
lv_obj_align(label_Back, buttonBack, LV_ALIGN_CENTER, 0, 0);
|
||||||
|
|
||||||
|
|
|
@ -23,12 +23,11 @@
|
||||||
|
|
||||||
#if BOTH(HAS_TFT_LVGL_UI, HAS_BED_PROBE)
|
#if BOTH(HAS_TFT_LVGL_UI, HAS_BED_PROBE)
|
||||||
|
|
||||||
#include "lv_conf.h"
|
|
||||||
#include "draw_ui.h"
|
#include "draw_ui.h"
|
||||||
|
#include <lv_conf.h>
|
||||||
|
|
||||||
#include "../../../../MarlinCore.h"
|
|
||||||
#include "../../../../module/planner.h"
|
|
||||||
#include "../../../../module/probe.h"
|
#include "../../../../module/probe.h"
|
||||||
|
#include "../../../../inc/MarlinConfig.h"
|
||||||
|
|
||||||
extern lv_group_t * g;
|
extern lv_group_t * g;
|
||||||
static lv_obj_t * scr;
|
static lv_obj_t * scr;
|
||||||
|
@ -172,7 +171,7 @@ void lv_draw_auto_level_offset_settings(void) {
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (gCfgItems.multiple_language != 0) {
|
if (gCfgItems.multiple_language) {
|
||||||
ZERO(public_buf_l);
|
ZERO(public_buf_l);
|
||||||
sprintf_P(public_buf_l, PSTR("%.1f"), TERN(HAS_PROBE_XY_OFFSET, probe.offset.x, 0));
|
sprintf_P(public_buf_l, PSTR("%.1f"), TERN(HAS_PROBE_XY_OFFSET, probe.offset.x, 0));
|
||||||
lv_label_set_text(labelXValue, public_buf_l);
|
lv_label_set_text(labelXValue, public_buf_l);
|
||||||
|
|
|
@ -23,12 +23,12 @@
|
||||||
|
|
||||||
#if HAS_TFT_LVGL_UI
|
#if HAS_TFT_LVGL_UI
|
||||||
|
|
||||||
#include "lv_conf.h"
|
|
||||||
#include "draw_ui.h"
|
#include "draw_ui.h"
|
||||||
|
#include <lv_conf.h>
|
||||||
|
|
||||||
#include "../../../../MarlinCore.h"
|
|
||||||
#include "../../../../gcode/queue.h"
|
#include "../../../../gcode/queue.h"
|
||||||
#include "../../../../gcode/gcode.h"
|
#include "../../../../gcode/gcode.h"
|
||||||
|
#include "../../../../inc/MarlinConfig.h"
|
||||||
|
|
||||||
#if HAS_BED_PROBE
|
#if HAS_BED_PROBE
|
||||||
#include "../../../../module/probe.h"
|
#include "../../../../module/probe.h"
|
||||||
|
@ -52,7 +52,7 @@ static float babystep_dist=0.01;
|
||||||
static uint8_t has_adjust_z = 0;
|
static uint8_t has_adjust_z = 0;
|
||||||
|
|
||||||
static void event_handler(lv_obj_t * obj, lv_event_t event) {
|
static void event_handler(lv_obj_t * obj, lv_event_t event) {
|
||||||
char baby_buf[30]={0};
|
char baby_buf[30] = { 0 };
|
||||||
switch (obj->mks_obj_id) {
|
switch (obj->mks_obj_id) {
|
||||||
case ID_BABY_STEP_X_P:
|
case ID_BABY_STEP_X_P:
|
||||||
if (event == LV_EVENT_CLICKED) {
|
if (event == LV_EVENT_CLICKED) {
|
||||||
|
@ -259,7 +259,7 @@ void lv_draw_baby_stepping(void) {
|
||||||
labelV = lv_label_create(buttonV, NULL);
|
labelV = lv_label_create(buttonV, NULL);
|
||||||
lv_obj_t *label_Back = lv_label_create(buttonBack, NULL);
|
lv_obj_t *label_Back = lv_label_create(buttonBack, NULL);
|
||||||
|
|
||||||
if (gCfgItems.multiple_language != 0) {
|
if (gCfgItems.multiple_language) {
|
||||||
lv_label_set_text(labelXI, move_menu.x_add);
|
lv_label_set_text(labelXI, move_menu.x_add);
|
||||||
lv_obj_align(labelXI, buttonXI, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET);
|
lv_obj_align(labelXI, buttonXI, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET);
|
||||||
|
|
||||||
|
@ -318,7 +318,7 @@ void disp_baby_step_dist() {
|
||||||
lv_imgbtn_set_src(buttonV, LV_BTN_STATE_REL, "F:/bmp_baby_move0_1.bin");
|
lv_imgbtn_set_src(buttonV, LV_BTN_STATE_REL, "F:/bmp_baby_move0_1.bin");
|
||||||
lv_imgbtn_set_src(buttonV, LV_BTN_STATE_PR, "F:/bmp_baby_move0_1.bin");
|
lv_imgbtn_set_src(buttonV, LV_BTN_STATE_PR, "F:/bmp_baby_move0_1.bin");
|
||||||
}
|
}
|
||||||
if (gCfgItems.multiple_language != 0) {
|
if (gCfgItems.multiple_language) {
|
||||||
if ((int)(100 * babystep_dist) == 1) {
|
if ((int)(100 * babystep_dist) == 1) {
|
||||||
lv_label_set_text(labelV, move_menu.step_001mm);
|
lv_label_set_text(labelV, move_menu.step_001mm);
|
||||||
lv_obj_align(labelV, buttonV, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET);
|
lv_obj_align(labelV, buttonV, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET);
|
||||||
|
|
|
@ -23,16 +23,15 @@
|
||||||
|
|
||||||
#if HAS_TFT_LVGL_UI
|
#if HAS_TFT_LVGL_UI
|
||||||
|
|
||||||
#include "lv_conf.h"
|
|
||||||
#include "draw_ui.h"
|
#include "draw_ui.h"
|
||||||
|
#include <lv_conf.h>
|
||||||
//#include "../lvgl/src/lv_objx/lv_imgbtn.h"
|
//#include "../lvgl/src/lv_objx/lv_imgbtn.h"
|
||||||
//#include "../lvgl/src/lv_objx/lv_img.h"
|
//#include "../lvgl/src/lv_objx/lv_img.h"
|
||||||
//#include "../lvgl/src/lv_core/lv_disp.h"
|
//#include "../lvgl/src/lv_core/lv_disp.h"
|
||||||
//#include "../lvgl/src/lv_core/lv_refr.h"
|
//#include "../lvgl/src/lv_core/lv_refr.h"
|
||||||
|
|
||||||
#include "../../../../MarlinCore.h"
|
|
||||||
#include "../../../../module/temperature.h"
|
|
||||||
#include "../../../../module/planner.h"
|
#include "../../../../module/planner.h"
|
||||||
|
#include "../../../../inc/MarlinConfig.h"
|
||||||
|
|
||||||
extern lv_group_t * g;
|
extern lv_group_t * g;
|
||||||
static lv_obj_t * scr;
|
static lv_obj_t * scr;
|
||||||
|
@ -239,7 +238,7 @@ void lv_draw_change_speed(void) {
|
||||||
labelStep = lv_label_create(buttonStep, NULL);
|
labelStep = lv_label_create(buttonStep, NULL);
|
||||||
lv_obj_t *label_Back = lv_label_create(buttonBack, NULL);
|
lv_obj_t *label_Back = lv_label_create(buttonBack, NULL);
|
||||||
|
|
||||||
if (gCfgItems.multiple_language != 0) {
|
if (gCfgItems.multiple_language) {
|
||||||
lv_label_set_text(labelAdd, speed_menu.add);
|
lv_label_set_text(labelAdd, speed_menu.add);
|
||||||
lv_obj_align(labelAdd, buttonAdd, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET);
|
lv_obj_align(labelAdd, buttonAdd, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET);
|
||||||
|
|
||||||
|
@ -281,7 +280,7 @@ void disp_speed_step() {
|
||||||
lv_imgbtn_set_src(buttonStep, LV_BTN_STATE_REL, "F:/bmp_step10_percent.bin");
|
lv_imgbtn_set_src(buttonStep, LV_BTN_STATE_REL, "F:/bmp_step10_percent.bin");
|
||||||
lv_imgbtn_set_src(buttonStep, LV_BTN_STATE_PR, "F:/bmp_step10_percent.bin");
|
lv_imgbtn_set_src(buttonStep, LV_BTN_STATE_PR, "F:/bmp_step10_percent.bin");
|
||||||
}
|
}
|
||||||
if (gCfgItems.multiple_language != 0) {
|
if (gCfgItems.multiple_language) {
|
||||||
if (uiCfg.stepPrintSpeed == 1) {
|
if (uiCfg.stepPrintSpeed == 1) {
|
||||||
lv_label_set_text(labelStep, speed_menu.step_1percent);
|
lv_label_set_text(labelStep, speed_menu.step_1percent);
|
||||||
lv_obj_align(labelStep, buttonStep, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET);
|
lv_obj_align(labelStep, buttonStep, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET);
|
||||||
|
@ -337,7 +336,7 @@ void disp_speed_type() {
|
||||||
lv_obj_refresh_ext_draw_pad(buttonExt);
|
lv_obj_refresh_ext_draw_pad(buttonExt);
|
||||||
lv_obj_refresh_ext_draw_pad(buttonMov);
|
lv_obj_refresh_ext_draw_pad(buttonMov);
|
||||||
|
|
||||||
if (gCfgItems.multiple_language != 0) {
|
if (gCfgItems.multiple_language) {
|
||||||
lv_label_set_text(labelMov, speed_menu.move);
|
lv_label_set_text(labelMov, speed_menu.move);
|
||||||
lv_obj_align(labelMov, buttonMov, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET);
|
lv_obj_align(labelMov, buttonMov, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET);
|
||||||
|
|
||||||
|
|
|
@ -28,20 +28,20 @@
|
||||||
|
|
||||||
#if HAS_TFT_LVGL_UI
|
#if HAS_TFT_LVGL_UI
|
||||||
|
|
||||||
#include "lv_conf.h"
|
|
||||||
#include "draw_ui.h"
|
#include "draw_ui.h"
|
||||||
|
#include <lv_conf.h>
|
||||||
|
|
||||||
//#include "../lvgl/src/lv_objx/lv_imgbtn.h"
|
//#include "../lvgl/src/lv_objx/lv_imgbtn.h"
|
||||||
//#include "../lvgl/src/lv_objx/lv_img.h"
|
//#include "../lvgl/src/lv_objx/lv_img.h"
|
||||||
//#include "../lvgl/src/lv_core/lv_disp.h"
|
//#include "../lvgl/src/lv_core/lv_disp.h"
|
||||||
//#include "../lvgl/src/lv_core/lv_refr.h"
|
//#include "../lvgl/src/lv_core/lv_refr.h"
|
||||||
|
|
||||||
#include "../../../../MarlinCore.h"
|
|
||||||
#include "../../../../sd/cardreader.h"
|
#include "../../../../sd/cardreader.h"
|
||||||
#include "../../../../gcode/queue.h"
|
#include "../../../../gcode/queue.h"
|
||||||
#include "../../../../module/temperature.h"
|
#include "../../../../module/temperature.h"
|
||||||
#include "../../../../module/planner.h"
|
#include "../../../../module/planner.h"
|
||||||
#include "../../../../gcode/gcode.h"
|
#include "../../../../gcode/gcode.h"
|
||||||
|
#include "../../../../inc/MarlinConfig.h"
|
||||||
|
|
||||||
#if ENABLED(POWER_LOSS_RECOVERY)
|
#if ENABLED(POWER_LOSS_RECOVERY)
|
||||||
#include "../../../../feature/powerloss.h"
|
#include "../../../../feature/powerloss.h"
|
||||||
|
@ -50,7 +50,6 @@
|
||||||
#if ENABLED(PARK_HEAD_ON_PAUSE)
|
#if ENABLED(PARK_HEAD_ON_PAUSE)
|
||||||
#include "../../../../feature/pause.h"
|
#include "../../../../feature/pause.h"
|
||||||
#endif
|
#endif
|
||||||
#include "../../../../gcode/gcode.h"
|
|
||||||
|
|
||||||
extern lv_group_t * g;
|
extern lv_group_t * g;
|
||||||
static lv_obj_t * scr;
|
static lv_obj_t * scr;
|
||||||
|
@ -58,8 +57,7 @@ static lv_obj_t * tempText1;
|
||||||
static lv_obj_t * filament_bar;
|
static lv_obj_t * filament_bar;
|
||||||
|
|
||||||
extern uint8_t sel_id;
|
extern uint8_t sel_id;
|
||||||
extern uint8_t once_flag;
|
extern bool once_flag, gcode_preview_over;
|
||||||
extern uint8_t gcode_preview_over;
|
|
||||||
extern int upload_result ;
|
extern int upload_result ;
|
||||||
extern uint32_t upload_time;
|
extern uint32_t upload_time;
|
||||||
extern uint32_t upload_size;
|
extern uint32_t upload_size;
|
||||||
|
@ -82,7 +80,7 @@ static void btn_ok_event_cb(lv_obj_t * btn, lv_event_t event) {
|
||||||
lv_draw_printing();
|
lv_draw_printing();
|
||||||
|
|
||||||
#if ENABLED(SDSUPPORT)
|
#if ENABLED(SDSUPPORT)
|
||||||
if (gcode_preview_over != 1) {
|
if (!gcode_preview_over) {
|
||||||
char *cur_name;
|
char *cur_name;
|
||||||
cur_name = strrchr(list_file.file_name[sel_id], '/');
|
cur_name = strrchr(list_file.file_name[sel_id], '/');
|
||||||
|
|
||||||
|
@ -109,7 +107,7 @@ static void btn_ok_event_cb(lv_obj_t * btn, lv_event_t event) {
|
||||||
#if ENABLED(POWER_LOSS_RECOVERY)
|
#if ENABLED(POWER_LOSS_RECOVERY)
|
||||||
recovery.prepare();
|
recovery.prepare();
|
||||||
#endif
|
#endif
|
||||||
once_flag = 0;
|
once_flag = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -23,10 +23,10 @@
|
||||||
|
|
||||||
#if HAS_TFT_LVGL_UI
|
#if HAS_TFT_LVGL_UI
|
||||||
|
|
||||||
#include "lv_conf.h"
|
|
||||||
#include "draw_ui.h"
|
#include "draw_ui.h"
|
||||||
|
#include <lv_conf.h>
|
||||||
|
|
||||||
#include "../../../../MarlinCore.h"
|
#include "../../../../inc/MarlinConfig.h"
|
||||||
|
|
||||||
extern lv_group_t * g;
|
extern lv_group_t * g;
|
||||||
static lv_obj_t * scr;
|
static lv_obj_t * scr;
|
||||||
|
@ -191,7 +191,7 @@ void lv_draw_eeprom_settings(void) {
|
||||||
lv_btn_set_layout(buttonBack, LV_LAYOUT_OFF);
|
lv_btn_set_layout(buttonBack, LV_LAYOUT_OFF);
|
||||||
label_Back = lv_label_create(buttonBack, NULL);
|
label_Back = lv_label_create(buttonBack, NULL);
|
||||||
|
|
||||||
if (gCfgItems.multiple_language != 0) {
|
if (gCfgItems.multiple_language) {
|
||||||
lv_label_set_text(label_Back, common_menu.text_back);
|
lv_label_set_text(label_Back, common_menu.text_back);
|
||||||
lv_obj_align(label_Back, buttonBack, LV_ALIGN_CENTER, 0, 0);
|
lv_obj_align(label_Back, buttonBack, LV_ALIGN_CENTER, 0, 0);
|
||||||
|
|
||||||
|
|
|
@ -23,15 +23,10 @@
|
||||||
|
|
||||||
#if HAS_TFT_LVGL_UI
|
#if HAS_TFT_LVGL_UI
|
||||||
|
|
||||||
#include "lv_conf.h"
|
|
||||||
#include "draw_ui.h"
|
#include "draw_ui.h"
|
||||||
|
#include <lv_conf.h>
|
||||||
|
|
||||||
#include "../../../../MarlinCore.h"
|
#include "../../../../inc/MarlinConfig.h"
|
||||||
#include "../../../../module/planner.h"
|
|
||||||
#include "../../../../module/stepper/indirection.h"
|
|
||||||
#include "../../../../feature/tmc_util.h"
|
|
||||||
#include "../../../../gcode/gcode.h"
|
|
||||||
#include "../../../../module/planner.h"
|
|
||||||
|
|
||||||
#if BUTTONS_EXIST(EN1, EN2)
|
#if BUTTONS_EXIST(EN1, EN2)
|
||||||
|
|
||||||
|
@ -59,21 +54,12 @@ static void event_handler(lv_obj_t * obj, lv_event_t event) {
|
||||||
|
|
||||||
}
|
}
|
||||||
else if (event == LV_EVENT_RELEASED) {
|
else if (event == LV_EVENT_RELEASED) {
|
||||||
if (gCfgItems.encoder_enable) {
|
gCfgItems.encoder_enable ^= true;
|
||||||
gCfgItems.encoder_enable = false;
|
lv_imgbtn_set_src(buttonEncoderState, LV_BTN_STATE_REL, gCfgItems.encoder_enable ? "F:/bmp_enable.bin" : "F:/bmp_disable.bin");
|
||||||
lv_imgbtn_set_src(buttonEncoderState, LV_BTN_STATE_REL, "F:/bmp_disable.bin");
|
lv_imgbtn_set_src(buttonEncoderState, LV_BTN_STATE_PR, gCfgItems.encoder_enable ? "F:/bmp_enable.bin" : "F:/bmp_disable.bin");
|
||||||
lv_imgbtn_set_src(buttonEncoderState, LV_BTN_STATE_PR, "F:/bmp_disable.bin");
|
|
||||||
lv_label_set_text(labelEncoderState, machine_menu.disable);
|
|
||||||
update_spi_flash();
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
gCfgItems.encoder_enable = true;
|
|
||||||
lv_imgbtn_set_src(buttonEncoderState, LV_BTN_STATE_REL, "F:/bmp_enable.bin");
|
|
||||||
lv_imgbtn_set_src(buttonEncoderState, LV_BTN_STATE_PR, "F:/bmp_enable.bin");
|
|
||||||
lv_label_set_text(labelEncoderState, machine_menu.enable);
|
lv_label_set_text(labelEncoderState, machine_menu.enable);
|
||||||
update_spi_flash();
|
update_spi_flash();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -110,14 +96,8 @@ void lv_draw_encoder_settings(void) {
|
||||||
|
|
||||||
buttonEncoderState = lv_imgbtn_create(scr, NULL);
|
buttonEncoderState = lv_imgbtn_create(scr, NULL);
|
||||||
lv_obj_set_pos(buttonEncoderState, PARA_UI_STATE_POS_X, PARA_UI_POS_Y + PARA_UI_STATE_V);
|
lv_obj_set_pos(buttonEncoderState, PARA_UI_STATE_POS_X, PARA_UI_POS_Y + PARA_UI_STATE_V);
|
||||||
if (gCfgItems.encoder_enable) {
|
lv_imgbtn_set_src(buttonEncoderState, LV_BTN_STATE_REL, gCfgItems.encoder_enable ? "F:/bmp_enable.bin" : "F:/bmp_disable.bin");
|
||||||
lv_imgbtn_set_src(buttonEncoderState, LV_BTN_STATE_REL, "F:/bmp_enable.bin");
|
lv_imgbtn_set_src(buttonEncoderState, LV_BTN_STATE_PR, gCfgItems.encoder_enable ? "F:/bmp_enable.bin" : "F:/bmp_disable.bin");
|
||||||
lv_imgbtn_set_src(buttonEncoderState, LV_BTN_STATE_PR, "F:/bmp_enable.bin");
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
lv_imgbtn_set_src(buttonEncoderState, LV_BTN_STATE_REL, "F:/bmp_disable.bin");
|
|
||||||
lv_imgbtn_set_src(buttonEncoderState, LV_BTN_STATE_PR, "F:/bmp_disable.bin");
|
|
||||||
}
|
|
||||||
|
|
||||||
lv_obj_set_event_cb_mks(buttonEncoderState, event_handler, ID_ENCODER_STATE, NULL, 0);
|
lv_obj_set_event_cb_mks(buttonEncoderState, event_handler, ID_ENCODER_STATE, NULL, 0);
|
||||||
|
|
||||||
|
@ -140,14 +120,8 @@ void lv_draw_encoder_settings(void) {
|
||||||
lv_btn_set_layout(buttonBack, LV_LAYOUT_OFF);
|
lv_btn_set_layout(buttonBack, LV_LAYOUT_OFF);
|
||||||
label_Back = lv_label_create(buttonBack, NULL);
|
label_Back = lv_label_create(buttonBack, NULL);
|
||||||
|
|
||||||
if (gCfgItems.encoder_enable) {
|
lv_label_set_text(labelEncoderState, gCfgItems.encoder_enable ? machine_menu.enable : machine_menu.disable);
|
||||||
lv_label_set_text(labelEncoderState, machine_menu.enable);
|
|
||||||
lv_obj_align(labelEncoderState, buttonEncoderState, LV_ALIGN_CENTER, 0, 0);
|
lv_obj_align(labelEncoderState, buttonEncoderState, LV_ALIGN_CENTER, 0, 0);
|
||||||
}
|
|
||||||
else {
|
|
||||||
lv_label_set_text(labelEncoderState, machine_menu.disable);
|
|
||||||
lv_obj_align(labelEncoderState, buttonEncoderState, LV_ALIGN_CENTER, 0, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
lv_label_set_text(label_Back, common_menu.text_back);
|
lv_label_set_text(label_Back, common_menu.text_back);
|
||||||
lv_obj_align(label_Back, buttonBack, LV_ALIGN_CENTER, 0, 0);
|
lv_obj_align(label_Back, buttonBack, LV_ALIGN_CENTER, 0, 0);
|
||||||
|
|
|
@ -23,18 +23,18 @@
|
||||||
|
|
||||||
#if HAS_TFT_LVGL_UI
|
#if HAS_TFT_LVGL_UI
|
||||||
|
|
||||||
#include "SPI_TFT.h"
|
|
||||||
|
|
||||||
#include "lv_conf.h"
|
|
||||||
#include "draw_ui.h"
|
#include "draw_ui.h"
|
||||||
|
#include <lv_conf.h>
|
||||||
|
|
||||||
#include "tft_lvgl_configuration.h"
|
#include "tft_lvgl_configuration.h"
|
||||||
#include "mks_hardware_test.h"
|
|
||||||
//#include "../lvgl/src/lv_objx/lv_imgbtn.h"
|
//#include "../lvgl/src/lv_objx/lv_imgbtn.h"
|
||||||
//#include "../lvgl/src/lv_objx/lv_img.h"
|
//#include "../lvgl/src/lv_objx/lv_img.h"
|
||||||
//#include "../lvgl/src/lv_core/lv_disp.h"
|
//#include "../lvgl/src/lv_core/lv_disp.h"
|
||||||
//#include "../lvgl/src/lv_core/lv_refr.h"
|
//#include "../lvgl/src/lv_core/lv_refr.h"
|
||||||
|
|
||||||
#include "../../../../MarlinCore.h"
|
#include "SPI_TFT.h"
|
||||||
|
#include "mks_hardware_test.h"
|
||||||
|
#include "../../../../inc/MarlinConfig.h"
|
||||||
|
|
||||||
static lv_obj_t * scr;
|
static lv_obj_t * scr;
|
||||||
|
|
||||||
|
|
|
@ -23,16 +23,16 @@
|
||||||
|
|
||||||
#if HAS_TFT_LVGL_UI
|
#if HAS_TFT_LVGL_UI
|
||||||
|
|
||||||
#include "lv_conf.h"
|
|
||||||
#include "draw_ui.h"
|
#include "draw_ui.h"
|
||||||
|
#include <lv_conf.h>
|
||||||
//#include "../lvgl/src/lv_objx/lv_imgbtn.h"
|
//#include "../lvgl/src/lv_objx/lv_imgbtn.h"
|
||||||
//#include "../lvgl/src/lv_objx/lv_img.h"
|
//#include "../lvgl/src/lv_objx/lv_img.h"
|
||||||
//#include "../lvgl/src/lv_core/lv_disp.h"
|
//#include "../lvgl/src/lv_core/lv_disp.h"
|
||||||
//#include "../lvgl/src/lv_core/lv_refr.h"
|
//#include "../lvgl/src/lv_core/lv_refr.h"
|
||||||
|
|
||||||
#include "../../../../MarlinCore.h"
|
|
||||||
#include "../../../../module/temperature.h"
|
#include "../../../../module/temperature.h"
|
||||||
#include "../../../../gcode/queue.h"
|
#include "../../../../gcode/queue.h"
|
||||||
|
#include "../../../../inc/MarlinConfig.h"
|
||||||
|
|
||||||
static lv_obj_t * scr;
|
static lv_obj_t * scr;
|
||||||
extern lv_group_t* g;
|
extern lv_group_t* g;
|
||||||
|
@ -235,7 +235,7 @@ void lv_draw_extrusion(void) {
|
||||||
labelSpeed = lv_label_create(buttonSpeed, NULL);
|
labelSpeed = lv_label_create(buttonSpeed, NULL);
|
||||||
lv_obj_t *label_Back = lv_label_create(buttonBack, NULL);
|
lv_obj_t *label_Back = lv_label_create(buttonBack, NULL);
|
||||||
|
|
||||||
if (gCfgItems.multiple_language != 0) {
|
if (gCfgItems.multiple_language) {
|
||||||
lv_label_set_text(labelAdd, extrude_menu.in);
|
lv_label_set_text(labelAdd, extrude_menu.in);
|
||||||
lv_obj_align(labelAdd, buttonAdd, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET);
|
lv_obj_align(labelAdd, buttonAdd, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET);
|
||||||
|
|
||||||
|
@ -274,7 +274,7 @@ void disp_ext_type() {
|
||||||
if (uiCfg.curSprayerChoose == 1) {
|
if (uiCfg.curSprayerChoose == 1) {
|
||||||
lv_imgbtn_set_src(buttoType, LV_BTN_STATE_REL, "F:/bmp_extru2.bin");
|
lv_imgbtn_set_src(buttoType, LV_BTN_STATE_REL, "F:/bmp_extru2.bin");
|
||||||
lv_imgbtn_set_src(buttoType, LV_BTN_STATE_PR, "F:/bmp_extru2.bin");
|
lv_imgbtn_set_src(buttoType, LV_BTN_STATE_PR, "F:/bmp_extru2.bin");
|
||||||
if (gCfgItems.multiple_language != 0) {
|
if (gCfgItems.multiple_language) {
|
||||||
lv_label_set_text(labelType, extrude_menu.ext2);
|
lv_label_set_text(labelType, extrude_menu.ext2);
|
||||||
lv_obj_align(labelType, buttoType, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET);
|
lv_obj_align(labelType, buttoType, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET);
|
||||||
}
|
}
|
||||||
|
@ -282,7 +282,7 @@ void disp_ext_type() {
|
||||||
else {
|
else {
|
||||||
lv_imgbtn_set_src(buttoType, LV_BTN_STATE_REL, "F:/bmp_extru1.bin");
|
lv_imgbtn_set_src(buttoType, LV_BTN_STATE_REL, "F:/bmp_extru1.bin");
|
||||||
lv_imgbtn_set_src(buttoType, LV_BTN_STATE_PR, "F:/bmp_extru1.bin");
|
lv_imgbtn_set_src(buttoType, LV_BTN_STATE_PR, "F:/bmp_extru1.bin");
|
||||||
if (gCfgItems.multiple_language != 0) {
|
if (gCfgItems.multiple_language) {
|
||||||
lv_label_set_text(labelType, extrude_menu.ext1);
|
lv_label_set_text(labelType, extrude_menu.ext1);
|
||||||
lv_obj_align(labelType, buttoType, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET);
|
lv_obj_align(labelType, buttoType, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET);
|
||||||
}
|
}
|
||||||
|
@ -303,7 +303,7 @@ void disp_ext_speed() {
|
||||||
lv_imgbtn_set_src(buttonSpeed, LV_BTN_STATE_PR, "F:/bmp_speed_normal.bin");
|
lv_imgbtn_set_src(buttonSpeed, LV_BTN_STATE_PR, "F:/bmp_speed_normal.bin");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gCfgItems.multiple_language != 0) {
|
if (gCfgItems.multiple_language) {
|
||||||
if (uiCfg.extruSpeed == 20) {
|
if (uiCfg.extruSpeed == 20) {
|
||||||
lv_label_set_text(labelSpeed, extrude_menu.high);
|
lv_label_set_text(labelSpeed, extrude_menu.high);
|
||||||
lv_obj_align(labelSpeed, buttonSpeed, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET);
|
lv_obj_align(labelSpeed, buttonSpeed, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET);
|
||||||
|
@ -377,7 +377,7 @@ void disp_ext_step() {
|
||||||
lv_imgbtn_set_src(buttonStep, LV_BTN_STATE_PR, "F:/bmp_step10_mm.bin");
|
lv_imgbtn_set_src(buttonStep, LV_BTN_STATE_PR, "F:/bmp_step10_mm.bin");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gCfgItems.multiple_language != 0) {
|
if (gCfgItems.multiple_language) {
|
||||||
if (uiCfg.extruStep == 1) {
|
if (uiCfg.extruStep == 1) {
|
||||||
lv_label_set_text(labelStep, extrude_menu.step_1mm);
|
lv_label_set_text(labelStep, extrude_menu.step_1mm);
|
||||||
lv_obj_align(labelStep, buttonStep, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET);
|
lv_obj_align(labelStep, buttonStep, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET);
|
||||||
|
|
|
@ -23,17 +23,17 @@
|
||||||
|
|
||||||
#if HAS_TFT_LVGL_UI
|
#if HAS_TFT_LVGL_UI
|
||||||
|
|
||||||
#include "../../../../MarlinCore.h"
|
#include "draw_ui.h"
|
||||||
#include "lv_conf.h"
|
#include <lv_conf.h>
|
||||||
//#include "../lvgl/src/lv_objx/lv_imgbtn.h"
|
//#include "../lvgl/src/lv_objx/lv_imgbtn.h"
|
||||||
//#include "../lvgl/src/lv_objx/lv_img.h"
|
//#include "../lvgl/src/lv_objx/lv_img.h"
|
||||||
//#include "../lvgl/src/lv_core/lv_disp.h"
|
//#include "../lvgl/src/lv_core/lv_disp.h"
|
||||||
//#include "../lvgl/src/lv_core/lv_refr.h"
|
//#include "../lvgl/src/lv_core/lv_refr.h"
|
||||||
#include "../../../../../Configuration.h"
|
|
||||||
#include "draw_ui.h"
|
|
||||||
#include "../../../../module/temperature.h"
|
#include "../../../../module/temperature.h"
|
||||||
#include "../../../../gcode/queue.h"
|
#include "../../../../gcode/queue.h"
|
||||||
#include "../../../../gcode/gcode.h"
|
#include "../../../../gcode/gcode.h"
|
||||||
|
#include "../../../../inc/MarlinConfig.h"
|
||||||
|
|
||||||
extern lv_group_t * g;
|
extern lv_group_t * g;
|
||||||
static lv_obj_t * scr;
|
static lv_obj_t * scr;
|
||||||
|
@ -209,7 +209,7 @@ void lv_draw_fan(void) {
|
||||||
lv_obj_t *labelOff = lv_label_create(buttonOff, NULL);
|
lv_obj_t *labelOff = lv_label_create(buttonOff, NULL);
|
||||||
lv_obj_t *label_Back = lv_label_create(buttonBack, NULL);
|
lv_obj_t *label_Back = lv_label_create(buttonBack, NULL);
|
||||||
|
|
||||||
if (gCfgItems.multiple_language != 0) {
|
if (gCfgItems.multiple_language) {
|
||||||
lv_label_set_text(labelAdd, fan_menu.add);
|
lv_label_set_text(labelAdd, fan_menu.add);
|
||||||
lv_obj_align(labelAdd, buttonAdd, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET);
|
lv_obj_align(labelAdd, buttonAdd, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET);
|
||||||
|
|
||||||
|
|
|
@ -23,15 +23,14 @@
|
||||||
|
|
||||||
#if HAS_TFT_LVGL_UI
|
#if HAS_TFT_LVGL_UI
|
||||||
|
|
||||||
#include "lv_conf.h"
|
|
||||||
#include "draw_ui.h"
|
#include "draw_ui.h"
|
||||||
|
#include <lv_conf.h>
|
||||||
|
|
||||||
#include "../../../../MarlinCore.h"
|
|
||||||
#include "../../../../module/temperature.h"
|
#include "../../../../module/temperature.h"
|
||||||
#include "../../../../gcode/queue.h"
|
|
||||||
#include "../../../../gcode/gcode.h"
|
#include "../../../../gcode/gcode.h"
|
||||||
#include "../../../../module/motion.h"
|
#include "../../../../module/motion.h"
|
||||||
#include "../../../../module/planner.h"
|
#include "../../../../module/planner.h"
|
||||||
|
#include "../../../../inc/MarlinConfig.h"
|
||||||
|
|
||||||
extern lv_group_t * g;
|
extern lv_group_t * g;
|
||||||
static lv_obj_t * scr;
|
static lv_obj_t * scr;
|
||||||
|
@ -197,7 +196,7 @@ void lv_draw_filament_change(void) {
|
||||||
labelType = lv_label_create(buttoType, NULL);
|
labelType = lv_label_create(buttoType, NULL);
|
||||||
lv_obj_t *label_Back = lv_label_create(buttonBack, NULL);
|
lv_obj_t *label_Back = lv_label_create(buttonBack, NULL);
|
||||||
|
|
||||||
if (gCfgItems.multiple_language != 0) {
|
if (gCfgItems.multiple_language) {
|
||||||
lv_label_set_text(labelIn, filament_menu.in);
|
lv_label_set_text(labelIn, filament_menu.in);
|
||||||
lv_obj_align(labelIn, buttonIn, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET);
|
lv_obj_align(labelIn, buttonIn, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET);
|
||||||
|
|
||||||
|
@ -228,7 +227,7 @@ void disp_filament_type() {
|
||||||
if (uiCfg.curSprayerChoose == 1) {
|
if (uiCfg.curSprayerChoose == 1) {
|
||||||
lv_imgbtn_set_src(buttoType, LV_BTN_STATE_REL, "F:/bmp_extru2.bin");
|
lv_imgbtn_set_src(buttoType, LV_BTN_STATE_REL, "F:/bmp_extru2.bin");
|
||||||
lv_imgbtn_set_src(buttoType, LV_BTN_STATE_PR, "F:/bmp_extru2.bin");
|
lv_imgbtn_set_src(buttoType, LV_BTN_STATE_PR, "F:/bmp_extru2.bin");
|
||||||
if (gCfgItems.multiple_language != 0) {
|
if (gCfgItems.multiple_language) {
|
||||||
lv_label_set_text(labelType, preheat_menu.ext2);
|
lv_label_set_text(labelType, preheat_menu.ext2);
|
||||||
lv_obj_align(labelType, buttoType, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET);
|
lv_obj_align(labelType, buttoType, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET);
|
||||||
}
|
}
|
||||||
|
@ -236,7 +235,7 @@ void disp_filament_type() {
|
||||||
else {
|
else {
|
||||||
lv_imgbtn_set_src(buttoType, LV_BTN_STATE_REL, "F:/bmp_extru1.bin");
|
lv_imgbtn_set_src(buttoType, LV_BTN_STATE_REL, "F:/bmp_extru1.bin");
|
||||||
lv_imgbtn_set_src(buttoType, LV_BTN_STATE_PR, "F:/bmp_extru1.bin");
|
lv_imgbtn_set_src(buttoType, LV_BTN_STATE_PR, "F:/bmp_extru1.bin");
|
||||||
if (gCfgItems.multiple_language != 0) {
|
if (gCfgItems.multiple_language) {
|
||||||
lv_label_set_text(labelType, preheat_menu.ext1);
|
lv_label_set_text(labelType, preheat_menu.ext1);
|
||||||
lv_obj_align(labelType, buttoType, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET);
|
lv_obj_align(labelType, buttoType, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET);
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,11 +23,10 @@
|
||||||
|
|
||||||
#if HAS_TFT_LVGL_UI
|
#if HAS_TFT_LVGL_UI
|
||||||
|
|
||||||
#include "lv_conf.h"
|
|
||||||
#include "draw_ui.h"
|
#include "draw_ui.h"
|
||||||
|
#include <lv_conf.h>
|
||||||
|
|
||||||
#include "../../../../MarlinCore.h"
|
#include "../../../../inc/MarlinConfig.h"
|
||||||
#include "../../../../module/planner.h"
|
|
||||||
|
|
||||||
extern lv_group_t * g;
|
extern lv_group_t * g;
|
||||||
static lv_obj_t * scr;
|
static lv_obj_t * scr;
|
||||||
|
@ -279,7 +278,7 @@ void lv_draw_filament_settings(void) {
|
||||||
if (gCfgItems.encoder_enable) lv_group_add_obj(g, buttonBack);
|
if (gCfgItems.encoder_enable) lv_group_add_obj(g, buttonBack);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (gCfgItems.multiple_language != 0) {
|
if (gCfgItems.multiple_language) {
|
||||||
if (uiCfg.para_ui_page != 1) {
|
if (uiCfg.para_ui_page != 1) {
|
||||||
ZERO(public_buf_l);
|
ZERO(public_buf_l);
|
||||||
sprintf_P(public_buf_l, PSTR("%d"), gCfgItems.filamentchange_load_length);
|
sprintf_P(public_buf_l, PSTR("%d"), gCfgItems.filamentchange_load_length);
|
||||||
|
|
|
@ -23,16 +23,17 @@
|
||||||
|
|
||||||
#if HAS_TFT_LVGL_UI
|
#if HAS_TFT_LVGL_UI
|
||||||
|
|
||||||
#include "../../../../MarlinCore.h"
|
|
||||||
#include "draw_ready_print.h"
|
#include "draw_ready_print.h"
|
||||||
#include "draw_set.h"
|
#include "draw_set.h"
|
||||||
#include "lv_conf.h"
|
#include "draw_ui.h"
|
||||||
|
#include <lv_conf.h>
|
||||||
//#include "../lvgl/src/lv_objx/lv_imgbtn.h"
|
//#include "../lvgl/src/lv_objx/lv_imgbtn.h"
|
||||||
//#include "../lvgl/src/lv_objx/lv_img.h"
|
//#include "../lvgl/src/lv_objx/lv_img.h"
|
||||||
//#include "../lvgl/src/lv_core/lv_disp.h"
|
//#include "../lvgl/src/lv_core/lv_disp.h"
|
||||||
//#include "../lvgl/src/lv_core/lv_refr.h"
|
//#include "../lvgl/src/lv_core/lv_refr.h"
|
||||||
#include "draw_ui.h"
|
|
||||||
#include "../../../../gcode/queue.h"
|
#include "../../../../gcode/queue.h"
|
||||||
|
#include "../../../../inc/MarlinConfig.h"
|
||||||
|
|
||||||
extern lv_group_t * g;
|
extern lv_group_t * g;
|
||||||
static lv_obj_t * scr;
|
static lv_obj_t * scr;
|
||||||
|
@ -206,7 +207,7 @@ void lv_draw_home(void) {
|
||||||
lv_obj_t *labelOffXY = lv_label_create(buttonOffXY, NULL);
|
lv_obj_t *labelOffXY = lv_label_create(buttonOffXY, NULL);
|
||||||
lv_obj_t *label_Back = lv_label_create(buttonBack, NULL);
|
lv_obj_t *label_Back = lv_label_create(buttonBack, NULL);
|
||||||
|
|
||||||
if (gCfgItems.multiple_language != 0) {
|
if (gCfgItems.multiple_language) {
|
||||||
lv_label_set_text(labelHomeAll, home_menu.home_all);
|
lv_label_set_text(labelHomeAll, home_menu.home_all);
|
||||||
lv_obj_align(labelHomeAll, buttonHomeAll, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET);
|
lv_obj_align(labelHomeAll, buttonHomeAll, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET);
|
||||||
|
|
||||||
|
|
|
@ -19,18 +19,15 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
#include "../../../../inc/MarlinConfigPre.h"
|
#include "../../../../inc/MarlinConfig.h"
|
||||||
|
|
||||||
#if HAS_TFT_LVGL_UI
|
#if HAS_TFT_LVGL_UI && USE_SENSORLESS
|
||||||
|
|
||||||
#include "lv_conf.h"
|
|
||||||
#include "draw_ui.h"
|
#include "draw_ui.h"
|
||||||
|
#include <lv_conf.h>
|
||||||
|
|
||||||
#include "../../../../MarlinCore.h"
|
|
||||||
#include "../../../../module/planner.h"
|
#include "../../../../module/planner.h"
|
||||||
#include "../../../../module/probe.h"
|
#include "../../../../module/probe.h"
|
||||||
|
|
||||||
#if USE_SENSORLESS
|
|
||||||
#include "../../../../module/stepper/indirection.h"
|
#include "../../../../module/stepper/indirection.h"
|
||||||
#include "../../../../feature/tmc_util.h"
|
#include "../../../../feature/tmc_util.h"
|
||||||
|
|
||||||
|
@ -222,7 +219,7 @@ void lv_draw_homing_sensitivity_settings(void) {
|
||||||
if (gCfgItems.encoder_enable) lv_group_add_obj(g, buttonBack);
|
if (gCfgItems.encoder_enable) lv_group_add_obj(g, buttonBack);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (gCfgItems.multiple_language != 0) {
|
if (gCfgItems.multiple_language) {
|
||||||
ZERO(public_buf_l);
|
ZERO(public_buf_l);
|
||||||
sprintf_P(public_buf_l, PSTR("%d"), TERN(X_SENSORLESS, stepperX.homing_threshold(), 0));
|
sprintf_P(public_buf_l, PSTR("%d"), TERN(X_SENSORLESS, stepperX.homing_threshold(), 0));
|
||||||
lv_label_set_text(labelXValue, public_buf_l);
|
lv_label_set_text(labelXValue, public_buf_l);
|
||||||
|
@ -257,6 +254,4 @@ void lv_clear_homing_sensitivity_settings() {
|
||||||
lv_obj_del(scr);
|
lv_obj_del(scr);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // USE_SENSORLESS
|
|
||||||
|
|
||||||
#endif // HAS_TFT_LVGL_UI && USE_SENSORLESS
|
#endif // HAS_TFT_LVGL_UI && USE_SENSORLESS
|
||||||
|
|
|
@ -23,11 +23,11 @@
|
||||||
|
|
||||||
#if BOTH(HAS_TFT_LVGL_UI, HAS_CLASSIC_JERK)
|
#if BOTH(HAS_TFT_LVGL_UI, HAS_CLASSIC_JERK)
|
||||||
|
|
||||||
#include "lv_conf.h"
|
|
||||||
#include "draw_ui.h"
|
#include "draw_ui.h"
|
||||||
|
#include <lv_conf.h>
|
||||||
|
|
||||||
#include "../../../../MarlinCore.h"
|
|
||||||
#include "../../../../module/planner.h"
|
#include "../../../../module/planner.h"
|
||||||
|
#include "../../../../inc/MarlinConfig.h"
|
||||||
|
|
||||||
extern lv_group_t * g;
|
extern lv_group_t * g;
|
||||||
static lv_obj_t * scr;
|
static lv_obj_t * scr;
|
||||||
|
@ -201,7 +201,7 @@ void lv_draw_jerk_settings(void) {
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (gCfgItems.multiple_language != 0) {
|
if (gCfgItems.multiple_language) {
|
||||||
ZERO(public_buf_l);
|
ZERO(public_buf_l);
|
||||||
sprintf_P(public_buf_l, PSTR("%.1f"), planner.max_jerk[X_AXIS]);
|
sprintf_P(public_buf_l, PSTR("%.1f"), planner.max_jerk[X_AXIS]);
|
||||||
lv_label_set_text(labelXValue, public_buf_l);
|
lv_label_set_text(labelXValue, public_buf_l);
|
||||||
|
|
|
@ -23,11 +23,10 @@
|
||||||
|
|
||||||
#if HAS_TFT_LVGL_UI
|
#if HAS_TFT_LVGL_UI
|
||||||
|
|
||||||
#include "lv_conf.h"
|
|
||||||
#include "draw_ui.h"
|
#include "draw_ui.h"
|
||||||
|
#include <lv_conf.h>
|
||||||
|
|
||||||
#include "../../../../../Configuration.h"
|
#include "../../../../inc/MarlinConfig.h"
|
||||||
#include "../../../../MarlinCore.h"
|
|
||||||
|
|
||||||
extern lv_group_t * g;
|
extern lv_group_t * g;
|
||||||
static lv_obj_t * scr;
|
static lv_obj_t * scr;
|
||||||
|
|
|
@ -23,14 +23,14 @@
|
||||||
|
|
||||||
#if HAS_TFT_LVGL_UI
|
#if HAS_TFT_LVGL_UI
|
||||||
|
|
||||||
#include "lv_conf.h"
|
|
||||||
#include "draw_ui.h"
|
#include "draw_ui.h"
|
||||||
|
#include <lv_conf.h>
|
||||||
//#include "../lvgl/src/lv_objx/lv_imgbtn.h"
|
//#include "../lvgl/src/lv_objx/lv_imgbtn.h"
|
||||||
//#include "../lvgl/src/lv_objx/lv_img.h"
|
//#include "../lvgl/src/lv_objx/lv_img.h"
|
||||||
//#include "../lvgl/src/lv_core/lv_disp.h"
|
//#include "../lvgl/src/lv_core/lv_disp.h"
|
||||||
//#include "../lvgl/src/lv_core/lv_refr.h"
|
//#include "../lvgl/src/lv_core/lv_refr.h"
|
||||||
|
|
||||||
#include "../../../../MarlinCore.h"
|
#include "../../../../inc/MarlinConfig.h"
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
//static lv_obj_t *buttonMoveZ,*buttonTest,*buttonZ0,*buttonStop,*buttonReturn;
|
//static lv_obj_t *buttonMoveZ,*buttonTest,*buttonZ0,*buttonStop,*buttonReturn;
|
||||||
|
@ -352,7 +352,7 @@ void lv_draw_language(void) {
|
||||||
|
|
||||||
disp_language(gCfgItems.language, SELECTED);
|
disp_language(gCfgItems.language, SELECTED);
|
||||||
|
|
||||||
if (gCfgItems.multiple_language != 0) {
|
if (gCfgItems.multiple_language) {
|
||||||
lv_label_set_text(label_CN, language_menu.chinese_s);
|
lv_label_set_text(label_CN, language_menu.chinese_s);
|
||||||
lv_obj_align(label_CN, buttonCN, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET);
|
lv_obj_align(label_CN, buttonCN, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET);
|
||||||
|
|
||||||
|
|
|
@ -23,10 +23,10 @@
|
||||||
|
|
||||||
#if HAS_TFT_LVGL_UI
|
#if HAS_TFT_LVGL_UI
|
||||||
|
|
||||||
#include "lv_conf.h"
|
|
||||||
#include "draw_ui.h"
|
#include "draw_ui.h"
|
||||||
|
#include <lv_conf.h>
|
||||||
|
|
||||||
#include "../../../../MarlinCore.h"
|
#include "../../../../inc/MarlinConfig.h"
|
||||||
|
|
||||||
extern lv_group_t * g;
|
extern lv_group_t * g;
|
||||||
static lv_obj_t * scr;
|
static lv_obj_t * scr;
|
||||||
|
@ -234,7 +234,7 @@ void lv_draw_level_settings(void) {
|
||||||
lv_btn_set_layout(buttonBack, LV_LAYOUT_OFF);
|
lv_btn_set_layout(buttonBack, LV_LAYOUT_OFF);
|
||||||
label_Back = lv_label_create(buttonBack, NULL);
|
label_Back = lv_label_create(buttonBack, NULL);
|
||||||
|
|
||||||
if (gCfgItems.multiple_language != 0) {
|
if (gCfgItems.multiple_language) {
|
||||||
lv_label_set_text(label_Back, common_menu.text_back);
|
lv_label_set_text(label_Back, common_menu.text_back);
|
||||||
lv_obj_align(label_Back, buttonBack, LV_ALIGN_CENTER, 0, 0);
|
lv_obj_align(label_Back, buttonBack, LV_ALIGN_CENTER, 0, 0);
|
||||||
|
|
||||||
|
|
|
@ -23,10 +23,10 @@
|
||||||
|
|
||||||
#if HAS_TFT_LVGL_UI
|
#if HAS_TFT_LVGL_UI
|
||||||
|
|
||||||
#include "lv_conf.h"
|
|
||||||
#include "draw_ui.h"
|
#include "draw_ui.h"
|
||||||
|
#include <lv_conf.h>
|
||||||
|
|
||||||
#include "../../../../MarlinCore.h"
|
#include "../../../../inc/MarlinConfig.h"
|
||||||
|
|
||||||
extern lv_group_t * g;
|
extern lv_group_t * g;
|
||||||
static lv_obj_t * scr;
|
static lv_obj_t * scr;
|
||||||
|
@ -252,7 +252,7 @@ void lv_draw_machine_para(void) {
|
||||||
lv_btn_set_layout(buttonBack, LV_LAYOUT_OFF);
|
lv_btn_set_layout(buttonBack, LV_LAYOUT_OFF);
|
||||||
label_Back = lv_label_create(buttonBack, NULL);
|
label_Back = lv_label_create(buttonBack, NULL);
|
||||||
|
|
||||||
if (gCfgItems.multiple_language != 0) {
|
if (gCfgItems.multiple_language) {
|
||||||
lv_label_set_text(label_Back, common_menu.text_back);
|
lv_label_set_text(label_Back, common_menu.text_back);
|
||||||
lv_obj_align(label_Back, buttonBack, LV_ALIGN_CENTER, 0, -2);
|
lv_obj_align(label_Back, buttonBack, LV_ALIGN_CENTER, 0, -2);
|
||||||
|
|
||||||
|
|
|
@ -23,10 +23,10 @@
|
||||||
|
|
||||||
#if HAS_TFT_LVGL_UI
|
#if HAS_TFT_LVGL_UI
|
||||||
|
|
||||||
#include "lv_conf.h"
|
|
||||||
#include "draw_ui.h"
|
#include "draw_ui.h"
|
||||||
|
#include <lv_conf.h>
|
||||||
|
|
||||||
#include "../../../../MarlinCore.h"
|
#include "../../../../inc/MarlinConfig.h"
|
||||||
|
|
||||||
extern lv_group_t * g;
|
extern lv_group_t * g;
|
||||||
static lv_obj_t * scr;
|
static lv_obj_t * scr;
|
||||||
|
@ -218,7 +218,7 @@ void lv_draw_machine_settings(void) {
|
||||||
lv_btn_set_layout(buttonBack, LV_LAYOUT_OFF);
|
lv_btn_set_layout(buttonBack, LV_LAYOUT_OFF);
|
||||||
label_Back = lv_label_create(buttonBack, NULL);
|
label_Back = lv_label_create(buttonBack, NULL);
|
||||||
|
|
||||||
if (gCfgItems.multiple_language != 0) {
|
if (gCfgItems.multiple_language) {
|
||||||
lv_label_set_text(label_Back, common_menu.text_back);
|
lv_label_set_text(label_Back, common_menu.text_back);
|
||||||
lv_obj_align(label_Back, buttonBack, LV_ALIGN_CENTER, 0, 0);
|
lv_obj_align(label_Back, buttonBack, LV_ALIGN_CENTER, 0, 0);
|
||||||
|
|
||||||
|
|
|
@ -23,14 +23,15 @@
|
||||||
|
|
||||||
#if HAS_TFT_LVGL_UI
|
#if HAS_TFT_LVGL_UI
|
||||||
|
|
||||||
#include "../../../../MarlinCore.h"
|
#include "draw_ui.h"
|
||||||
#include "lv_conf.h"
|
#include <lv_conf.h>
|
||||||
//#include "../lvgl/src/lv_objx/lv_imgbtn.h"
|
//#include "../lvgl/src/lv_objx/lv_imgbtn.h"
|
||||||
//#include "../lvgl/src/lv_objx/lv_img.h"
|
//#include "../lvgl/src/lv_objx/lv_img.h"
|
||||||
//#include "../lvgl/src/lv_core/lv_disp.h"
|
//#include "../lvgl/src/lv_core/lv_disp.h"
|
||||||
//#include "../lvgl/src/lv_core/lv_refr.h"
|
//#include "../lvgl/src/lv_core/lv_refr.h"
|
||||||
#include "draw_ui.h"
|
|
||||||
#include "../../../../gcode/queue.h"
|
#include "../../../../gcode/queue.h"
|
||||||
|
#include "../../../../inc/MarlinConfig.h"
|
||||||
|
|
||||||
extern lv_group_t * g;
|
extern lv_group_t * g;
|
||||||
static lv_obj_t * scr;
|
static lv_obj_t * scr;
|
||||||
|
@ -253,7 +254,7 @@ void lv_draw_manualLevel(void) {
|
||||||
lv_obj_t *label_Point5 = lv_label_create(buttonPoint5, NULL);
|
lv_obj_t *label_Point5 = lv_label_create(buttonPoint5, NULL);
|
||||||
lv_obj_t *label_Back = lv_label_create(buttonBack, NULL);
|
lv_obj_t *label_Back = lv_label_create(buttonBack, NULL);
|
||||||
|
|
||||||
if (gCfgItems.multiple_language != 0) {
|
if (gCfgItems.multiple_language) {
|
||||||
lv_label_set_text(label_Point1, leveling_menu.position1);
|
lv_label_set_text(label_Point1, leveling_menu.position1);
|
||||||
lv_obj_align(label_Point1, buttonPoint1, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET);
|
lv_obj_align(label_Point1, buttonPoint1, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET);
|
||||||
|
|
||||||
|
|
|
@ -23,11 +23,11 @@
|
||||||
|
|
||||||
#if HAS_TFT_LVGL_UI
|
#if HAS_TFT_LVGL_UI
|
||||||
|
|
||||||
#include "lv_conf.h"
|
|
||||||
#include "draw_ui.h"
|
#include "draw_ui.h"
|
||||||
|
#include <lv_conf.h>
|
||||||
|
|
||||||
#include "../../../../MarlinCore.h"
|
|
||||||
#include "../../../../module/planner.h"
|
#include "../../../../module/planner.h"
|
||||||
|
#include "../../../../inc/MarlinConfig.h"
|
||||||
|
|
||||||
extern lv_group_t * g;
|
extern lv_group_t * g;
|
||||||
static lv_obj_t * scr;
|
static lv_obj_t * scr;
|
||||||
|
@ -384,7 +384,7 @@ void lv_draw_manual_level_pos_settings(void) {
|
||||||
if (gCfgItems.encoder_enable) lv_group_add_obj(g, buttonBack);
|
if (gCfgItems.encoder_enable) lv_group_add_obj(g, buttonBack);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (gCfgItems.multiple_language != 0) {
|
if (gCfgItems.multiple_language) {
|
||||||
if (uiCfg.para_ui_page != 1) {
|
if (uiCfg.para_ui_page != 1) {
|
||||||
ZERO(public_buf_l);
|
ZERO(public_buf_l);
|
||||||
sprintf_P(public_buf_l, PSTR("%d"), gCfgItems.levelingPos[0][0]);
|
sprintf_P(public_buf_l, PSTR("%d"), gCfgItems.levelingPos[0][0]);
|
||||||
|
|
|
@ -23,11 +23,11 @@
|
||||||
|
|
||||||
#if HAS_TFT_LVGL_UI
|
#if HAS_TFT_LVGL_UI
|
||||||
|
|
||||||
#include "lv_conf.h"
|
|
||||||
#include "draw_ui.h"
|
#include "draw_ui.h"
|
||||||
|
#include <lv_conf.h>
|
||||||
|
|
||||||
#include "../../../../MarlinCore.h"
|
|
||||||
#include "../../../../module/planner.h"
|
#include "../../../../module/planner.h"
|
||||||
|
#include "../../../../inc/MarlinConfig.h"
|
||||||
|
|
||||||
extern lv_group_t * g;
|
extern lv_group_t * g;
|
||||||
static lv_obj_t * scr;
|
static lv_obj_t * scr;
|
||||||
|
@ -284,7 +284,7 @@ void lv_draw_max_feedrate_settings(void) {
|
||||||
if (gCfgItems.encoder_enable) lv_group_add_obj(g, buttonBack);
|
if (gCfgItems.encoder_enable) lv_group_add_obj(g, buttonBack);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (gCfgItems.multiple_language != 0) {
|
if (gCfgItems.multiple_language) {
|
||||||
if (uiCfg.para_ui_page != 1) {
|
if (uiCfg.para_ui_page != 1) {
|
||||||
|
|
||||||
lv_label_set_text(labelTurnPage, machine_menu.next);
|
lv_label_set_text(labelTurnPage, machine_menu.next);
|
||||||
|
|
|
@ -23,10 +23,10 @@
|
||||||
|
|
||||||
#if HAS_TFT_LVGL_UI
|
#if HAS_TFT_LVGL_UI
|
||||||
|
|
||||||
#include "lv_conf.h"
|
|
||||||
#include "draw_ui.h"
|
#include "draw_ui.h"
|
||||||
|
#include <lv_conf.h>
|
||||||
|
|
||||||
#include "../../../../MarlinCore.h"
|
#include "../../../../inc/MarlinConfig.h"
|
||||||
|
|
||||||
extern lv_group_t * g;
|
extern lv_group_t * g;
|
||||||
static lv_obj_t * scr;
|
static lv_obj_t * scr;
|
||||||
|
@ -310,7 +310,7 @@ void lv_draw_motor_settings(void) {
|
||||||
if (gCfgItems.encoder_enable) lv_group_add_obj(g, buttonBack);
|
if (gCfgItems.encoder_enable) lv_group_add_obj(g, buttonBack);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (gCfgItems.multiple_language != 0) {
|
if (gCfgItems.multiple_language) {
|
||||||
lv_label_set_text(label_Back, common_menu.text_back);
|
lv_label_set_text(label_Back, common_menu.text_back);
|
||||||
lv_obj_align(label_Back, buttonBack, LV_ALIGN_CENTER, 0, 0);
|
lv_obj_align(label_Back, buttonBack, LV_ALIGN_CENTER, 0, 0);
|
||||||
|
|
||||||
|
|
|
@ -23,14 +23,15 @@
|
||||||
|
|
||||||
#if HAS_TFT_LVGL_UI
|
#if HAS_TFT_LVGL_UI
|
||||||
|
|
||||||
#include "../../../../MarlinCore.h"
|
#include "draw_ui.h"
|
||||||
#include "lv_conf.h"
|
#include <lv_conf.h>
|
||||||
//#include "../lvgl/src/lv_objx/lv_imgbtn.h"
|
//#include "../lvgl/src/lv_objx/lv_imgbtn.h"
|
||||||
//#include "../lvgl/src/lv_objx/lv_img.h"
|
//#include "../lvgl/src/lv_objx/lv_img.h"
|
||||||
//#include "../lvgl/src/lv_core/lv_disp.h"
|
//#include "../lvgl/src/lv_core/lv_disp.h"
|
||||||
//#include "../lvgl/src/lv_core/lv_refr.h"
|
//#include "../lvgl/src/lv_core/lv_refr.h"
|
||||||
#include "draw_ui.h"
|
|
||||||
#include "../../../../gcode/queue.h"
|
#include "../../../../gcode/queue.h"
|
||||||
|
#include "../../../../inc/MarlinConfig.h"
|
||||||
|
|
||||||
extern lv_group_t * g;
|
extern lv_group_t * g;
|
||||||
static lv_obj_t * scr;
|
static lv_obj_t * scr;
|
||||||
|
@ -268,7 +269,7 @@ void lv_draw_move_motor(void) {
|
||||||
labelV = lv_label_create(buttonV, NULL);
|
labelV = lv_label_create(buttonV, NULL);
|
||||||
lv_obj_t *label_Back = lv_label_create(buttonBack, NULL);
|
lv_obj_t *label_Back = lv_label_create(buttonBack, NULL);
|
||||||
|
|
||||||
if (gCfgItems.multiple_language != 0) {
|
if (gCfgItems.multiple_language) {
|
||||||
lv_label_set_text(labelXI, move_menu.x_add);
|
lv_label_set_text(labelXI, move_menu.x_add);
|
||||||
lv_obj_align(labelXI, buttonXI, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET);
|
lv_obj_align(labelXI, buttonXI, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET);
|
||||||
|
|
||||||
|
@ -321,7 +322,7 @@ void disp_move_dist() {
|
||||||
lv_imgbtn_set_src(buttonV, LV_BTN_STATE_REL, "F:/bmp_step_move10.bin");
|
lv_imgbtn_set_src(buttonV, LV_BTN_STATE_REL, "F:/bmp_step_move10.bin");
|
||||||
lv_imgbtn_set_src(buttonV, LV_BTN_STATE_PR, "F:/bmp_step_move10.bin");
|
lv_imgbtn_set_src(buttonV, LV_BTN_STATE_PR, "F:/bmp_step_move10.bin");
|
||||||
}
|
}
|
||||||
if (gCfgItems.multiple_language != 0) {
|
if (gCfgItems.multiple_language) {
|
||||||
if ((int)(10 * uiCfg.move_dist) == 1) {
|
if ((int)(10 * uiCfg.move_dist) == 1) {
|
||||||
lv_label_set_text(labelV, move_menu.step_01mm);
|
lv_label_set_text(labelV, move_menu.step_01mm);
|
||||||
lv_obj_align(labelV, buttonV, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET);
|
lv_obj_align(labelV, buttonV, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET);
|
||||||
|
|
|
@ -23,25 +23,23 @@
|
||||||
|
|
||||||
#if HAS_TFT_LVGL_UI
|
#if HAS_TFT_LVGL_UI
|
||||||
|
|
||||||
#include "lv_conf.h"
|
#include "draw_ui.h"
|
||||||
|
#include <lv_conf.h>
|
||||||
//#include "../../lvgl/src/lv_objx/lv_imgbtn.h"
|
//#include "../../lvgl/src/lv_objx/lv_imgbtn.h"
|
||||||
//#include "../../lvgl/src/lv_objx/lv_img.h"
|
//#include "../../lvgl/src/lv_objx/lv_img.h"
|
||||||
//#include "../../lvgl/src/lv_core/lv_disp.h"
|
//#include "../../lvgl/src/lv_core/lv_disp.h"
|
||||||
//#include "../../lvgl/src/lv_core/lv_refr.h"
|
//#include "../../lvgl/src/lv_core/lv_refr.h"
|
||||||
//#include "../../MarlinCore.h"
|
|
||||||
#include "draw_ui.h"
|
|
||||||
|
|
||||||
#include "../../../../MarlinCore.h"
|
#include "../../../../gcode/gcode.h"
|
||||||
#include "../../../../module/temperature.h"
|
|
||||||
#include "../../../../gcode/queue.h"
|
#include "../../../../gcode/queue.h"
|
||||||
|
#include "../../../../module/planner.h"
|
||||||
|
#include "../../../../module/temperature.h"
|
||||||
|
#include "../../../../inc/MarlinConfig.h"
|
||||||
|
|
||||||
#if ENABLED(POWER_LOSS_RECOVERY)
|
#if ENABLED(POWER_LOSS_RECOVERY)
|
||||||
#include "../../../../feature/powerloss.h"
|
#include "../../../../feature/powerloss.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "../../../../gcode/gcode.h"
|
|
||||||
#include "../../../../module/planner.h"
|
|
||||||
|
|
||||||
#if HAS_TRINAMIC_CONFIG
|
#if HAS_TRINAMIC_CONFIG
|
||||||
#include "../../../../module/stepper/indirection.h"
|
#include "../../../../module/stepper/indirection.h"
|
||||||
#include "../../../../feature/tmc_util.h"
|
#include "../../../../feature/tmc_util.h"
|
||||||
|
|
|
@ -23,17 +23,17 @@
|
||||||
|
|
||||||
#if HAS_TFT_LVGL_UI
|
#if HAS_TFT_LVGL_UI
|
||||||
|
|
||||||
#include "lv_conf.h"
|
|
||||||
#include "draw_ui.h"
|
#include "draw_ui.h"
|
||||||
|
#include <lv_conf.h>
|
||||||
//#include "../lvgl/src/lv_objx/lv_imgbtn.h"
|
//#include "../lvgl/src/lv_objx/lv_imgbtn.h"
|
||||||
//#include "../lvgl/src/lv_objx/lv_img.h"
|
//#include "../lvgl/src/lv_objx/lv_img.h"
|
||||||
//#include "../lvgl/src/lv_core/lv_disp.h"
|
//#include "../lvgl/src/lv_core/lv_disp.h"
|
||||||
//#include "../lvgl/src/lv_core/lv_refr.h"
|
//#include "../lvgl/src/lv_core/lv_refr.h"
|
||||||
|
|
||||||
#include "../../../../MarlinCore.h"
|
|
||||||
#include "../../../../module/temperature.h"
|
#include "../../../../module/temperature.h"
|
||||||
#include "../../../../module/motion.h"
|
#include "../../../../module/motion.h"
|
||||||
#include "../../../../sd/cardreader.h"
|
#include "../../../../sd/cardreader.h"
|
||||||
|
#include "../../../../inc/MarlinConfig.h"
|
||||||
|
|
||||||
extern lv_group_t * g;
|
extern lv_group_t * g;
|
||||||
static lv_obj_t * scr;
|
static lv_obj_t * scr;
|
||||||
|
@ -135,25 +135,22 @@ static void event_handler(lv_obj_t * obj, lv_event_t event) {
|
||||||
// nothing to do
|
// nothing to do
|
||||||
}
|
}
|
||||||
else if (event == LV_EVENT_RELEASED) {
|
else if (event == LV_EVENT_RELEASED) {
|
||||||
if (gCfgItems.finish_power_off == 1) {
|
if (gCfgItems.finish_power_off) {
|
||||||
gCfgItems.finish_power_off = 0;
|
gCfgItems.finish_power_off = false;
|
||||||
lv_imgbtn_set_src(buttonPowerOff, LV_BTN_STATE_REL, "F:/bmp_manual_off.bin");
|
lv_imgbtn_set_src(buttonPowerOff, LV_BTN_STATE_REL, "F:/bmp_manual_off.bin");
|
||||||
lv_imgbtn_set_src(buttonPowerOff, LV_BTN_STATE_PR, "F:/bmp_manual_off.bin");
|
lv_imgbtn_set_src(buttonPowerOff, LV_BTN_STATE_PR, "F:/bmp_manual_off.bin");
|
||||||
lv_label_set_text(label_PowerOff, printing_more_menu.manual);
|
lv_label_set_text(label_PowerOff, printing_more_menu.manual);
|
||||||
lv_obj_align(label_PowerOff, buttonPowerOff, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET);
|
|
||||||
lv_obj_refresh_ext_draw_pad(label_PowerOff);
|
|
||||||
update_spi_flash();
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
gCfgItems.finish_power_off = 1;
|
gCfgItems.finish_power_off = true;
|
||||||
lv_imgbtn_set_src(buttonPowerOff, LV_BTN_STATE_REL, "F:/bmp_auto_off.bin");
|
lv_imgbtn_set_src(buttonPowerOff, LV_BTN_STATE_REL, "F:/bmp_auto_off.bin");
|
||||||
lv_imgbtn_set_src(buttonPowerOff, LV_BTN_STATE_PR, "F:/bmp_auto_off.bin");
|
lv_imgbtn_set_src(buttonPowerOff, LV_BTN_STATE_PR, "F:/bmp_auto_off.bin");
|
||||||
lv_label_set_text(label_PowerOff, printing_more_menu.auto_close);
|
lv_label_set_text(label_PowerOff, printing_more_menu.auto_close);
|
||||||
|
}
|
||||||
lv_obj_align(label_PowerOff, buttonPowerOff, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET);
|
lv_obj_align(label_PowerOff, buttonPowerOff, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET);
|
||||||
lv_obj_refresh_ext_draw_pad(label_PowerOff);
|
lv_obj_refresh_ext_draw_pad(label_PowerOff);
|
||||||
update_spi_flash();
|
update_spi_flash();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case ID_O_BABY_STEP:
|
case ID_O_BABY_STEP:
|
||||||
if (event == LV_EVENT_CLICKED) {
|
if (event == LV_EVENT_CLICKED) {
|
||||||
|
@ -229,7 +226,7 @@ void lv_draw_operation(void) {
|
||||||
lv_imgbtn_set_style(buttonFan, LV_BTN_STATE_PR, &tft_style_label_pre);
|
lv_imgbtn_set_style(buttonFan, LV_BTN_STATE_PR, &tft_style_label_pre);
|
||||||
lv_imgbtn_set_style(buttonFan, LV_BTN_STATE_REL, &tft_style_label_rel);
|
lv_imgbtn_set_style(buttonFan, LV_BTN_STATE_REL, &tft_style_label_rel);
|
||||||
|
|
||||||
if (gCfgItems.finish_power_off == 1) {
|
if (gCfgItems.finish_power_off) {
|
||||||
lv_imgbtn_set_src(buttonPowerOff, LV_BTN_STATE_REL, "F:/bmp_auto_off.bin");
|
lv_imgbtn_set_src(buttonPowerOff, LV_BTN_STATE_REL, "F:/bmp_auto_off.bin");
|
||||||
lv_imgbtn_set_src(buttonPowerOff, LV_BTN_STATE_PR, "F:/bmp_auto_off.bin");
|
lv_imgbtn_set_src(buttonPowerOff, LV_BTN_STATE_PR, "F:/bmp_auto_off.bin");
|
||||||
}
|
}
|
||||||
|
@ -362,7 +359,7 @@ void lv_draw_operation(void) {
|
||||||
}
|
}
|
||||||
label_Back = lv_label_create(buttonBack, NULL);
|
label_Back = lv_label_create(buttonBack, NULL);
|
||||||
|
|
||||||
if (gCfgItems.multiple_language != 0) {
|
if (gCfgItems.multiple_language) {
|
||||||
lv_label_set_text(labelPreHeat, operation_menu.temp);
|
lv_label_set_text(labelPreHeat, operation_menu.temp);
|
||||||
lv_obj_align(labelPreHeat, buttonPreHeat, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET);
|
lv_obj_align(labelPreHeat, buttonPreHeat, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET);
|
||||||
|
|
||||||
|
@ -372,7 +369,7 @@ void lv_draw_operation(void) {
|
||||||
lv_label_set_text(label_Fan, operation_menu.fan);
|
lv_label_set_text(label_Fan, operation_menu.fan);
|
||||||
lv_obj_align(label_Fan, buttonFan, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET);
|
lv_obj_align(label_Fan, buttonFan, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET);
|
||||||
|
|
||||||
if (gCfgItems.finish_power_off == 1)
|
if (gCfgItems.finish_power_off)
|
||||||
lv_label_set_text(label_PowerOff, printing_more_menu.auto_close);
|
lv_label_set_text(label_PowerOff, printing_more_menu.auto_close);
|
||||||
else
|
else
|
||||||
lv_label_set_text(label_PowerOff, printing_more_menu.manual);
|
lv_label_set_text(label_PowerOff, printing_more_menu.manual);
|
||||||
|
|
|
@ -24,14 +24,14 @@
|
||||||
#if BOTH(HAS_TFT_LVGL_UI, ADVANCED_PAUSE_FEATURE)
|
#if BOTH(HAS_TFT_LVGL_UI, ADVANCED_PAUSE_FEATURE)
|
||||||
|
|
||||||
#include "draw_ui.h"
|
#include "draw_ui.h"
|
||||||
#include "lv_conf.h"
|
#include <lv_conf.h>
|
||||||
//#include "../lvgl/src/lv_objx/lv_imgbtn.h"
|
//#include "../lvgl/src/lv_objx/lv_imgbtn.h"
|
||||||
//#include "../lvgl/src/lv_objx/lv_img.h"
|
//#include "../lvgl/src/lv_objx/lv_img.h"
|
||||||
//#include "../lvgl/src/lv_core/lv_disp.h"
|
//#include "../lvgl/src/lv_core/lv_disp.h"
|
||||||
//#include "../lvgl/src/lv_core/lv_refr.h"
|
//#include "../lvgl/src/lv_core/lv_refr.h"
|
||||||
|
|
||||||
#include "../../../../MarlinCore.h"
|
|
||||||
#include "../../../../feature/pause.h"
|
#include "../../../../feature/pause.h"
|
||||||
|
#include "../../../../inc/MarlinConfig.h"
|
||||||
|
|
||||||
void lv_draw_pause_message(const PauseMessage msg) {
|
void lv_draw_pause_message(const PauseMessage msg) {
|
||||||
switch (msg) {
|
switch (msg) {
|
||||||
|
|
|
@ -23,11 +23,11 @@
|
||||||
|
|
||||||
#if HAS_TFT_LVGL_UI
|
#if HAS_TFT_LVGL_UI
|
||||||
|
|
||||||
#include "lv_conf.h"
|
|
||||||
#include "draw_ui.h"
|
#include "draw_ui.h"
|
||||||
|
#include <lv_conf.h>
|
||||||
|
|
||||||
#include "../../../../MarlinCore.h"
|
|
||||||
#include "../../../../module/planner.h"
|
#include "../../../../module/planner.h"
|
||||||
|
#include "../../../../inc/MarlinConfig.h"
|
||||||
|
|
||||||
extern lv_group_t * g;
|
extern lv_group_t * g;
|
||||||
static lv_obj_t * scr;
|
static lv_obj_t * scr;
|
||||||
|
@ -163,7 +163,7 @@ void lv_draw_pause_position(void) {
|
||||||
lv_btn_set_style(buttonBack, LV_BTN_STYLE_PR, &style_para_back);
|
lv_btn_set_style(buttonBack, LV_BTN_STYLE_PR, &style_para_back);
|
||||||
label_Back = lv_label_create(buttonBack, NULL);
|
label_Back = lv_label_create(buttonBack, NULL);
|
||||||
|
|
||||||
if (gCfgItems.multiple_language != 0) {
|
if (gCfgItems.multiple_language) {
|
||||||
ZERO(public_buf_l);
|
ZERO(public_buf_l);
|
||||||
sprintf_P(public_buf_l, PSTR("%.1f"), gCfgItems.pausePosX);
|
sprintf_P(public_buf_l, PSTR("%.1f"), gCfgItems.pausePosX);
|
||||||
lv_label_set_text(labelXValue, public_buf_l);
|
lv_label_set_text(labelXValue, public_buf_l);
|
||||||
|
|
|
@ -23,15 +23,15 @@
|
||||||
|
|
||||||
#if HAS_TFT_LVGL_UI
|
#if HAS_TFT_LVGL_UI
|
||||||
|
|
||||||
#include "lv_conf.h"
|
|
||||||
#include "draw_ui.h"
|
#include "draw_ui.h"
|
||||||
|
#include <lv_conf.h>
|
||||||
//#include "../lvgl/src/lv_objx/lv_imgbtn.h"
|
//#include "../lvgl/src/lv_objx/lv_imgbtn.h"
|
||||||
//#include "../lvgl/src/lv_objx/lv_img.h"
|
//#include "../lvgl/src/lv_objx/lv_img.h"
|
||||||
//#include "../lvgl/src/lv_core/lv_disp.h"
|
//#include "../lvgl/src/lv_core/lv_disp.h"
|
||||||
//#include "../lvgl/src/lv_core/lv_refr.h"
|
//#include "../lvgl/src/lv_core/lv_refr.h"
|
||||||
|
|
||||||
#include "../../../../MarlinCore.h"
|
|
||||||
#include "../../../../module/temperature.h"
|
#include "../../../../module/temperature.h"
|
||||||
|
#include "../../../../inc/MarlinConfig.h"
|
||||||
|
|
||||||
static lv_obj_t * scr;
|
static lv_obj_t * scr;
|
||||||
extern lv_group_t* g;
|
extern lv_group_t* g;
|
||||||
|
@ -275,7 +275,7 @@ void lv_draw_preHeat(void) {
|
||||||
lv_obj_t *labelOff = lv_label_create(buttonOff, NULL);
|
lv_obj_t *labelOff = lv_label_create(buttonOff, NULL);
|
||||||
lv_obj_t *label_Back = lv_label_create(buttonBack, NULL);
|
lv_obj_t *label_Back = lv_label_create(buttonBack, NULL);
|
||||||
|
|
||||||
if (gCfgItems.multiple_language != 0) {
|
if (gCfgItems.multiple_language) {
|
||||||
lv_label_set_text(labelAdd, preheat_menu.add);
|
lv_label_set_text(labelAdd, preheat_menu.add);
|
||||||
lv_obj_align(labelAdd, buttonAdd, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET);
|
lv_obj_align(labelAdd, buttonAdd, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET);
|
||||||
|
|
||||||
|
@ -312,7 +312,7 @@ void disp_temp_type() {
|
||||||
if (uiCfg.curSprayerChoose == 1) {
|
if (uiCfg.curSprayerChoose == 1) {
|
||||||
lv_imgbtn_set_src(buttoType, LV_BTN_STATE_REL, "F:/bmp_extru2.bin");
|
lv_imgbtn_set_src(buttoType, LV_BTN_STATE_REL, "F:/bmp_extru2.bin");
|
||||||
lv_imgbtn_set_src(buttoType, LV_BTN_STATE_PR, "F:/bmp_extru2.bin");
|
lv_imgbtn_set_src(buttoType, LV_BTN_STATE_PR, "F:/bmp_extru2.bin");
|
||||||
if (gCfgItems.multiple_language != 0) {
|
if (gCfgItems.multiple_language) {
|
||||||
lv_label_set_text(labelType, preheat_menu.ext2);
|
lv_label_set_text(labelType, preheat_menu.ext2);
|
||||||
lv_obj_align(labelType, buttoType, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET);
|
lv_obj_align(labelType, buttoType, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET);
|
||||||
}
|
}
|
||||||
|
@ -320,7 +320,7 @@ void disp_temp_type() {
|
||||||
else {
|
else {
|
||||||
lv_imgbtn_set_src(buttoType, LV_BTN_STATE_REL, "F:/bmp_extru1.bin");
|
lv_imgbtn_set_src(buttoType, LV_BTN_STATE_REL, "F:/bmp_extru1.bin");
|
||||||
lv_imgbtn_set_src(buttoType, LV_BTN_STATE_PR, "F:/bmp_extru1.bin");
|
lv_imgbtn_set_src(buttoType, LV_BTN_STATE_PR, "F:/bmp_extru1.bin");
|
||||||
if (gCfgItems.multiple_language != 0) {
|
if (gCfgItems.multiple_language) {
|
||||||
lv_label_set_text(labelType, preheat_menu.ext1);
|
lv_label_set_text(labelType, preheat_menu.ext1);
|
||||||
lv_obj_align(labelType, buttoType, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET);
|
lv_obj_align(labelType, buttoType, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET);
|
||||||
}
|
}
|
||||||
|
@ -330,7 +330,7 @@ void disp_temp_type() {
|
||||||
else {
|
else {
|
||||||
lv_imgbtn_set_src(buttoType, LV_BTN_STATE_REL, "F:/bmp_bed.bin");
|
lv_imgbtn_set_src(buttoType, LV_BTN_STATE_REL, "F:/bmp_bed.bin");
|
||||||
lv_imgbtn_set_src(buttoType, LV_BTN_STATE_PR, "F:/bmp_bed.bin");
|
lv_imgbtn_set_src(buttoType, LV_BTN_STATE_PR, "F:/bmp_bed.bin");
|
||||||
if (gCfgItems.multiple_language != 0) {
|
if (gCfgItems.multiple_language) {
|
||||||
lv_label_set_text(labelType, preheat_menu.hotbed);
|
lv_label_set_text(labelType, preheat_menu.hotbed);
|
||||||
lv_obj_align(labelType, buttoType, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET);
|
lv_obj_align(labelType, buttoType, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET);
|
||||||
}
|
}
|
||||||
|
@ -375,7 +375,7 @@ void disp_step_heat() {
|
||||||
lv_imgbtn_set_src(buttonStep, LV_BTN_STATE_PR, "F:/bmp_step10_degree.bin");
|
lv_imgbtn_set_src(buttonStep, LV_BTN_STATE_PR, "F:/bmp_step10_degree.bin");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gCfgItems.multiple_language != 0) {
|
if (gCfgItems.multiple_language) {
|
||||||
if (uiCfg.stepHeat == 1) {
|
if (uiCfg.stepHeat == 1) {
|
||||||
lv_label_set_text(labelStep, preheat_menu.step_1c);
|
lv_label_set_text(labelStep, preheat_menu.step_1c);
|
||||||
lv_obj_align(labelStep, buttonStep, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET);
|
lv_obj_align(labelStep, buttonStep, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET);
|
||||||
|
|
|
@ -23,14 +23,15 @@
|
||||||
|
|
||||||
#if HAS_TFT_LVGL_UI
|
#if HAS_TFT_LVGL_UI
|
||||||
|
|
||||||
#include "../../../../MarlinCore.h"
|
#include "draw_ui.h"
|
||||||
#include "lv_conf.h"
|
#include <lv_conf.h>
|
||||||
//#include "../lvgl/src/lv_objx/lv_imgbtn.h"
|
//#include "../lvgl/src/lv_objx/lv_imgbtn.h"
|
||||||
//#include "../lvgl/src/lv_objx/lv_img.h"
|
//#include "../lvgl/src/lv_objx/lv_img.h"
|
||||||
//#include "../lvgl/src/lv_core/lv_disp.h"
|
//#include "../lvgl/src/lv_core/lv_disp.h"
|
||||||
//#include "../lvgl/src/lv_core/lv_refr.h"
|
//#include "../lvgl/src/lv_core/lv_refr.h"
|
||||||
#include "draw_ui.h"
|
|
||||||
#include "../../../../sd/cardreader.h"
|
#include "../../../../sd/cardreader.h"
|
||||||
|
#include "../../../../inc/MarlinConfig.h"
|
||||||
|
|
||||||
static lv_obj_t * scr;
|
static lv_obj_t * scr;
|
||||||
extern lv_group_t* g;
|
extern lv_group_t* g;
|
||||||
|
@ -270,7 +271,7 @@ void lv_draw_print_file(void) {
|
||||||
//lv_obj_t *label_Back = lv_label_create(buttonBack, NULL);
|
//lv_obj_t *label_Back = lv_label_create(buttonBack, NULL);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
if (gCfgItems.multiple_language != 0) {
|
if (gCfgItems.multiple_language) {
|
||||||
lv_label_set_text(labelPageUp, tool_menu.preheat);
|
lv_label_set_text(labelPageUp, tool_menu.preheat);
|
||||||
lv_obj_align(labelPageUp, buttonPageUp, LV_ALIGN_IN_BOTTOM_MID,0, BUTTON_TEXT_Y_OFFSET);
|
lv_obj_align(labelPageUp, buttonPageUp, LV_ALIGN_IN_BOTTOM_MID,0, BUTTON_TEXT_Y_OFFSET);
|
||||||
|
|
||||||
|
|
|
@ -23,23 +23,25 @@
|
||||||
|
|
||||||
#if HAS_TFT_LVGL_UI
|
#if HAS_TFT_LVGL_UI
|
||||||
|
|
||||||
#include "lv_conf.h"
|
|
||||||
#include "draw_ui.h"
|
#include "draw_ui.h"
|
||||||
|
#include <lv_conf.h>
|
||||||
//#include "../lvgl/src/lv_objx/lv_imgbtn.h"
|
//#include "../lvgl/src/lv_objx/lv_imgbtn.h"
|
||||||
//#include "../lvgl/src/lv_objx/lv_img.h"
|
//#include "../lvgl/src/lv_objx/lv_img.h"
|
||||||
//#include "../lvgl/src/lv_core/lv_disp.h"
|
//#include "../lvgl/src/lv_core/lv_disp.h"
|
||||||
//#include "../lvgl/src/lv_core/lv_refr.h"
|
//#include "../lvgl/src/lv_core/lv_refr.h"
|
||||||
|
|
||||||
#include "../../../../MarlinCore.h"
|
#include "../../../../MarlinCore.h" // for marlin_state
|
||||||
#include "../../../../module/temperature.h"
|
#include "../../../../module/temperature.h"
|
||||||
#include "../../../../module/motion.h"
|
#include "../../../../module/motion.h"
|
||||||
#include "../../../../sd/cardreader.h"
|
#include "../../../../sd/cardreader.h"
|
||||||
#include "../../../../gcode/queue.h"
|
#include "../../../../gcode/queue.h"
|
||||||
#include "../../../../gcode/gcode.h"
|
#include "../../../../gcode/gcode.h"
|
||||||
|
#include "../../../../inc/MarlinConfig.h"
|
||||||
|
|
||||||
#if ENABLED(POWER_LOSS_RECOVERY)
|
#if ENABLED(POWER_LOSS_RECOVERY)
|
||||||
#include "../../../../feature/powerloss.h"
|
#include "../../../../feature/powerloss.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if BOTH(LCD_SET_PROGRESS_MANUALLY, USE_M73_REMAINING_TIME)
|
#if BOTH(LCD_SET_PROGRESS_MANUALLY, USE_M73_REMAINING_TIME)
|
||||||
#include "../../../marlinui.h"
|
#include "../../../marlinui.h"
|
||||||
#endif
|
#endif
|
||||||
|
@ -60,11 +62,9 @@ static lv_obj_t * buttonPause, *buttonOperat, *buttonStop;
|
||||||
#define ID_STOP 2
|
#define ID_STOP 2
|
||||||
#define ID_OPTION 3
|
#define ID_OPTION 3
|
||||||
|
|
||||||
uint8_t once_flag = 0;
|
bool once_flag; // = false
|
||||||
|
extern bool flash_preview_begin, default_preview_flg, gcode_preview_over;
|
||||||
extern uint32_t To_pre_view;
|
extern uint32_t To_pre_view;
|
||||||
extern uint8_t flash_preview_begin;
|
|
||||||
extern uint8_t default_preview_flg;
|
|
||||||
extern uint8_t gcode_preview_over;
|
|
||||||
|
|
||||||
static void event_handler(lv_obj_t * obj, lv_event_t event) {
|
static void event_handler(lv_obj_t * obj, lv_event_t event) {
|
||||||
switch (obj->mks_obj_id) {
|
switch (obj->mks_obj_id) {
|
||||||
|
@ -73,7 +73,7 @@ static void event_handler(lv_obj_t * obj, lv_event_t event) {
|
||||||
// nothing to do
|
// nothing to do
|
||||||
}
|
}
|
||||||
else if (event == LV_EVENT_RELEASED) {
|
else if (event == LV_EVENT_RELEASED) {
|
||||||
if (gcode_preview_over != 1) {
|
if (!gcode_preview_over) {
|
||||||
if (uiCfg.print_state == WORKING) {
|
if (uiCfg.print_state == WORKING) {
|
||||||
// #if ENABLED(PARK_HEAD_ON_PAUSE)
|
// #if ENABLED(PARK_HEAD_ON_PAUSE)
|
||||||
// queue.inject_P(PSTR("M25 P\nM24"));
|
// queue.inject_P(PSTR("M25 P\nM24"));
|
||||||
|
@ -117,7 +117,7 @@ static void event_handler(lv_obj_t * obj, lv_event_t event) {
|
||||||
// nothing to do
|
// nothing to do
|
||||||
}
|
}
|
||||||
else if (event == LV_EVENT_RELEASED) {
|
else if (event == LV_EVENT_RELEASED) {
|
||||||
if (gcode_preview_over != 1) {
|
if (!gcode_preview_over) {
|
||||||
lv_clear_printing();
|
lv_clear_printing();
|
||||||
lv_draw_dialog(DIALOG_TYPE_STOP);
|
lv_draw_dialog(DIALOG_TYPE_STOP);
|
||||||
}
|
}
|
||||||
|
@ -128,7 +128,7 @@ static void event_handler(lv_obj_t * obj, lv_event_t event) {
|
||||||
// nothing to do
|
// nothing to do
|
||||||
}
|
}
|
||||||
else if (event == LV_EVENT_RELEASED) {
|
else if (event == LV_EVENT_RELEASED) {
|
||||||
if (gcode_preview_over != 1) {
|
if (!gcode_preview_over) {
|
||||||
lv_clear_printing();
|
lv_clear_printing();
|
||||||
lv_draw_operation();
|
lv_draw_operation();
|
||||||
}
|
}
|
||||||
|
@ -290,7 +290,7 @@ void lv_draw_printing(void) {
|
||||||
labelStop = lv_label_create(buttonStop, NULL);
|
labelStop = lv_label_create(buttonStop, NULL);
|
||||||
labelOperat = lv_label_create(buttonOperat, NULL);
|
labelOperat = lv_label_create(buttonOperat, NULL);
|
||||||
|
|
||||||
if (gCfgItems.multiple_language != 0) {
|
if (gCfgItems.multiple_language) {
|
||||||
lv_label_set_text(labelPause, uiCfg.print_state == WORKING ? printing_menu.pause : printing_menu.resume);
|
lv_label_set_text(labelPause, uiCfg.print_state == WORKING ? printing_menu.pause : printing_menu.resume);
|
||||||
lv_obj_align(labelPause, buttonPause, LV_ALIGN_CENTER, 20, 0);
|
lv_obj_align(labelPause, buttonPause, LV_ALIGN_CENTER, 20, 0);
|
||||||
|
|
||||||
|
@ -378,7 +378,7 @@ void setProBarRate() {
|
||||||
int rate;
|
int rate;
|
||||||
volatile long long rate_tmp_r;
|
volatile long long rate_tmp_r;
|
||||||
|
|
||||||
if (gCfgItems.from_flash_pic != 1) {
|
if (!gCfgItems.from_flash_pic) {
|
||||||
#if ENABLED(SDSUPPORT)
|
#if ENABLED(SDSUPPORT)
|
||||||
rate_tmp_r = (long long)card.getIndex() * 100;
|
rate_tmp_r = (long long)card.getIndex() * 100;
|
||||||
#endif
|
#endif
|
||||||
|
@ -405,15 +405,15 @@ void setProBarRate() {
|
||||||
if (once_flag == 0) {
|
if (once_flag == 0) {
|
||||||
stop_print_time();
|
stop_print_time();
|
||||||
|
|
||||||
flash_preview_begin = 0;
|
flash_preview_begin = false;
|
||||||
default_preview_flg = 0;
|
default_preview_flg = false;
|
||||||
lv_clear_printing();
|
lv_clear_printing();
|
||||||
lv_draw_dialog(DIALOG_TYPE_FINISH_PRINT);
|
lv_draw_dialog(DIALOG_TYPE_FINISH_PRINT);
|
||||||
|
|
||||||
once_flag = 1;
|
once_flag = true;
|
||||||
|
|
||||||
#if HAS_SUICIDE
|
#if HAS_SUICIDE
|
||||||
if (gCfgItems.finish_power_off == 1) {
|
if (gCfgItems.finish_power_off) {
|
||||||
gcode.process_subcommands_now_P(PSTR("M1001"));
|
gcode.process_subcommands_now_P(PSTR("M1001"));
|
||||||
queue.inject_P(PSTR("M81"));
|
queue.inject_P(PSTR("M81"));
|
||||||
marlin_state = MF_RUNNING;
|
marlin_state = MF_RUNNING;
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
|
|
||||||
#include "draw_ready_print.h"
|
#include "draw_ready_print.h"
|
||||||
#include "draw_tool.h"
|
#include "draw_tool.h"
|
||||||
#include "lv_conf.h"
|
#include <lv_conf.h>
|
||||||
//#include "../lvgl/src/lv_objx/lv_imgbtn.h"
|
//#include "../lvgl/src/lv_objx/lv_imgbtn.h"
|
||||||
//#include "../lvgl/src/lv_objx/lv_img.h"
|
//#include "../lvgl/src/lv_objx/lv_img.h"
|
||||||
//#include "../lvgl/src/lv_core/lv_disp.h"
|
//#include "../lvgl/src/lv_core/lv_disp.h"
|
||||||
|
@ -36,8 +36,8 @@
|
||||||
|
|
||||||
#include <lvgl.h>
|
#include <lvgl.h>
|
||||||
|
|
||||||
#include "../../../../MarlinCore.h"
|
|
||||||
#include "../../../../module/temperature.h"
|
#include "../../../../module/temperature.h"
|
||||||
|
#include "../../../../inc/MarlinConfig.h"
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
|
@ -186,7 +186,7 @@ void lv_draw_ready_print(void) {
|
||||||
//lv_obj_t *label_print = lv_label_create(buttonPrint, NULL);
|
//lv_obj_t *label_print = lv_label_create(buttonPrint, NULL);
|
||||||
//lv_obj_t *label_set = lv_label_create(buttonSet, NULL);
|
//lv_obj_t *label_set = lv_label_create(buttonSet, NULL);
|
||||||
lv_obj_t *label_tool = lv_label_create(buttonTool, NULL);
|
lv_obj_t *label_tool = lv_label_create(buttonTool, NULL);
|
||||||
if (gCfgItems.multiple_language != 0) {
|
if (gCfgItems.multiple_language) {
|
||||||
//lv_label_set_text(label_print, main_menu.print);
|
//lv_label_set_text(label_print, main_menu.print);
|
||||||
//lv_obj_align(label_print, buttonPrint, LV_ALIGN_IN_BOTTOM_MID,0, BUTTON_TEXT_Y_OFFSET);
|
//lv_obj_align(label_print, buttonPrint, LV_ALIGN_IN_BOTTOM_MID,0, BUTTON_TEXT_Y_OFFSET);
|
||||||
|
|
||||||
|
@ -279,7 +279,7 @@ void lv_draw_ready_print(void) {
|
||||||
lv_obj_t *label_print = lv_label_create(buttonPrint, NULL);
|
lv_obj_t *label_print = lv_label_create(buttonPrint, NULL);
|
||||||
lv_btn_set_layout(buttonPrint, LV_LAYOUT_OFF);
|
lv_btn_set_layout(buttonPrint, LV_LAYOUT_OFF);
|
||||||
|
|
||||||
if (gCfgItems.multiple_language != 0) {
|
if (gCfgItems.multiple_language) {
|
||||||
lv_label_set_text(label_print, main_menu.print);
|
lv_label_set_text(label_print, main_menu.print);
|
||||||
lv_obj_align(label_print, buttonPrint, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET);
|
lv_obj_align(label_print, buttonPrint, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET);
|
||||||
|
|
||||||
|
|
|
@ -23,18 +23,20 @@
|
||||||
|
|
||||||
#if HAS_TFT_LVGL_UI
|
#if HAS_TFT_LVGL_UI
|
||||||
|
|
||||||
#include "../../../../MarlinCore.h"
|
|
||||||
#include "draw_ready_print.h"
|
#include "draw_ready_print.h"
|
||||||
#include "draw_set.h"
|
#include "draw_set.h"
|
||||||
#include "lv_conf.h"
|
#include "draw_ui.h"
|
||||||
|
#include <lv_conf.h>
|
||||||
//#include "../lvgl/src/lv_objx/lv_imgbtn.h"
|
//#include "../lvgl/src/lv_objx/lv_imgbtn.h"
|
||||||
//#include "../lvgl/src/lv_objx/lv_img.h"
|
//#include "../lvgl/src/lv_objx/lv_img.h"
|
||||||
//#include "../lvgl/src/lv_core/lv_disp.h"
|
//#include "../lvgl/src/lv_core/lv_disp.h"
|
||||||
//#include "../lvgl/src/lv_core/lv_refr.h"
|
//#include "../lvgl/src/lv_core/lv_refr.h"
|
||||||
#include "draw_ui.h"
|
|
||||||
#include "../../../../gcode/queue.h"
|
|
||||||
#include "pic_manager.h"
|
#include "pic_manager.h"
|
||||||
|
|
||||||
|
#include "../../../../gcode/queue.h"
|
||||||
|
#include "../../../../inc/MarlinConfig.h"
|
||||||
|
|
||||||
static lv_obj_t * scr;
|
static lv_obj_t * scr;
|
||||||
extern lv_group_t* g;
|
extern lv_group_t* g;
|
||||||
|
|
||||||
|
@ -331,7 +333,7 @@ void lv_draw_set(void) {
|
||||||
#endif
|
#endif
|
||||||
lv_obj_t *label_Back = lv_label_create(buttonBack, NULL);
|
lv_obj_t *label_Back = lv_label_create(buttonBack, NULL);
|
||||||
|
|
||||||
if (gCfgItems.multiple_language != 0) {
|
if (gCfgItems.multiple_language) {
|
||||||
|
|
||||||
lv_label_set_text(label_EepromSet, set_menu.eepromSet);
|
lv_label_set_text(label_EepromSet, set_menu.eepromSet);
|
||||||
lv_obj_align(label_EepromSet, buttonEepromSet, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET);
|
lv_obj_align(label_EepromSet, buttonEepromSet, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET);
|
||||||
|
|
|
@ -23,11 +23,11 @@
|
||||||
|
|
||||||
#if HAS_TFT_LVGL_UI
|
#if HAS_TFT_LVGL_UI
|
||||||
|
|
||||||
#include "lv_conf.h"
|
|
||||||
#include "draw_ui.h"
|
#include "draw_ui.h"
|
||||||
|
#include <lv_conf.h>
|
||||||
|
|
||||||
#include "../../../../MarlinCore.h"
|
|
||||||
#include "../../../../module/planner.h"
|
#include "../../../../module/planner.h"
|
||||||
|
#include "../../../../inc/MarlinConfig.h"
|
||||||
|
|
||||||
extern lv_group_t * g;
|
extern lv_group_t * g;
|
||||||
static lv_obj_t * scr;
|
static lv_obj_t * scr;
|
||||||
|
@ -278,7 +278,7 @@ void lv_draw_step_settings(void) {
|
||||||
if (gCfgItems.encoder_enable) lv_group_add_obj(g, buttonBack);
|
if (gCfgItems.encoder_enable) lv_group_add_obj(g, buttonBack);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (gCfgItems.multiple_language != 0) {
|
if (gCfgItems.multiple_language) {
|
||||||
if (uiCfg.para_ui_page != 1) {
|
if (uiCfg.para_ui_page != 1) {
|
||||||
lv_label_set_text(labelTurnPage, machine_menu.next);
|
lv_label_set_text(labelTurnPage, machine_menu.next);
|
||||||
lv_obj_align(labelTurnPage, buttonTurnPage, LV_ALIGN_CENTER, 0, 0);
|
lv_obj_align(labelTurnPage, buttonTurnPage, LV_ALIGN_CENTER, 0, 0);
|
||||||
|
|
|
@ -23,13 +23,12 @@
|
||||||
|
|
||||||
#if BOTH(HAS_TFT_LVGL_UI, HAS_TRINAMIC_CONFIG)
|
#if BOTH(HAS_TFT_LVGL_UI, HAS_TRINAMIC_CONFIG)
|
||||||
|
|
||||||
#include "lv_conf.h"
|
|
||||||
#include "draw_ui.h"
|
#include "draw_ui.h"
|
||||||
|
#include <lv_conf.h>
|
||||||
|
|
||||||
#include "../../../../MarlinCore.h"
|
|
||||||
#include "../../../../module/planner.h"
|
|
||||||
#include "../../../../module/stepper/indirection.h"
|
#include "../../../../module/stepper/indirection.h"
|
||||||
#include "../../../../feature/tmc_util.h"
|
#include "../../../../feature/tmc_util.h"
|
||||||
|
#include "../../../../inc/MarlinConfig.h"
|
||||||
|
|
||||||
extern lv_group_t * g;
|
extern lv_group_t * g;
|
||||||
static lv_obj_t * scr;
|
static lv_obj_t * scr;
|
||||||
|
@ -310,7 +309,7 @@ void lv_draw_tmc_current_settings(void) {
|
||||||
lv_obj_set_size(buttonBack, PARA_UI_BACK_BTN_X_SIZE, PARA_UI_BACK_BTN_Y_SIZE);
|
lv_obj_set_size(buttonBack, PARA_UI_BACK_BTN_X_SIZE, PARA_UI_BACK_BTN_Y_SIZE);
|
||||||
label_Back = lv_label_create(buttonBack, NULL);
|
label_Back = lv_label_create(buttonBack, NULL);
|
||||||
|
|
||||||
if (gCfgItems.multiple_language != 0) {
|
if (gCfgItems.multiple_language) {
|
||||||
if (uiCfg.para_ui_page != 1) {
|
if (uiCfg.para_ui_page != 1) {
|
||||||
//#if AXIS_IS_TMC(E1)
|
//#if AXIS_IS_TMC(E1)
|
||||||
lv_label_set_text(labelTurnPage, machine_menu.next);
|
lv_label_set_text(labelTurnPage, machine_menu.next);
|
||||||
|
|
|
@ -23,15 +23,13 @@
|
||||||
|
|
||||||
#if BOTH(HAS_TFT_LVGL_UI, HAS_STEALTHCHOP)
|
#if BOTH(HAS_TFT_LVGL_UI, HAS_STEALTHCHOP)
|
||||||
|
|
||||||
#include "lv_conf.h"
|
|
||||||
#include "draw_ui.h"
|
#include "draw_ui.h"
|
||||||
|
#include <lv_conf.h>
|
||||||
|
|
||||||
#include "../../../../MarlinCore.h"
|
|
||||||
#include "../../../../module/planner.h"
|
|
||||||
#include "../../../../module/stepper/indirection.h"
|
#include "../../../../module/stepper/indirection.h"
|
||||||
#include "../../../../feature/tmc_util.h"
|
#include "../../../../feature/tmc_util.h"
|
||||||
#include "../../../../gcode/gcode.h"
|
#include "../../../../gcode/gcode.h"
|
||||||
#include "../../../../module/planner.h"
|
#include "../../../../inc/MarlinConfig.h"
|
||||||
|
|
||||||
extern lv_group_t * g;
|
extern lv_group_t * g;
|
||||||
static lv_obj_t * scr;
|
static lv_obj_t * scr;
|
||||||
|
@ -232,7 +230,6 @@ void lv_draw_tmc_step_mode_settings(void) {
|
||||||
lv_obj_t *buttonE1Text = NULL, *labelE1Text = NULL;
|
lv_obj_t *buttonE1Text = NULL, *labelE1Text = NULL;
|
||||||
//#endif
|
//#endif
|
||||||
|
|
||||||
|
|
||||||
labelXState = NULL;
|
labelXState = NULL;
|
||||||
buttonXState = NULL;
|
buttonXState = NULL;
|
||||||
labelYState = NULL;
|
labelYState = NULL;
|
||||||
|
@ -493,7 +490,7 @@ void lv_draw_tmc_step_mode_settings(void) {
|
||||||
lv_btn_set_layout(buttonBack, LV_LAYOUT_OFF);
|
lv_btn_set_layout(buttonBack, LV_LAYOUT_OFF);
|
||||||
label_Back = lv_label_create(buttonBack, NULL);
|
label_Back = lv_label_create(buttonBack, NULL);
|
||||||
|
|
||||||
if (gCfgItems.multiple_language != 0) {
|
if (gCfgItems.multiple_language) {
|
||||||
if (uiCfg.para_ui_page != 1) {
|
if (uiCfg.para_ui_page != 1) {
|
||||||
lv_label_set_text(labelXText, machine_menu.X_StepMode);
|
lv_label_set_text(labelXText, machine_menu.X_StepMode);
|
||||||
lv_obj_align(labelXText, buttonXText, LV_ALIGN_IN_LEFT_MID, 0, 0);
|
lv_obj_align(labelXText, buttonXText, LV_ALIGN_IN_LEFT_MID, 0, 0);
|
||||||
|
|
|
@ -23,16 +23,16 @@
|
||||||
|
|
||||||
#if HAS_TFT_LVGL_UI
|
#if HAS_TFT_LVGL_UI
|
||||||
|
|
||||||
#include "lv_conf.h"
|
|
||||||
#include "draw_ui.h"
|
#include "draw_ui.h"
|
||||||
|
#include <lv_conf.h>
|
||||||
//#include "../lvgl/src/lv_objx/lv_imgbtn.h"
|
//#include "../lvgl/src/lv_objx/lv_imgbtn.h"
|
||||||
//#include "../lvgl/src/lv_objx/lv_img.h"
|
//#include "../lvgl/src/lv_objx/lv_img.h"
|
||||||
//#include "../lvgl/src/lv_core/lv_disp.h"
|
//#include "../lvgl/src/lv_core/lv_disp.h"
|
||||||
//#include "../lvgl/src/lv_core/lv_refr.h"
|
//#include "../lvgl/src/lv_core/lv_refr.h"
|
||||||
|
|
||||||
#include "../../../../MarlinCore.h"
|
|
||||||
#include "../../../../gcode/queue.h"
|
#include "../../../../gcode/queue.h"
|
||||||
#include "../../../../module/temperature.h"
|
#include "../../../../module/temperature.h"
|
||||||
|
#include "../../../../inc/MarlinConfig.h"
|
||||||
|
|
||||||
extern lv_group_t * g;
|
extern lv_group_t * g;
|
||||||
static lv_obj_t * scr;
|
static lv_obj_t * scr;
|
||||||
|
@ -236,7 +236,7 @@ void lv_draw_tool(void) {
|
||||||
//lv_obj_t *label_More = lv_label_create(buttonMore, NULL);
|
//lv_obj_t *label_More = lv_label_create(buttonMore, NULL);
|
||||||
lv_obj_t *label_Back = lv_label_create(buttonBack, NULL);
|
lv_obj_t *label_Back = lv_label_create(buttonBack, NULL);
|
||||||
|
|
||||||
if (gCfgItems.multiple_language != 0) {
|
if (gCfgItems.multiple_language) {
|
||||||
lv_label_set_text(labelPreHeat, tool_menu.preheat);
|
lv_label_set_text(labelPreHeat, tool_menu.preheat);
|
||||||
lv_obj_align(labelPreHeat, buttonPreHeat, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET);
|
lv_obj_align(labelPreHeat, buttonPreHeat, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET);
|
||||||
|
|
||||||
|
|
|
@ -34,10 +34,11 @@
|
||||||
|
|
||||||
#include <SPI.h>
|
#include <SPI.h>
|
||||||
|
|
||||||
#include "../../../../MarlinCore.h"
|
#include "../../../../MarlinCore.h" // for marlin_state
|
||||||
#include "../../../../sd/cardreader.h"
|
#include "../../../../sd/cardreader.h"
|
||||||
#include "../../../../module/motion.h"
|
#include "../../../../module/motion.h"
|
||||||
#include "../../../../module/planner.h"
|
#include "../../../../module/planner.h"
|
||||||
|
#include "../../../../inc/MarlinConfig.h"
|
||||||
|
|
||||||
#if ENABLED(POWER_LOSS_RECOVERY)
|
#if ENABLED(POWER_LOSS_RECOVERY)
|
||||||
#include "../../../../feature/powerloss.h"
|
#include "../../../../feature/powerloss.h"
|
||||||
|
@ -57,15 +58,13 @@ num_key_value_state value;
|
||||||
keyboard_value_state keyboard_value;
|
keyboard_value_state keyboard_value;
|
||||||
|
|
||||||
uint32_t To_pre_view;
|
uint32_t To_pre_view;
|
||||||
uint8_t gcode_preview_over;
|
bool gcode_preview_over, flash_preview_begin, default_preview_flg;
|
||||||
uint8_t flash_preview_begin;
|
|
||||||
uint8_t default_preview_flg;
|
|
||||||
uint32_t size = 809;
|
uint32_t size = 809;
|
||||||
uint16_t row;
|
uint16_t row;
|
||||||
uint8_t temperature_change_frequency;
|
uint8_t temperature_change_frequency;
|
||||||
uint8_t printing_rate_update_flag;
|
uint8_t printing_rate_update_flag;
|
||||||
|
|
||||||
extern uint8_t once_flag;
|
extern bool once_flag;
|
||||||
extern uint8_t sel_id;
|
extern uint8_t sel_id;
|
||||||
extern uint8_t public_buf[512];
|
extern uint8_t public_buf[512];
|
||||||
extern uint8_t bmp_public_buf[17 * 1024];
|
extern uint8_t bmp_public_buf[17 * 1024];
|
||||||
|
@ -116,10 +115,10 @@ void gCfgItems_init() {
|
||||||
gCfgItems.language = LANG_PORTUGUESE;
|
gCfgItems.language = LANG_PORTUGUESE;
|
||||||
#endif
|
#endif
|
||||||
gCfgItems.leveling_mode = 0;
|
gCfgItems.leveling_mode = 0;
|
||||||
gCfgItems.from_flash_pic = 0;
|
gCfgItems.from_flash_pic = false;
|
||||||
gCfgItems.curFilesize = 0;
|
gCfgItems.curFilesize = 0;
|
||||||
gCfgItems.finish_power_off = 0;
|
gCfgItems.finish_power_off = false;
|
||||||
gCfgItems.pause_reprint = 0;
|
gCfgItems.pause_reprint = false;
|
||||||
gCfgItems.pausePosX = -1;
|
gCfgItems.pausePosX = -1;
|
||||||
gCfgItems.pausePosY = -1;
|
gCfgItems.pausePosY = -1;
|
||||||
gCfgItems.pausePosZ = 5;
|
gCfgItems.pausePosZ = 5;
|
||||||
|
@ -407,7 +406,6 @@ void tft_style_init() {
|
||||||
lv_bar_style_indic.body.main_color = lv_color_hex3(0xADF);
|
lv_bar_style_indic.body.main_color = lv_color_hex3(0xADF);
|
||||||
lv_bar_style_indic.body.grad_color = lv_color_hex3(0xADF);
|
lv_bar_style_indic.body.grad_color = lv_color_hex3(0xADF);
|
||||||
lv_bar_style_indic.body.border.color = lv_color_hex3(0xADF);
|
lv_bar_style_indic.body.border.color = lv_color_hex3(0xADF);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#define MAX_TITLE_LEN 28
|
#define MAX_TITLE_LEN 28
|
||||||
|
@ -609,14 +607,14 @@ char *creat_title_text() {
|
||||||
pre_read_cnt = (uint32_t)p1 - (uint32_t)((uint32_t *)(&public_buf[0]));
|
pre_read_cnt = (uint32_t)p1 - (uint32_t)((uint32_t *)(&public_buf[0]));
|
||||||
|
|
||||||
To_pre_view = pre_read_cnt;
|
To_pre_view = pre_read_cnt;
|
||||||
gcode_preview_over = 1;
|
gcode_preview_over = true;
|
||||||
gCfgItems.from_flash_pic = 1;
|
gCfgItems.from_flash_pic = true;
|
||||||
update_spi_flash();
|
update_spi_flash();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
gcode_preview_over = 0;
|
gcode_preview_over = false;
|
||||||
default_preview_flg = 1;
|
default_preview_flg = true;
|
||||||
gCfgItems.from_flash_pic = 0;
|
gCfgItems.from_flash_pic = false;
|
||||||
update_spi_flash();
|
update_spi_flash();
|
||||||
}
|
}
|
||||||
card.closefile();
|
card.closefile();
|
||||||
|
@ -681,8 +679,8 @@ char *creat_title_text() {
|
||||||
size = 809;
|
size = 809;
|
||||||
row = 0;
|
row = 0;
|
||||||
|
|
||||||
gcode_preview_over = 0;
|
gcode_preview_over = false;
|
||||||
//flash_preview_begin = 1;
|
//flash_preview_begin = true;
|
||||||
|
|
||||||
card.closefile();
|
card.closefile();
|
||||||
|
|
||||||
|
@ -696,7 +694,7 @@ char *creat_title_text() {
|
||||||
//bakup_file_path((uint8_t *)curFileName, strlen(curFileName));
|
//bakup_file_path((uint8_t *)curFileName, strlen(curFileName));
|
||||||
srcfp = file;
|
srcfp = file;
|
||||||
mksReprint.mks_printer_state = MKS_WORKING;
|
mksReprint.mks_printer_state = MKS_WORKING;
|
||||||
once_flag = 0;
|
once_flag = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
@ -727,7 +725,7 @@ char *creat_title_text() {
|
||||||
#endif
|
#endif
|
||||||
card.startFileprint();
|
card.startFileprint();
|
||||||
TERN_(POWER_LOSS_RECOVERY, recovery.prepare());
|
TERN_(POWER_LOSS_RECOVERY, recovery.prepare());
|
||||||
once_flag = 0;
|
once_flag = false;
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -813,8 +811,8 @@ char *creat_title_text() {
|
||||||
size = 809;
|
size = 809;
|
||||||
row = 0;
|
row = 0;
|
||||||
|
|
||||||
gcode_preview_over = 0;
|
gcode_preview_over = false;
|
||||||
//flash_preview_begin = 1;
|
//flash_preview_begin = true;
|
||||||
|
|
||||||
card.closefile();
|
card.closefile();
|
||||||
|
|
||||||
|
@ -828,7 +826,7 @@ char *creat_title_text() {
|
||||||
//bakup_file_path((uint8_t *)curFileName, strlen(curFileName));
|
//bakup_file_path((uint8_t *)curFileName, strlen(curFileName));
|
||||||
srcfp = file;
|
srcfp = file;
|
||||||
mksReprint.mks_printer_state = MKS_WORKING;
|
mksReprint.mks_printer_state = MKS_WORKING;
|
||||||
once_flag = 0;
|
once_flag = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
@ -859,7 +857,7 @@ char *creat_title_text() {
|
||||||
#endif
|
#endif
|
||||||
card.startFileprint();
|
card.startFileprint();
|
||||||
TERN_(POWER_LOSS_RECOVERY, recovery.prepare());
|
TERN_(POWER_LOSS_RECOVERY, recovery.prepare());
|
||||||
once_flag = 0;
|
once_flag = false;
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -894,17 +892,17 @@ char *creat_title_text() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void disp_pre_gcode(int xpos_pixel, int ypos_pixel) {
|
void disp_pre_gcode(int xpos_pixel, int ypos_pixel) {
|
||||||
if (gcode_preview_over == 1) gcode_preview(list_file.file_name[sel_id], xpos_pixel, ypos_pixel);
|
if (gcode_preview_over) gcode_preview(list_file.file_name[sel_id], xpos_pixel, ypos_pixel);
|
||||||
#if HAS_BAK_VIEW_IN_FLASH
|
#if HAS_BAK_VIEW_IN_FLASH
|
||||||
if (flash_preview_begin == 1) {
|
if (flash_preview_begin) {
|
||||||
flash_preview_begin = 0;
|
flash_preview_begin = false;
|
||||||
Draw_default_preview(xpos_pixel, ypos_pixel, 1);
|
Draw_default_preview(xpos_pixel, ypos_pixel, 1);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#if HAS_GCODE_DEFAULT_VIEW_IN_FLASH
|
#if HAS_GCODE_DEFAULT_VIEW_IN_FLASH
|
||||||
if (default_preview_flg == 1) {
|
if (default_preview_flg) {
|
||||||
Draw_default_preview(xpos_pixel, ypos_pixel, 0);
|
Draw_default_preview(xpos_pixel, ypos_pixel, 0);
|
||||||
default_preview_flg = 0;
|
default_preview_flg = false;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -971,7 +969,7 @@ void GUI_RefreshPage() {
|
||||||
}
|
}
|
||||||
if (printing_rate_update_flag || marlin_state == MF_SD_COMPLETE) {
|
if (printing_rate_update_flag || marlin_state == MF_SD_COMPLETE) {
|
||||||
printing_rate_update_flag = 0;
|
printing_rate_update_flag = 0;
|
||||||
if (gcode_preview_over == 0) setProBarRate();
|
if (!gcode_preview_over) setProBarRate();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -1359,8 +1357,8 @@ void draw_return_ui() {
|
||||||
lv_draw_print_file();
|
lv_draw_print_file();
|
||||||
break;
|
break;
|
||||||
case PRINTING_UI:
|
case PRINTING_UI:
|
||||||
if (gCfgItems.from_flash_pic == 1) flash_preview_begin = 1;
|
if (gCfgItems.from_flash_pic) flash_preview_begin = true;
|
||||||
else default_preview_flg = 1;
|
else default_preview_flg = true;
|
||||||
lv_draw_printing();
|
lv_draw_printing();
|
||||||
break;
|
break;
|
||||||
case MOVE_MOTOR_UI:
|
case MOVE_MOTOR_UI:
|
||||||
|
|
|
@ -174,12 +174,12 @@ extern char public_buf_l[30];
|
||||||
typedef struct {
|
typedef struct {
|
||||||
uint32_t spi_flash_flag;
|
uint32_t spi_flash_flag;
|
||||||
uint8_t disp_rotation_180;
|
uint8_t disp_rotation_180;
|
||||||
uint8_t multiple_language;
|
bool multiple_language;
|
||||||
uint8_t language;
|
uint8_t language;
|
||||||
uint8_t leveling_mode;
|
uint8_t leveling_mode;
|
||||||
uint8_t from_flash_pic;
|
bool from_flash_pic;
|
||||||
uint8_t finish_power_off;
|
bool finish_power_off;
|
||||||
uint8_t pause_reprint;
|
bool pause_reprint;
|
||||||
uint8_t wifi_mode_sel;
|
uint8_t wifi_mode_sel;
|
||||||
uint8_t fileSysType;
|
uint8_t fileSysType;
|
||||||
uint8_t wifi_type;
|
uint8_t wifi_type;
|
||||||
|
|
|
@ -23,13 +23,12 @@
|
||||||
|
|
||||||
#if HAS_TFT_LVGL_UI
|
#if HAS_TFT_LVGL_UI
|
||||||
|
|
||||||
#include "lv_conf.h"
|
#include <lv_conf.h>
|
||||||
#include "draw_ui.h"
|
#include "tft_lvgl_configuration.h"
|
||||||
|
|
||||||
#if ENABLED(USE_WIFI_FUNCTION)
|
#if ENABLED(USE_WIFI_FUNCTION)
|
||||||
|
|
||||||
#include "../../../../../Configuration.h"
|
#include "draw_ui.h"
|
||||||
#include "../../../../module/temperature.h"
|
|
||||||
|
|
||||||
extern lv_group_t * g;
|
extern lv_group_t * g;
|
||||||
static lv_obj_t *scr, *wifi_name_text, *wifi_key_text, *wifi_state_text, *wifi_ip_text;
|
static lv_obj_t *scr, *wifi_name_text, *wifi_key_text, *wifi_state_text, *wifi_ip_text;
|
||||||
|
@ -135,7 +134,7 @@ void lv_draw_wifi(void) {
|
||||||
label_Reconnect = lv_label_create(buttonReconnect, NULL);
|
label_Reconnect = lv_label_create(buttonReconnect, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gCfgItems.multiple_language !=0) {
|
if (gCfgItems.multiple_language) {
|
||||||
lv_label_set_text(label_Back, common_menu.text_back);
|
lv_label_set_text(label_Back, common_menu.text_back);
|
||||||
lv_obj_align(label_Back, buttonBack, LV_ALIGN_IN_BOTTOM_MID,0, BUTTON_TEXT_Y_OFFSET);
|
lv_obj_align(label_Back, buttonBack, LV_ALIGN_IN_BOTTOM_MID,0, BUTTON_TEXT_Y_OFFSET);
|
||||||
|
|
||||||
|
|
|
@ -23,13 +23,12 @@
|
||||||
|
|
||||||
#if HAS_TFT_LVGL_UI
|
#if HAS_TFT_LVGL_UI
|
||||||
|
|
||||||
#include "lv_conf.h"
|
#include <lv_conf.h>
|
||||||
#include "draw_ui.h"
|
#include "tft_lvgl_configuration.h"
|
||||||
|
|
||||||
#if ENABLED(USE_WIFI_FUNCTION)
|
#if ENABLED(USE_WIFI_FUNCTION)
|
||||||
|
|
||||||
#include "../../../../../Configuration.h"
|
#include "draw_ui.h"
|
||||||
#include "../../../../module/temperature.h"
|
|
||||||
|
|
||||||
#define NAME_BTN_X 330
|
#define NAME_BTN_X 330
|
||||||
#define NAME_BTN_Y 48
|
#define NAME_BTN_Y 48
|
||||||
|
|
|
@ -23,13 +23,12 @@
|
||||||
|
|
||||||
#if HAS_TFT_LVGL_UI
|
#if HAS_TFT_LVGL_UI
|
||||||
|
|
||||||
#include "lv_conf.h"
|
#include <lv_conf.h>
|
||||||
#include "draw_ui.h"
|
#include "tft_lvgl_configuration.h"
|
||||||
|
|
||||||
#if ENABLED(USE_WIFI_FUNCTION)
|
#if ENABLED(USE_WIFI_FUNCTION)
|
||||||
|
|
||||||
#include "../../../../../Configuration.h"
|
#include "draw_ui.h"
|
||||||
#include "../../../../module/planner.h"
|
|
||||||
|
|
||||||
extern lv_group_t * g;
|
extern lv_group_t * g;
|
||||||
static lv_obj_t *scr, *labelModelValue = NULL, *buttonModelValue = NULL, *labelCloudValue = NULL;
|
static lv_obj_t *scr, *labelModelValue = NULL, *buttonModelValue = NULL, *labelCloudValue = NULL;
|
||||||
|
@ -63,7 +62,7 @@ static void event_handler(lv_obj_t * obj, lv_event_t event) {
|
||||||
lv_obj_align(labelModelValue, buttonModelValue, LV_ALIGN_CENTER,0, 0);
|
lv_obj_align(labelModelValue, buttonModelValue, LV_ALIGN_CENTER,0, 0);
|
||||||
update_spi_flash();
|
update_spi_flash();
|
||||||
}
|
}
|
||||||
else{
|
else {
|
||||||
gCfgItems.wifi_mode_sel = AP_MODEL;
|
gCfgItems.wifi_mode_sel = AP_MODEL;
|
||||||
lv_label_set_text(labelModelValue, WIFI_AP_TEXT);
|
lv_label_set_text(labelModelValue, WIFI_AP_TEXT);
|
||||||
lv_obj_align(labelModelValue, buttonModelValue, LV_ALIGN_CENTER,0, 0);
|
lv_obj_align(labelModelValue, buttonModelValue, LV_ALIGN_CENTER,0, 0);
|
||||||
|
@ -76,7 +75,7 @@ static void event_handler(lv_obj_t * obj, lv_event_t event) {
|
||||||
|
|
||||||
}
|
}
|
||||||
else if (event == LV_EVENT_RELEASED) {
|
else if (event == LV_EVENT_RELEASED) {
|
||||||
keyboard_value=wifiName;
|
keyboard_value = wifiName;
|
||||||
lv_clear_wifi_settings();
|
lv_clear_wifi_settings();
|
||||||
lv_draw_keyboard();
|
lv_draw_keyboard();
|
||||||
}
|
}
|
||||||
|
@ -240,7 +239,7 @@ void lv_draw_wifi_settings(void) {
|
||||||
lv_btn_set_layout(buttonBack, LV_LAYOUT_OFF);
|
lv_btn_set_layout(buttonBack, LV_LAYOUT_OFF);
|
||||||
label_Back = lv_label_create(buttonBack, NULL);
|
label_Back = lv_label_create(buttonBack, NULL);
|
||||||
|
|
||||||
if (gCfgItems.multiple_language !=0) {
|
if (gCfgItems.multiple_language) {
|
||||||
if (gCfgItems.wifi_mode_sel == AP_MODEL) {
|
if (gCfgItems.wifi_mode_sel == AP_MODEL) {
|
||||||
lv_label_set_text(labelModelValue, WIFI_AP_TEXT);
|
lv_label_set_text(labelModelValue, WIFI_AP_TEXT);
|
||||||
lv_obj_align(labelModelValue, buttonModelValue, LV_ALIGN_CENTER,0, 0);
|
lv_obj_align(labelModelValue, buttonModelValue, LV_ALIGN_CENTER,0, 0);
|
||||||
|
@ -295,5 +294,4 @@ void lv_clear_wifi_settings() {
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // USE_WIFI_FUNCTION
|
#endif // USE_WIFI_FUNCTION
|
||||||
|
|
||||||
#endif // HAS_TFT_LVGL_UI
|
#endif // HAS_TFT_LVGL_UI
|
||||||
|
|
|
@ -23,13 +23,12 @@
|
||||||
|
|
||||||
#if HAS_TFT_LVGL_UI
|
#if HAS_TFT_LVGL_UI
|
||||||
|
|
||||||
#include "lv_conf.h"
|
#include <lv_conf.h>
|
||||||
#include "draw_ui.h"
|
#include "tft_lvgl_configuration.h"
|
||||||
|
|
||||||
#if ENABLED(USE_WIFI_FUNCTION)
|
#if ENABLED(USE_WIFI_FUNCTION)
|
||||||
|
|
||||||
#include "../../../../../Configuration.h"
|
#include "draw_ui.h"
|
||||||
#include "../../../../module/temperature.h"
|
|
||||||
|
|
||||||
static lv_obj_t * scr;
|
static lv_obj_t * scr;
|
||||||
|
|
||||||
|
|
|
@ -23,10 +23,11 @@
|
||||||
|
|
||||||
#if HAS_TFT_LVGL_UI
|
#if HAS_TFT_LVGL_UI
|
||||||
|
|
||||||
#include "draw_ui.h"
|
#include "tft_lvgl_configuration.h"
|
||||||
|
|
||||||
#if ENABLED(USE_WIFI_FUNCTION)
|
#if ENABLED(USE_WIFI_FUNCTION)
|
||||||
|
|
||||||
|
#include "draw_ui.h"
|
||||||
#include "wifiSerial.h"
|
#include "wifiSerial.h"
|
||||||
|
|
||||||
#include <libmaple/libmaple.h>
|
#include <libmaple/libmaple.h>
|
||||||
|
|
|
@ -206,11 +206,11 @@ static const char assets[][LONG_FILENAME_LENGTH] = {
|
||||||
"bmp_return.bin",
|
"bmp_return.bin",
|
||||||
|
|
||||||
#if ENABLED(USE_WIFI_FUNCTION)
|
#if ENABLED(USE_WIFI_FUNCTION)
|
||||||
//wifi screen
|
// wifi screen
|
||||||
"bmp_wifi.bin",
|
"bmp_wifi.bin",
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//babystep screen
|
// babystep screen
|
||||||
"bmp_baby_move0_01.bin",
|
"bmp_baby_move0_01.bin",
|
||||||
"bmp_baby_move0_05.bin",
|
"bmp_baby_move0_05.bin",
|
||||||
"bmp_baby_move0_1.bin"
|
"bmp_baby_move0_1.bin"
|
||||||
|
|
|
@ -23,24 +23,22 @@
|
||||||
|
|
||||||
#if HAS_TFT_LVGL_UI
|
#if HAS_TFT_LVGL_UI
|
||||||
|
|
||||||
#include "../../../../MarlinCore.h"
|
|
||||||
|
|
||||||
#include "lv_conf.h"
|
|
||||||
#include "draw_ui.h"
|
#include "draw_ui.h"
|
||||||
|
#include <lv_conf.h>
|
||||||
|
|
||||||
|
#include "../../../../gcode/gcode.h"
|
||||||
#include "../../../../module/temperature.h"
|
#include "../../../../module/temperature.h"
|
||||||
|
#include "../../../../module/planner.h"
|
||||||
#include "../../../../module/motion.h"
|
#include "../../../../module/motion.h"
|
||||||
#include "../../../../sd/cardreader.h"
|
#include "../../../../sd/cardreader.h"
|
||||||
#include "../../../../gcode/queue.h"
|
#include "../../../../inc/MarlinConfig.h"
|
||||||
|
|
||||||
#if ENABLED(POWER_LOSS_RECOVERY)
|
#if ENABLED(POWER_LOSS_RECOVERY)
|
||||||
#include "../../../../feature/powerloss.h"
|
#include "../../../../feature/powerloss.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "../../../../gcode/gcode.h"
|
|
||||||
#include "../../../../module/planner.h"
|
|
||||||
|
|
||||||
extern uint32_t To_pre_view;
|
extern uint32_t To_pre_view;
|
||||||
extern uint8_t flash_preview_begin, default_preview_flg, gcode_preview_over;
|
extern bool flash_preview_begin, default_preview_flg, gcode_preview_over;
|
||||||
|
|
||||||
void printer_state_polling() {
|
void printer_state_polling() {
|
||||||
if (uiCfg.print_state == PAUSING) {
|
if (uiCfg.print_state == PAUSING) {
|
||||||
|
@ -76,7 +74,7 @@ void printer_state_polling() {
|
||||||
// #if ENABLED(POWER_LOSS_RECOVERY)
|
// #if ENABLED(POWER_LOSS_RECOVERY)
|
||||||
// if (recovery.enabled) recovery.save(true);
|
// if (recovery.enabled) recovery.save(true);
|
||||||
// #endif
|
// #endif
|
||||||
gCfgItems.pause_reprint = 1;
|
gCfgItems.pause_reprint = true;
|
||||||
update_spi_flash();
|
update_spi_flash();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -105,7 +103,7 @@ void printer_state_polling() {
|
||||||
uiCfg.print_state = WORKING;
|
uiCfg.print_state = WORKING;
|
||||||
start_print_time();
|
start_print_time();
|
||||||
|
|
||||||
gCfgItems.pause_reprint = 0;
|
gCfgItems.pause_reprint = false;
|
||||||
update_spi_flash();
|
update_spi_flash();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -137,7 +135,7 @@ void printer_state_polling() {
|
||||||
);
|
);
|
||||||
gcode.process_subcommands_now(public_buf_m);
|
gcode.process_subcommands_now(public_buf_m);
|
||||||
|
|
||||||
if ((gCfgItems.pause_reprint) == 1 && (gCfgItems.pausePosZ != (float)-1)) {
|
if (gCfgItems.pause_reprint && gCfgItems.pausePosZ != -1.0f) {
|
||||||
gcode.process_subcommands_now_P(PSTR("G91"));
|
gcode.process_subcommands_now_P(PSTR("G91"));
|
||||||
ZERO(public_buf_l);
|
ZERO(public_buf_l);
|
||||||
sprintf_P(public_buf_l, PSTR("G1 Z-%.1f"), gCfgItems.pausePosZ);
|
sprintf_P(public_buf_l, PSTR("G1 Z-%.1f"), gCfgItems.pausePosZ);
|
||||||
|
@ -148,7 +146,7 @@ void printer_state_polling() {
|
||||||
uiCfg.print_state = WORKING;
|
uiCfg.print_state = WORKING;
|
||||||
start_print_time();
|
start_print_time();
|
||||||
|
|
||||||
gCfgItems.pause_reprint = 0;
|
gCfgItems.pause_reprint = false;
|
||||||
update_spi_flash();
|
update_spi_flash();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -240,10 +238,10 @@ void filament_check() {
|
||||||
stop_print_time();
|
stop_print_time();
|
||||||
uiCfg.print_state = PAUSING;
|
uiCfg.print_state = PAUSING;
|
||||||
|
|
||||||
if (gCfgItems.from_flash_pic == 1)
|
if (gCfgItems.from_flash_pic)
|
||||||
flash_preview_begin = 1;
|
flash_preview_begin = true;
|
||||||
else
|
else
|
||||||
default_preview_flg = 1;
|
default_preview_flg = true;
|
||||||
|
|
||||||
lv_draw_printing();
|
lv_draw_printing();
|
||||||
}
|
}
|
||||||
|
|
|
@ -72,7 +72,7 @@ lv_group_t* g;
|
||||||
uint16_t DeviceCode = 0x9488;
|
uint16_t DeviceCode = 0x9488;
|
||||||
extern uint8_t sel_id;
|
extern uint8_t sel_id;
|
||||||
|
|
||||||
extern uint8_t gcode_preview_over, flash_preview_begin, default_preview_flg;
|
extern bool flash_preview_begin, default_preview_flg, gcode_preview_over;
|
||||||
|
|
||||||
uint8_t bmp_public_buf[17 * 1024];
|
uint8_t bmp_public_buf[17 * 1024];
|
||||||
|
|
||||||
|
@ -80,9 +80,8 @@ void SysTick_Callback() {
|
||||||
lv_tick_inc(1);
|
lv_tick_inc(1);
|
||||||
print_time_count();
|
print_time_count();
|
||||||
#if ENABLED(USE_WIFI_FUNCTION)
|
#if ENABLED(USE_WIFI_FUNCTION)
|
||||||
if (tips_disp.timer == TIPS_TIMER_START) {
|
if (tips_disp.timer == TIPS_TIMER_START)
|
||||||
tips_disp.timer_count++;
|
tips_disp.timer_count++;
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
if (uiCfg.filament_loading_time_flg == 1) {
|
if (uiCfg.filament_loading_time_flg == 1) {
|
||||||
uiCfg.filament_loading_time_cnt++;
|
uiCfg.filament_loading_time_cnt++;
|
||||||
|
@ -193,10 +192,10 @@ void tft_lvgl_init() {
|
||||||
#if ENABLED(POWER_LOSS_RECOVERY)
|
#if ENABLED(POWER_LOSS_RECOVERY)
|
||||||
recovery.load();
|
recovery.load();
|
||||||
if (recovery.valid()) {
|
if (recovery.valid()) {
|
||||||
if (gCfgItems.from_flash_pic == 1)
|
if (gCfgItems.from_flash_pic)
|
||||||
flash_preview_begin = 1;
|
flash_preview_begin = true;
|
||||||
else
|
else
|
||||||
default_preview_flg = 1;
|
default_preview_flg = true;
|
||||||
|
|
||||||
uiCfg.print_state = REPRINTING;
|
uiCfg.print_state = REPRINTING;
|
||||||
|
|
||||||
|
@ -408,8 +407,6 @@ lv_fs_res_t sd_tell_cb(lv_fs_drv_t * drv, void * file_p, uint32_t * pos_p) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void lv_encoder_pin_init() {
|
void lv_encoder_pin_init() {
|
||||||
#if 1 // HAS_DIGITAL_BUTTONS
|
|
||||||
|
|
||||||
#if BUTTON_EXISTS(EN1)
|
#if BUTTON_EXISTS(EN1)
|
||||||
SET_INPUT_PULLUP(BTN_EN1);
|
SET_INPUT_PULLUP(BTN_EN1);
|
||||||
#endif
|
#endif
|
||||||
|
@ -436,8 +433,6 @@ void lv_encoder_pin_init() {
|
||||||
#if BUTTON_EXISTS(RT)
|
#if BUTTON_EXISTS(RT)
|
||||||
SET_INPUT(BTN_RT);
|
SET_INPUT(BTN_RT);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif // HAS_DIGITAL_BUTTONS
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 1 // HAS_ENCODER_ACTION
|
#if 1 // HAS_ENCODER_ACTION
|
||||||
|
|
|
@ -23,11 +23,13 @@
|
||||||
|
|
||||||
#if HAS_TFT_LVGL_UI
|
#if HAS_TFT_LVGL_UI
|
||||||
|
|
||||||
#include "draw_ui.h"
|
#include "tft_lvgl_configuration.h"
|
||||||
#include "wifiSerial.h"
|
|
||||||
|
|
||||||
#if ENABLED(USE_WIFI_FUNCTION)
|
#if ENABLED(USE_WIFI_FUNCTION)
|
||||||
|
|
||||||
|
#include "draw_ui.h"
|
||||||
|
#include "wifiSerial.h"
|
||||||
|
|
||||||
#include <libmaple/libmaple.h>
|
#include <libmaple/libmaple.h>
|
||||||
#include <libmaple/gpio.h>
|
#include <libmaple/gpio.h>
|
||||||
#include <libmaple/timer.h>
|
#include <libmaple/timer.h>
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -42,30 +42,30 @@
|
||||||
//
|
//
|
||||||
// Limit Switches
|
// Limit Switches
|
||||||
//
|
//
|
||||||
#define X_MIN_PIN 34
|
#define X_STOP_PIN 34
|
||||||
#define Y_MIN_PIN 35
|
#define Y_STOP_PIN 35
|
||||||
#define Z_MIN_PIN 16 // 15
|
#define Z_STOP_PIN 16
|
||||||
|
|
||||||
//
|
//
|
||||||
// Steppers
|
// Steppers
|
||||||
//
|
//
|
||||||
#define X_STEP_PIN 12 // 34//27
|
#define X_STEP_PIN 12
|
||||||
#define X_DIR_PIN 13 // 35//26
|
#define X_DIR_PIN 13
|
||||||
#define X_ENABLE_PIN 17 // 0//17//25 // used free pin
|
#define X_ENABLE_PIN 17
|
||||||
//#define X_CS_PIN 0
|
//#define X_CS_PIN 0
|
||||||
|
|
||||||
#define Y_STEP_PIN 32 // 33
|
#define Y_STEP_PIN 32
|
||||||
#define Y_DIR_PIN 33 // 32
|
#define Y_DIR_PIN 33
|
||||||
#define Y_ENABLE_PIN X_ENABLE_PIN
|
#define Y_ENABLE_PIN X_ENABLE_PIN
|
||||||
//#define Y_CS_PIN 13
|
//#define Y_CS_PIN 13
|
||||||
|
|
||||||
#define Z_STEP_PIN 25 // 14
|
#define Z_STEP_PIN 25
|
||||||
#define Z_DIR_PIN 26 // 12
|
#define Z_DIR_PIN 26
|
||||||
#define Z_ENABLE_PIN X_ENABLE_PIN
|
#define Z_ENABLE_PIN X_ENABLE_PIN
|
||||||
//#define Z_CS_PIN 5 // SS_PIN
|
//#define Z_CS_PIN 5 // SS_PIN
|
||||||
|
|
||||||
#define E0_STEP_PIN 27 // 16
|
#define E0_STEP_PIN 27
|
||||||
#define E0_DIR_PIN 14 // 17
|
#define E0_DIR_PIN 14
|
||||||
#define E0_ENABLE_PIN X_ENABLE_PIN
|
#define E0_ENABLE_PIN X_ENABLE_PIN
|
||||||
//#define E0_CS_PIN 21
|
//#define E0_CS_PIN 21
|
||||||
|
|
||||||
|
@ -78,9 +78,9 @@
|
||||||
//
|
//
|
||||||
// Heaters / Fans
|
// Heaters / Fans
|
||||||
//
|
//
|
||||||
#define HEATER_0_PIN 2 // 4//2//(D8)
|
#define HEATER_0_PIN 2
|
||||||
#define FAN_PIN 0 // 2//15//13 (D9)
|
#define FAN_PIN 0
|
||||||
#define HEATER_BED_PIN 15 // 15//0 //(D10)
|
#define HEATER_BED_PIN 15
|
||||||
|
|
||||||
// SPI
|
// SPI
|
||||||
#define SDSS 5
|
#define SDSS 5
|
||||||
|
|
|
@ -666,6 +666,7 @@
|
||||||
//
|
//
|
||||||
// Custom board (with custom PIO env)
|
// Custom board (with custom PIO env)
|
||||||
//
|
//
|
||||||
|
|
||||||
#elif MB(CUSTOM)
|
#elif MB(CUSTOM)
|
||||||
#include "pins_custom.h" // env:custom
|
#include "pins_custom.h" // env:custom
|
||||||
|
|
||||||
|
|
|
@ -977,7 +977,6 @@ extends = env:mks_robin
|
||||||
extra_scripts = ${common.extra_scripts}
|
extra_scripts = ${common.extra_scripts}
|
||||||
buildroot/share/PlatformIO/scripts/mks_robin_pro.py
|
buildroot/share/PlatformIO/scripts/mks_robin_pro.py
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# TRIGORILLA PRO (STM32F103ZET6)
|
# TRIGORILLA PRO (STM32F103ZET6)
|
||||||
#
|
#
|
||||||
|
@ -1026,7 +1025,6 @@ board = genericSTM32F103RC
|
||||||
extra_scripts = ${common.extra_scripts}
|
extra_scripts = ${common.extra_scripts}
|
||||||
buildroot/share/PlatformIO/scripts/mks_robin_lite.py
|
buildroot/share/PlatformIO/scripts/mks_robin_lite.py
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# MKS ROBIN LITE3 (STM32F103RCT6)
|
# MKS ROBIN LITE3 (STM32F103RCT6)
|
||||||
#
|
#
|
||||||
|
|
Loading…
Reference in a new issue