Cleanup before MKS changes

This commit is contained in:
Scott Lahteine
2020-09-20 19:07:59 -05:00
parent 76d8d1742c
commit 60ab7a1ddb
66 changed files with 294 additions and 318 deletions

View File

@ -75,7 +75,7 @@ void lv_draw_about(void) {
LV_IMG_DECLARE(bmp_pic);
/*Create an Image button*/
// Create an Image button
buttonBack = lv_imgbtn_create(scr, NULL);
#if 1
@ -88,8 +88,8 @@ void lv_draw_about(void) {
lv_obj_set_pos(buttonBack, BTN_X_PIXEL * 3 + INTERVAL_V * 4, BTN_Y_PIXEL + INTERVAL_H + titleHeight);
lv_btn_set_layout(buttonBack, LV_LAYOUT_OFF);
/*Create a label on the Image button*/
// Create a label on the image button
label_Back = lv_label_create(buttonBack, NULL);
if (gCfgItems.multiple_language != 0) {

View File

@ -22,7 +22,7 @@
#pragma once
#ifdef __cplusplus
extern "C" { /* C-declarations for C++ */
extern "C" { /* C-declarations for C++ */
#endif
extern void lv_draw_about(void);
@ -30,5 +30,5 @@ extern void lv_clear_about();
//extern void disp_temp_ready_print();
#ifdef __cplusplus
} /* C-declarations for C++ */
} /* C-declarations for C++ */
#endif

View File

@ -22,12 +22,12 @@
#pragma once
#ifdef __cplusplus
extern "C" { /* C-declarations for C++ */
extern "C" { /* C-declarations for C++ */
#endif
extern void lv_draw_acceleration_settings(void);
extern void lv_clear_acceleration_settings();
#ifdef __cplusplus
} /* C-declarations for C++ */
} /* C-declarations for C++ */
#endif

View File

@ -22,12 +22,12 @@
#pragma once
#ifdef __cplusplus
extern "C" { /* C-declarations for C++ */
extern "C" { /* C-declarations for C++ */
#endif
extern void lv_draw_advance_settings(void);
extern void lv_clear_advance_settings();
#ifdef __cplusplus
} /* C-declarations for C++ */
} /* C-declarations for C++ */
#endif

View File

@ -73,7 +73,7 @@ static void event_handler(lv_obj_t * obj, lv_event_t event) {
#if HAS_MULTI_EXTRUDER
planner.flow_percentage[1] = planner.flow_percentage[0];
planner.refresh_e_factor(1);
}
#endif
}
disp_print_speed();
}
@ -98,10 +98,10 @@ static void event_handler(lv_obj_t * obj, lv_event_t event) {
//planner.flow_percentage[1] = planner.flow_percentage[0];
//planner.e_factor[1]= planner.flow_percentage[1] * 0.01;
planner.refresh_e_factor(0);
if (EXTRUDERS == 2) {
#if HAS_MULTI_EXTRUDER
planner.flow_percentage[1] = planner.flow_percentage[0];
planner.refresh_e_factor(1);
}
#endif
}
disp_print_speed();
}
@ -177,7 +177,7 @@ void lv_draw_change_speed(void) {
LV_IMG_DECLARE(bmp_pic);
/*Create an Image button*/
// Create an Image button
buttonAdd = lv_imgbtn_create(scr, NULL);
buttonDec = lv_imgbtn_create(scr, NULL);
buttonMov = lv_imgbtn_create(scr, NULL);
@ -228,7 +228,7 @@ void lv_draw_change_speed(void) {
lv_obj_set_pos(buttonStep, BTN_X_PIXEL * 2 + INTERVAL_V * 3, BTN_Y_PIXEL + INTERVAL_H + titleHeight);
lv_obj_set_pos(buttonBack, BTN_X_PIXEL * 3 + INTERVAL_V * 4, BTN_Y_PIXEL + INTERVAL_H + titleHeight);
/*Create a label on the Image button*/
// Create labels on the image buttons
lv_btn_set_layout(buttonAdd, LV_LAYOUT_OFF);
lv_btn_set_layout(buttonDec, LV_LAYOUT_OFF);
lv_btn_set_layout(buttonMov, LV_LAYOUT_OFF);
@ -236,12 +236,12 @@ void lv_draw_change_speed(void) {
lv_btn_set_layout(buttonStep, LV_LAYOUT_OFF);
lv_btn_set_layout(buttonBack, LV_LAYOUT_OFF);
lv_obj_t * labelAdd = lv_label_create(buttonAdd, NULL);
lv_obj_t * labelDec = lv_label_create(buttonDec, NULL);
labelMov = lv_label_create(buttonMov, NULL);
labelExt = lv_label_create(buttonExt, NULL);
labelStep = lv_label_create(buttonStep, NULL);
lv_obj_t * label_Back = lv_label_create(buttonBack, NULL);
lv_obj_t *labelAdd = lv_label_create(buttonAdd, NULL);
lv_obj_t *labelDec = lv_label_create(buttonDec, NULL);
labelMov = lv_label_create(buttonMov, NULL);
labelExt = lv_label_create(buttonExt, NULL);
labelStep = lv_label_create(buttonStep, NULL);
lv_obj_t *label_Back = lv_label_create(buttonBack, NULL);
if (gCfgItems.multiple_language != 0) {
lv_label_set_text(labelAdd, speed_menu.add);
@ -286,7 +286,7 @@ void disp_speed_step() {
}
void disp_print_speed() {
char buf[30] = {0};
char buf[30] = { 0 };
public_buf_l[0] = '\0';

View File

@ -22,7 +22,7 @@
#pragma once
#ifdef __cplusplus
extern "C" { /* C-declarations for C++ */
extern "C" { /* C-declarations for C++ */
#endif
#define MIN_EXT_SPEED_PERCENT 10
@ -36,5 +36,5 @@ extern void disp_speed_type();
//extern void disp_temp_ready_print();
#ifdef __cplusplus
} /* C-declarations for C++ */
} /* C-declarations for C++ */
#endif

View File

@ -22,7 +22,7 @@
#pragma once
#ifdef __cplusplus
extern "C" { /* C-declarations for C++ */
extern "C" { /* C-declarations for C++ */
#endif
#define DIALOG_TYPE_STOP 0
@ -79,5 +79,5 @@ extern void lv_clear_dialog();
//extern void disp_temp_ready_print();
#ifdef __cplusplus
} /* C-declarations for C++ */
} /* C-declarations for C++ */
#endif

View File

@ -22,12 +22,12 @@
#pragma once
#ifdef __cplusplus
extern "C" { /* C-declarations for C++ */
extern "C" { /* C-declarations for C++ */
#endif
extern void lv_draw_eeprom_settings(void);
extern void lv_clear_eeprom_settings();
#ifdef __cplusplus
} /* C-declarations for C++ */
} /* C-declarations for C++ */
#endif

View File

@ -22,7 +22,7 @@
#pragma once
#ifdef __cplusplus
extern "C" { /* C-declarations for C++ */
extern "C" { /* C-declarations for C++ */
#endif
#ifndef PGM_P
@ -34,5 +34,5 @@ extern void lv_clear_error_message();
//extern void disp_temp_ready_print();
#ifdef __cplusplus
} /* C-declarations for C++ */
} /* C-declarations for C++ */
#endif

View File

@ -100,9 +100,9 @@ static void event_handler(lv_obj_t * obj, lv_event_t event) {
queue.inject_P(PSTR("T0"));
}
}
else {
else
uiCfg.curSprayerChoose = 0;
}
extructAmount = 0;
disp_hotend_temp();
disp_ext_type();
@ -149,7 +149,6 @@ static void event_handler(lv_obj_t * obj, lv_event_t event) {
}
}
void lv_draw_extrusion(void) {
lv_obj_t *buttonAdd, *buttonDec, *buttonBack;
@ -174,7 +173,7 @@ void lv_draw_extrusion(void) {
LV_IMG_DECLARE(bmp_pic);
/*Create an Image button*/
// Create image buttons
buttonAdd = lv_imgbtn_create(scr, NULL);
buttonDec = lv_imgbtn_create(scr, NULL);
buttoType = lv_imgbtn_create(scr, NULL);
@ -224,7 +223,7 @@ void lv_draw_extrusion(void) {
lv_obj_set_pos(buttonSpeed, BTN_X_PIXEL * 2 + INTERVAL_V * 3, BTN_Y_PIXEL + INTERVAL_H + titleHeight);
lv_obj_set_pos(buttonBack, BTN_X_PIXEL * 3 + INTERVAL_V * 4, BTN_Y_PIXEL + INTERVAL_H + titleHeight);
/*Create a label on the Image button*/
// Create labels on the image buttons
lv_btn_set_layout(buttonAdd, LV_LAYOUT_OFF);
lv_btn_set_layout(buttonDec, LV_LAYOUT_OFF);
lv_btn_set_layout(buttoType, LV_LAYOUT_OFF);
@ -232,12 +231,12 @@ void lv_draw_extrusion(void) {
lv_btn_set_layout(buttonSpeed, LV_LAYOUT_OFF);
lv_btn_set_layout(buttonBack, LV_LAYOUT_OFF);
lv_obj_t * labelAdd = lv_label_create(buttonAdd, NULL);
lv_obj_t * labelDec = lv_label_create(buttonDec, NULL);
labelType = lv_label_create(buttoType, NULL);
labelStep = lv_label_create(buttonStep, NULL);
labelSpeed = lv_label_create(buttonSpeed, NULL);
lv_obj_t * label_Back = lv_label_create(buttonBack, NULL);
lv_obj_t *labelAdd = lv_label_create(buttonAdd, NULL);
lv_obj_t *labelDec = lv_label_create(buttonDec, NULL);
labelType = lv_label_create(buttoType, NULL);
labelStep = lv_label_create(buttonStep, NULL);
labelSpeed = lv_label_create(buttonSpeed, NULL);
lv_obj_t *label_Back = lv_label_create(buttonBack, NULL);
if (gCfgItems.multiple_language != 0) {
lv_label_set_text(labelAdd, extrude_menu.in);

View File

@ -22,7 +22,7 @@
#pragma once
#ifdef __cplusplus
extern "C" { /* C-declarations for C++ */
extern "C" { /* C-declarations for C++ */
#endif
extern void lv_draw_extrusion(void);
@ -35,5 +35,5 @@ extern void disp_extru_amount();
//extern void disp_temp_ready_print();
#ifdef __cplusplus
} /* C-declarations for C++ */
} /* C-declarations for C++ */
#endif

View File

@ -140,12 +140,12 @@ void lv_draw_fan(void) {
LV_IMG_DECLARE(bmp_pic);
/*Create an Image button*/
buttonAdd = lv_imgbtn_create(scr, NULL);
buttonDec = lv_imgbtn_create(scr, NULL);
// Create an Image button
buttonAdd = lv_imgbtn_create(scr, NULL);
buttonDec = lv_imgbtn_create(scr, NULL);
buttonHigh = lv_imgbtn_create(scr, NULL);
buttonMid = lv_imgbtn_create(scr, NULL);
buttonOff = lv_imgbtn_create(scr, NULL);
buttonMid = lv_imgbtn_create(scr, NULL);
buttonOff = lv_imgbtn_create(scr, NULL);
buttonBack = lv_imgbtn_create(scr, NULL);
lv_obj_set_event_cb_mks(buttonAdd, event_handler, ID_F_ADD, "bmp_Add.bin", 0);
@ -154,6 +154,7 @@ void lv_draw_fan(void) {
lv_imgbtn_set_style(buttonAdd, LV_BTN_STATE_PR, &tft_style_label_pre);
lv_imgbtn_set_style(buttonAdd, LV_BTN_STATE_REL, &tft_style_label_rel);
lv_obj_clear_protect(buttonAdd, LV_PROTECT_FOLLOW);
#if 1
lv_obj_set_event_cb_mks(buttonDec, event_handler, ID_F_DEC, "bmp_Dec.bin", 0);
lv_imgbtn_set_src(buttonDec, LV_BTN_STATE_REL, &bmp_pic);
@ -184,6 +185,7 @@ void lv_draw_fan(void) {
lv_imgbtn_set_src(buttonBack, LV_BTN_STATE_PR, &bmp_pic);
lv_imgbtn_set_style(buttonBack, LV_BTN_STATE_PR, &tft_style_label_pre);
lv_imgbtn_set_style(buttonBack, LV_BTN_STATE_REL, &tft_style_label_rel);
#endif
lv_obj_set_pos(buttonAdd, INTERVAL_V, titleHeight);
@ -193,7 +195,7 @@ void lv_draw_fan(void) {
lv_obj_set_pos(buttonOff, BTN_X_PIXEL * 2 + INTERVAL_V * 3, BTN_Y_PIXEL + INTERVAL_H + titleHeight);
lv_obj_set_pos(buttonBack, BTN_X_PIXEL * 3 + INTERVAL_V * 4, BTN_Y_PIXEL + INTERVAL_H + titleHeight);
/*Create a label on the Image button*/
// Create labels on the image buttons
lv_btn_set_layout(buttonAdd, LV_LAYOUT_OFF);
lv_btn_set_layout(buttonDec, LV_LAYOUT_OFF);
lv_btn_set_layout(buttonHigh, LV_LAYOUT_OFF);
@ -201,13 +203,12 @@ void lv_draw_fan(void) {
lv_btn_set_layout(buttonOff, LV_LAYOUT_OFF);
lv_btn_set_layout(buttonBack, LV_LAYOUT_OFF);
lv_obj_t * labelAdd = lv_label_create(buttonAdd, NULL);
lv_obj_t * labelDec = lv_label_create(buttonDec, NULL);
lv_obj_t * labelHigh = lv_label_create(buttonHigh, NULL);
lv_obj_t * labelMid = lv_label_create(buttonMid, NULL);
lv_obj_t * labelOff = lv_label_create(buttonOff, NULL);
lv_obj_t * label_Back = lv_label_create(buttonBack, NULL);
lv_obj_t *labelAdd = lv_label_create(buttonAdd, NULL);
lv_obj_t *labelDec = lv_label_create(buttonDec, NULL);
lv_obj_t *labelHigh = lv_label_create(buttonHigh, NULL);
lv_obj_t *labelMid = lv_label_create(buttonMid, NULL);
lv_obj_t *labelOff = lv_label_create(buttonOff, NULL);
lv_obj_t *label_Back = lv_label_create(buttonBack, NULL);
if (gCfgItems.multiple_language != 0) {
lv_label_set_text(labelAdd, fan_menu.add);

View File

@ -22,7 +22,7 @@
#pragma once
#ifdef __cplusplus
extern "C" { /* C-declarations for C++ */
extern "C" { /* C-declarations for C++ */
#endif
extern void lv_draw_fan(void);
@ -31,5 +31,5 @@ extern void disp_fan_value();
//extern void disp_temp_ready_print();
#ifdef __cplusplus
} /* C-declarations for C++ */
} /* C-declarations for C++ */
#endif

View File

@ -96,7 +96,6 @@ static void event_handler(lv_obj_t * obj, lv_event_t event) {
lv_draw_tool();
}
break;
}
}

View File

@ -22,7 +22,7 @@
#pragma once
#ifdef __cplusplus
extern "C" { /* C-declarations for C++ */
extern "C" { /* C-declarations for C++ */
#endif
extern void lv_draw_home(void);
@ -30,5 +30,5 @@ extern void lv_clear_home();
//extern void disp_temp_ready_print();
#ifdef __cplusplus
} /* C-declarations for C++ */
} /* C-declarations for C++ */
#endif

View File

@ -22,12 +22,12 @@
#pragma once
#ifdef __cplusplus
extern "C" { /* C-declarations for C++ */
extern "C" { /* C-declarations for C++ */
#endif
extern void lv_draw_jerk_settings(void);
extern void lv_clear_jerk_settings();
#ifdef __cplusplus
} /* C-declarations for C++ */
} /* C-declarations for C++ */
#endif

View File

@ -246,7 +246,7 @@ void lv_draw_language(void) {
LV_IMG_DECLARE(bmp_pic);
/*Create an Image button*/
// Create image buttons
buttonCN = lv_imgbtn_create(scr, NULL);
buttonT_CN = lv_imgbtn_create(scr, NULL);
buttonEN = lv_imgbtn_create(scr, NULL);
@ -304,6 +304,7 @@ void lv_draw_language(void) {
lv_imgbtn_set_src(buttonBack, LV_BTN_STATE_PR, &bmp_pic);
lv_imgbtn_set_style(buttonBack, LV_BTN_STATE_PR, &tft_style_label_pre);
lv_imgbtn_set_style(buttonBack, LV_BTN_STATE_REL, &tft_style_label_rel);
#endif // if 1
lv_obj_set_pos(buttonCN, INTERVAL_V, titleHeight);
@ -315,7 +316,7 @@ void lv_draw_language(void) {
lv_obj_set_pos(buttonIT, BTN_X_PIXEL * 2 + INTERVAL_V * 3, BTN_Y_PIXEL + INTERVAL_H + titleHeight);
lv_obj_set_pos(buttonBack, BTN_X_PIXEL * 3 + INTERVAL_V * 4, BTN_Y_PIXEL + INTERVAL_H + titleHeight);
/*Create a label on the Image button*/
// Create labels on the image buttons
lv_btn_set_layout(buttonCN, LV_LAYOUT_OFF);
lv_btn_set_layout(buttonT_CN, LV_LAYOUT_OFF);
lv_btn_set_layout(buttonEN, LV_LAYOUT_OFF);
@ -325,14 +326,14 @@ void lv_draw_language(void) {
lv_btn_set_layout(buttonIT, LV_LAYOUT_OFF);
lv_btn_set_layout(buttonBack, LV_LAYOUT_OFF);
lv_obj_t * label_CN = lv_label_create(buttonCN, NULL);
lv_obj_t * label_T_CN = lv_label_create(buttonT_CN, NULL);
lv_obj_t * label_EN = lv_label_create(buttonEN, NULL);
lv_obj_t * label_RU = lv_label_create(buttonRU, NULL);
lv_obj_t * label_ES = lv_label_create(buttonES, NULL);
lv_obj_t * label_FR = lv_label_create(buttonFR, NULL);
lv_obj_t * label_IT = lv_label_create(buttonIT, NULL);
lv_obj_t * label_Back = lv_label_create(buttonBack, NULL);
lv_obj_t *label_CN = lv_label_create(buttonCN, NULL);
lv_obj_t *label_T_CN = lv_label_create(buttonT_CN, NULL);
lv_obj_t *label_EN = lv_label_create(buttonEN, NULL);
lv_obj_t *label_RU = lv_label_create(buttonRU, NULL);
lv_obj_t *label_ES = lv_label_create(buttonES, NULL);
lv_obj_t *label_FR = lv_label_create(buttonFR, NULL);
lv_obj_t *label_IT = lv_label_create(buttonIT, NULL);
lv_obj_t *label_Back = lv_label_create(buttonBack, NULL);
disp_language(gCfgItems.language, SELECTED);

View File

@ -22,7 +22,7 @@
#pragma once
#ifdef __cplusplus
extern "C" { /* C-declarations for C++ */
extern "C" { /* C-declarations for C++ */
#endif
extern void lv_draw_language(void);
@ -30,5 +30,5 @@ extern void lv_clear_language();
//extern void disp_temp_ready_print();
#ifdef __cplusplus
} /* C-declarations for C++ */
} /* C-declarations for C++ */
#endif

View File

@ -22,12 +22,12 @@
#pragma once
#ifdef __cplusplus
extern "C" { /* C-declarations for C++ */
extern "C" { /* C-declarations for C++ */
#endif
extern void lv_draw_machine_para(void);
extern void lv_clear_machine_para();
#ifdef __cplusplus
} /* C-declarations for C++ */
} /* C-declarations for C++ */
#endif

View File

@ -22,12 +22,12 @@
#pragma once
#ifdef __cplusplus
extern "C" { /* C-declarations for C++ */
extern "C" { /* C-declarations for C++ */
#endif
extern void lv_draw_machine_settings(void);
extern void lv_clear_machine_settings();
#ifdef __cplusplus
} /* C-declarations for C++ */
} /* C-declarations for C++ */
#endif

View File

@ -187,7 +187,7 @@ void lv_draw_manualLevel(void) {
LV_IMG_DECLARE(bmp_pic);
/*Create an Image button*/
// Create an Image button
buttonPoint1 = lv_imgbtn_create(scr, NULL);
buttonPoint2 = lv_imgbtn_create(scr, NULL);
buttonPoint3 = lv_imgbtn_create(scr, NULL);
@ -240,7 +240,7 @@ void lv_draw_manualLevel(void) {
lv_obj_set_pos(buttonPoint5, INTERVAL_V, BTN_Y_PIXEL + INTERVAL_H + titleHeight);
lv_obj_set_pos(buttonBack, BTN_X_PIXEL * 3 + INTERVAL_V * 4, BTN_Y_PIXEL + INTERVAL_H + titleHeight);
/*Create a label on the Image button*/
// Create labels on the image buttons
lv_btn_set_layout(buttonPoint1, LV_LAYOUT_OFF);
lv_btn_set_layout(buttonPoint2, LV_LAYOUT_OFF);
lv_btn_set_layout(buttonPoint3, LV_LAYOUT_OFF);
@ -248,12 +248,12 @@ void lv_draw_manualLevel(void) {
lv_btn_set_layout(buttonPoint5, LV_LAYOUT_OFF);
lv_btn_set_layout(buttonBack, LV_LAYOUT_OFF);
lv_obj_t * label_Point1 = lv_label_create(buttonPoint1, NULL);
lv_obj_t * label_Point2 = lv_label_create(buttonPoint2, NULL);
lv_obj_t * label_Point3 = lv_label_create(buttonPoint3, NULL);
lv_obj_t * label_Point4 = lv_label_create(buttonPoint4, 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_Point1 = lv_label_create(buttonPoint1, NULL);
lv_obj_t *label_Point2 = lv_label_create(buttonPoint2, NULL);
lv_obj_t *label_Point3 = lv_label_create(buttonPoint3, NULL);
lv_obj_t *label_Point4 = lv_label_create(buttonPoint4, NULL);
lv_obj_t *label_Point5 = lv_label_create(buttonPoint5, NULL);
lv_obj_t *label_Back = lv_label_create(buttonBack, NULL);
if (gCfgItems.multiple_language != 0) {
lv_label_set_text(label_Point1, leveling_menu.position1);

View File

@ -22,7 +22,7 @@
#pragma once
#ifdef __cplusplus
extern "C" { /* C-declarations for C++ */
extern "C" { /* C-declarations for C++ */
#endif
extern void lv_draw_manualLevel(void);
@ -30,5 +30,5 @@ extern void lv_clear_manualLevel();
//extern void disp_temp_ready_print();
#ifdef __cplusplus
} /* C-declarations for C++ */
} /* C-declarations for C++ */
#endif

View File

@ -22,12 +22,12 @@
#pragma once
#ifdef __cplusplus
extern "C" { /* C-declarations for C++ */
extern "C" { /* C-declarations for C++ */
#endif
extern void lv_draw_max_feedrate_settings(void);
extern void lv_clear_max_feedrate_settings();
#ifdef __cplusplus
} /* C-declarations for C++ */
} /* C-declarations for C++ */
#endif

View File

@ -22,12 +22,12 @@
#pragma once
#ifdef __cplusplus
extern "C" { /* C-declarations for C++ */
extern "C" { /* C-declarations for C++ */
#endif
extern void lv_draw_motor_settings(void);
extern void lv_clear_motor_settings();
#ifdef __cplusplus
} /* C-declarations for C++ */
} /* C-declarations for C++ */
#endif

View File

@ -34,7 +34,7 @@
static lv_obj_t * scr;
static lv_obj_t * labelV, *buttonV;
static lv_obj_t *labelV, *buttonV;
#define ID_M_X_P 1
#define ID_M_X_N 2
@ -181,7 +181,7 @@ void lv_draw_move_motor(void) {
LV_IMG_DECLARE(bmp_pic);
/*Create an Image button*/
// Create an Image button
buttonXI = lv_imgbtn_create(scr, NULL);
buttonXD = lv_imgbtn_create(scr, NULL);
buttonYI = lv_imgbtn_create(scr, NULL);
@ -249,7 +249,7 @@ void lv_draw_move_motor(void) {
lv_obj_set_pos(buttonZD, BTN_X_PIXEL * 2 + INTERVAL_V * 3, BTN_Y_PIXEL + INTERVAL_H + titleHeight);
lv_obj_set_pos(buttonBack, BTN_X_PIXEL * 3 + INTERVAL_V * 4, BTN_Y_PIXEL + INTERVAL_H + titleHeight);
/*Create a label on the Image button*/
// Create labels on the image buttons
lv_btn_set_layout(buttonXI, LV_LAYOUT_OFF);
lv_btn_set_layout(buttonXD, LV_LAYOUT_OFF);
lv_btn_set_layout(buttonYI, LV_LAYOUT_OFF);
@ -259,14 +259,14 @@ void lv_draw_move_motor(void) {
lv_btn_set_layout(buttonV, LV_LAYOUT_OFF);
lv_btn_set_layout(buttonBack, LV_LAYOUT_OFF);
lv_obj_t * labelXI = lv_label_create(buttonXI, NULL);
lv_obj_t * labelXD = lv_label_create(buttonXD, NULL);
lv_obj_t * labelYI = lv_label_create(buttonYI, NULL);
lv_obj_t * labelYD = lv_label_create(buttonYD, NULL);
lv_obj_t * labelZI = lv_label_create(buttonZI, NULL);
lv_obj_t * labelZD = lv_label_create(buttonZD, NULL);
lv_obj_t *labelXI = lv_label_create(buttonXI, NULL);
lv_obj_t *labelXD = lv_label_create(buttonXD, NULL);
lv_obj_t *labelYI = lv_label_create(buttonYI, NULL);
lv_obj_t *labelYD = lv_label_create(buttonYD, NULL);
lv_obj_t *labelZI = lv_label_create(buttonZI, NULL);
lv_obj_t *labelZD = lv_label_create(buttonZD, 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) {
lv_label_set_text(labelXI, move_menu.x_add);

View File

@ -22,7 +22,7 @@
#pragma once
#ifdef __cplusplus
extern "C" { /* C-declarations for C++ */
extern "C" { /* C-declarations for C++ */
#endif
extern void lv_draw_move_motor(void);
@ -31,5 +31,5 @@ extern void disp_move_dist();
//extern void disp_temp_ready_print();
#ifdef __cplusplus
} /* C-declarations for C++ */
} /* C-declarations for C++ */
#endif

View File

@ -34,8 +34,9 @@
#include "../../../../MarlinCore.h"
#include "../../../../module/temperature.h"
#include "../../../../gcode/queue.h"
#if ENABLED(POWER_LOSS_RECOVERY)
#include "../../../../../feature/powerloss.h"
#include "../../../../feature/powerloss.h"
#endif
#include "../../../../gcode/gcode.h"
@ -253,15 +254,12 @@ static void set_value_confirm() {
switch (value) {
case PrintAcceleration:
planner.settings.acceleration = atof(key_value);
break;
case RetractAcceleration:
planner.settings.retract_acceleration = atof(key_value);
break;
case TravelAcceleration:
planner.settings.travel_acceleration = atof(key_value);
break;
case XAcceleration:
planner.settings.max_acceleration_mm_per_s2[X_AXIS] = atof(key_value);
@ -293,7 +291,6 @@ static void set_value_confirm() {
case E1MaxFeedRate:
planner.settings.max_feedrate_mm_s[E_AXIS_N(1)] = atof(key_value);
break;
case XJerk:
#if HAS_CLASSIC_JERK
planner.max_jerk[X_AXIS] = atof(key_value);
@ -314,7 +311,6 @@ static void set_value_confirm() {
planner.max_jerk[E_AXIS] = atof(key_value);
#endif
break;
case Xstep:
planner.settings.axis_steps_per_mm[X_AXIS] = atof(key_value);
break;
@ -330,43 +326,36 @@ static void set_value_confirm() {
case E1step:
planner.settings.axis_steps_per_mm[E_AXIS_N(1)] = atof(key_value);
break;
case Xcurrent:
#if AXIS_IS_TMC(X)
current_mA = atoi(key_value);
stepperX.rms_current(current_mA);
#endif
break;
case Ycurrent:
#if AXIS_IS_TMC(Y)
current_mA = atoi(key_value);
stepperY.rms_current(current_mA);
#endif
break;
case Zcurrent:
#if AXIS_IS_TMC(Z)
current_mA = atoi(key_value);
stepperZ.rms_current(current_mA);
#endif
break;
case E0current:
#if AXIS_IS_TMC(E0)
current_mA = atoi(key_value);
stepperE0.rms_current(current_mA);
#endif
break;
case E1current:
#if AXIS_IS_TMC(E1)
current_mA = atoi(key_value);
stepperE1.rms_current(current_mA);
#endif
break;
break;
case pause_pos_x:
gCfgItems.pausePosX = atof(key_value);
update_spi_flash();

View File

@ -22,12 +22,12 @@
#pragma once
#ifdef __cplusplus
extern "C" { /* C-declarations for C++ */
extern "C" { /* C-declarations for C++ */
#endif
extern void lv_draw_number_key(void);
extern void lv_clear_number_key();
#ifdef __cplusplus
} /* C-declarations for C++ */
} /* C-declarations for C++ */
#endif

View File

@ -22,7 +22,7 @@
#pragma once
#ifdef __cplusplus
extern "C" { /* C-declarations for C++ */
extern "C" { /* C-declarations for C++ */
#endif
extern void lv_draw_operation(void);
@ -30,5 +30,5 @@ extern void lv_clear_operation();
//extern void disp_temp_ready_print();
#ifdef __cplusplus
} /* C-declarations for C++ */
} /* C-declarations for C++ */
#endif

View File

@ -22,12 +22,12 @@
#pragma once
#ifdef __cplusplus
extern "C" { /* C-declarations for C++ */
extern "C" { /* C-declarations for C++ */
#endif
extern void lv_draw_pause_message(const PauseMessage msg);
//extern void disp_temp_ready_print();
#ifdef __cplusplus
} /* C-declarations for C++ */
} /* C-declarations for C++ */
#endif

View File

@ -22,12 +22,12 @@
#pragma once
#ifdef __cplusplus
extern "C" { /* C-declarations for C++ */
extern "C" { /* C-declarations for C++ */
#endif
extern void lv_draw_pause_position(void);
extern void lv_clear_pause_position();
#ifdef __cplusplus
} /* C-declarations for C++ */
} /* C-declarations for C++ */
#endif

View File

@ -267,7 +267,7 @@ void lv_draw_preHeat(void) {
lv_obj_set_pos(buttonOff, BTN_X_PIXEL * 2 + INTERVAL_V * 3, BTN_Y_PIXEL + INTERVAL_H + titleHeight);
lv_obj_set_pos(buttonBack, BTN_X_PIXEL * 3 + INTERVAL_V * 4, BTN_Y_PIXEL + INTERVAL_H + titleHeight);
/*Create a label on the Image button*/
// Create labels on the image buttons
lv_btn_set_layout(buttonAdd, LV_LAYOUT_OFF);
lv_btn_set_layout(buttonDec, LV_LAYOUT_OFF);
lv_btn_set_layout(buttoType, LV_LAYOUT_OFF);
@ -275,13 +275,12 @@ void lv_draw_preHeat(void) {
lv_btn_set_layout(buttonOff, LV_LAYOUT_OFF);
lv_btn_set_layout(buttonBack, LV_LAYOUT_OFF);
lv_obj_t * labelAdd = lv_label_create(buttonAdd, NULL);
lv_obj_t * labelDec = lv_label_create(buttonDec, NULL);
lv_obj_t *labelAdd = lv_label_create(buttonAdd, NULL);
lv_obj_t *labelDec = lv_label_create(buttonDec, NULL);
labelType = lv_label_create(buttoType, NULL);
labelStep = lv_label_create(buttonStep, NULL);
lv_obj_t * labelOff = lv_label_create(buttonOff, NULL);
lv_obj_t * label_Back = lv_label_create(buttonBack, NULL);
lv_obj_t *labelOff = lv_label_create(buttonOff, NULL);
lv_obj_t *label_Back = lv_label_create(buttonBack, NULL);
if (gCfgItems.multiple_language != 0) {
lv_label_set_text(labelAdd, preheat_menu.add);
@ -306,7 +305,6 @@ void lv_draw_preHeat(void) {
}
void disp_temp_type() {
if (uiCfg.curTempType == 0) {
if (uiCfg.curSprayerChoose == 1) {
lv_obj_set_event_cb_mks(buttoType, event_handler, ID_P_TYPE, "bmp_extru2.bin", 0);
@ -331,7 +329,6 @@ void disp_temp_type() {
lv_obj_align(labelType, buttoType, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET);
}
}
}
void disp_desire_temp() {

View File

@ -22,7 +22,7 @@
#pragma once
#ifdef __cplusplus
extern "C" { /* C-declarations for C++ */
extern "C" { /* C-declarations for C++ */
#endif
extern void lv_draw_preHeat(void);
@ -33,5 +33,5 @@ extern void disp_desire_temp();
//extern void disp_temp_ready_print();
#ifdef __cplusplus
} /* C-declarations for C++ */
} /* C-declarations for C++ */
#endif

View File

@ -305,6 +305,7 @@ void disp_gcode_icon(uint8_t file_num) {
lv_refr_now(lv_refr_get_disp_refreshing());
// Create image buttons
buttonPageUp = lv_imgbtn_create(scr, NULL);
buttonPageDown = lv_imgbtn_create(scr, NULL);
buttonBack = lv_imgbtn_create(scr, NULL);
@ -334,8 +335,7 @@ void disp_gcode_icon(uint8_t file_num) {
lv_obj_set_pos(buttonPageDown, OTHER_BTN_XPIEL * 3 + INTERVAL_V * 4, titleHeight + OTHER_BTN_YPIEL + INTERVAL_H);
lv_obj_set_pos(buttonBack, OTHER_BTN_XPIEL * 3 + INTERVAL_V * 4, titleHeight + OTHER_BTN_YPIEL * 2 + INTERVAL_H * 2);
/*Create a label on the Image button*/
// Create labels on the image buttons
lv_btn_set_layout(buttonPageUp, LV_LAYOUT_OFF);
lv_btn_set_layout(buttonPageDown, LV_LAYOUT_OFF);
lv_btn_set_layout(buttonBack, LV_LAYOUT_OFF);

View File

@ -22,7 +22,7 @@
#pragma once
#ifdef __cplusplus
extern "C" { /* C-declarations for C++ */
extern "C" { /* C-declarations for C++ */
#endif
typedef struct {
@ -61,5 +61,5 @@ extern void lv_clear_print_file();
//extern void disp_temp_ready_print();
#ifdef __cplusplus
} /* C-declarations for C++ */
} /* C-declarations for C++ */
#endif

View File

@ -22,7 +22,7 @@
#pragma once
#ifdef __cplusplus
extern "C" { /* C-declarations for C++ */
extern "C" { /* C-declarations for C++ */
#endif
#define IDLE 0
@ -48,5 +48,5 @@ extern void setProBarRate();
//extern void disp_temp_ready_print();
#ifdef __cplusplus
} /* C-declarations for C++ */
} /* C-declarations for C++ */
#endif

View File

@ -159,7 +159,7 @@ void lv_draw_ready_print(void) {
//lv_obj_set_pos(title,TITLE_XPOS,TITLE_YPOS);
//lv_label_set_text(title, creat_title_text());
/*Create an Image button*/
// Create image buttons
//buttonPrint = lv_imgbtn_create(scr, NULL);
buttonTool = lv_imgbtn_create(scr, NULL);
//buttonSet = lv_imgbtn_create(scr, NULL);
@ -196,14 +196,14 @@ void lv_draw_ready_print(void) {
//lv_obj_set_pos(buttonSet,BTN_X_PIXEL+SIMPLE_FIRST_PAGE_GRAP*2+1,(TFT_HEIGHT-BTN_Y_PIXEL)/2+2);
//lv_obj_set_pos(buttonPrint,BTN_X_PIXEL*2+SIMPLE_FIRST_PAGE_GRAP*3+1,(TFT_HEIGHT-BTN_Y_PIXEL)/2+2);
/*Create a label on the Image button*/
// Create labels on the image buttons
//lv_btn_set_layout(buttonPrint, LV_LAYOUT_OFF);
//lv_btn_set_layout(buttonSet, LV_LAYOUT_OFF);
lv_btn_set_layout(buttonTool, LV_LAYOUT_OFF);
//lv_obj_t * label_print = lv_label_create(buttonPrint, 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_print = lv_label_create(buttonPrint, NULL);
//lv_obj_t *label_set = lv_label_create(buttonSet, NULL);
lv_obj_t *label_tool = lv_label_create(buttonTool, NULL);
if (gCfgItems.multiple_language != 0) {
//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);

View File

@ -22,7 +22,7 @@
#pragma once
#ifdef __cplusplus
extern "C" { /* C-declarations for C++ */
extern "C" { /* C-declarations for C++ */
#endif
extern void lv_draw_ready_print(void);
@ -35,5 +35,5 @@ extern void lv_clear_ready_print();
//extern void disp_temp_ready_print();
#ifdef __cplusplus
} /* C-declarations for C++ */
} /* C-declarations for C++ */
#endif

View File

@ -22,7 +22,7 @@
#pragma once
#ifdef __cplusplus
extern "C" { /* C-declarations for C++ */
extern "C" { /* C-declarations for C++ */
#endif
extern void lv_draw_set(void);
@ -30,5 +30,5 @@ extern void lv_clear_set();
//extern void disp_temp_ready_print();
#ifdef __cplusplus
} /* C-declarations for C++ */
} /* C-declarations for C++ */
#endif

View File

@ -22,12 +22,12 @@
#pragma once
#ifdef __cplusplus
extern "C" { /* C-declarations for C++ */
extern "C" { /* C-declarations for C++ */
#endif
extern void lv_draw_step_settings(void);
extern void lv_clear_step_settings();
#ifdef __cplusplus
} /* C-declarations for C++ */
} /* C-declarations for C++ */
#endif

View File

@ -25,6 +25,7 @@
#include "lv_conf.h"
#include "draw_ui.h"
#include "../../../../MarlinCore.h"
#include "../../../../module/planner.h"
#include "../../../../module/stepper/indirection.h"

View File

@ -22,13 +22,13 @@
#pragma once
#ifdef __cplusplus
extern "C" { /* C-declarations for C++ */
extern "C" { /* C-declarations for C++ */
#endif
extern void lv_draw_tmc_current_settings(void);
extern void lv_clear_tmc_current_settings();
#ifdef __cplusplus
} /* C-declarations for C++ */
} /* C-declarations for C++ */
#endif

View File

@ -22,12 +22,12 @@
#pragma once
#ifdef __cplusplus
extern "C" { /* C-declarations for C++ */
extern "C" { /* C-declarations for C++ */
#endif
extern void lv_draw_tmc_step_mode_settings(void);
extern void lv_clear_tmc_step_mode_settings();
#ifdef __cplusplus
} /* C-declarations for C++ */
} /* C-declarations for C++ */
#endif

View File

@ -140,7 +140,7 @@ void lv_draw_tool(void) {
LV_IMG_DECLARE(bmp_pic);
/*Create an Image button*/
// Create image buttons
buttonPreHeat = lv_imgbtn_create(scr, NULL);
buttonExtrusion = lv_imgbtn_create(scr, NULL);
buttonMove = lv_imgbtn_create(scr, NULL);
@ -210,7 +210,7 @@ void lv_draw_tool(void) {
//lv_obj_set_pos(buttonMore,BTN_X_PIXEL*2+INTERVAL_V*3, BTN_Y_PIXEL+INTERVAL_H+titleHeight);
lv_obj_set_pos(buttonBack, BTN_X_PIXEL * 3 + INTERVAL_V * 4, BTN_Y_PIXEL + INTERVAL_H + titleHeight);
/*Create a label on the Image button*/
// Create labels on the image buttons
lv_btn_set_layout(buttonPreHeat, LV_LAYOUT_OFF);
lv_btn_set_layout(buttonExtrusion, LV_LAYOUT_OFF);
lv_btn_set_layout(buttonMove, LV_LAYOUT_OFF);

View File

@ -22,7 +22,7 @@
#pragma once
#ifdef __cplusplus
extern "C" { /* C-declarations for C++ */
extern "C" { /* C-declarations for C++ */
#endif
extern void lv_draw_tool(void);
@ -30,5 +30,5 @@ extern void lv_clear_tool();
//extern void disp_temp_ready_print();
#ifdef __cplusplus
} /* C-declarations for C++ */
} /* C-declarations for C++ */
#endif

View File

@ -328,5 +328,5 @@ extern void LV_TASK_HANDLER();
extern void lv_ex_line(lv_obj_t * line, lv_point_t *points);
#ifdef __cplusplus
} /* C-declarations for C++ */
} /* C-declarations for C++ */
#endif

View File

@ -124,7 +124,7 @@
#define VAR_INF_ADDR 0x000000
#ifdef __cplusplus
extern "C" { /* C-declarations for C++ */
extern "C" { /* C-declarations for C++ */
#endif
union union32 {
@ -157,5 +157,5 @@ extern void default_view_Read(uint8_t *default_view_Rbuff, uint32_t default_view
extern void flash_view_Read(uint8_t *flash_view_Rbuff, uint32_t flash_view_Readsize);
#ifdef __cplusplus
} /* C-declarations for C++ */
} /* C-declarations for C++ */
#endif

View File

@ -51,6 +51,7 @@ void printer_state_polling() {
if (uiCfg.waitEndMoves > 20) {
uiCfg.waitEndMoves = 0;
planner.synchronize();
gcode.process_subcommands_now_P(PSTR("M25"));
if (gCfgItems.pausePosZ != (float)-1) {
gcode.process_subcommands_now_P(PSTR("G91"));

View File

@ -22,7 +22,7 @@
#pragma once
#ifdef __cplusplus
extern "C" { /* C-declarations for C++ */
extern "C" { /* C-declarations for C++ */
#endif
#define MIN_FILE_PRINTED 100 //5000
@ -32,5 +32,5 @@ extern void filament_pin_setup();
extern void filament_check();
#ifdef __cplusplus
} /* C-declarations for C++ */
} /* C-declarations for C++ */
#endif

View File

@ -22,9 +22,9 @@
#pragma once
#ifdef __cplusplus
extern "C" { /* C-declarations for C++ */
extern "C" { /* C-declarations for C++ */
#endif
#ifdef __cplusplus
} /* C-declarations for C++ */
} /* C-declarations for C++ */
#endif