MKS prelim. cleanup (2)
This commit is contained in:
parent
c753fc690f
commit
12a39450b0
|
@ -55,20 +55,16 @@ static void event_handler(lv_obj_t *obj, lv_event_t event) {
|
||||||
switch (obj->mks_obj_id) {
|
switch (obj->mks_obj_id) {
|
||||||
case ID_E_ADD:
|
case ID_E_ADD:
|
||||||
if (thermalManager.temp_hotend[uiCfg.curSprayerChoose].celsius >= EXTRUDE_MINTEMP) {
|
if (thermalManager.temp_hotend[uiCfg.curSprayerChoose].celsius >= EXTRUDE_MINTEMP) {
|
||||||
queue.enqueue_now_P(PSTR("G91"));
|
sprintf_P((char *)public_buf_l, PSTR("G91\nG1 E%d F%d\nG90"), uiCfg.extruStep, 60 * uiCfg.extruSpeed);
|
||||||
sprintf_P((char *)public_buf_l, PSTR("G1 E%d F%d"), uiCfg.extruStep, 60 * uiCfg.extruSpeed);
|
queue.inject(public_buf_l);
|
||||||
queue.enqueue_one_now(public_buf_l);
|
|
||||||
queue.enqueue_now_P(PSTR("G90"));
|
|
||||||
extrudeAmount += uiCfg.extruStep;
|
extrudeAmount += uiCfg.extruStep;
|
||||||
disp_extru_amount();
|
disp_extru_amount();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case ID_E_DEC:
|
case ID_E_DEC:
|
||||||
if (thermalManager.temp_hotend[uiCfg.curSprayerChoose].celsius >= EXTRUDE_MINTEMP) {
|
if (thermalManager.temp_hotend[uiCfg.curSprayerChoose].celsius >= EXTRUDE_MINTEMP) {
|
||||||
queue.enqueue_now_P(PSTR("G91"));
|
sprintf_P((char *)public_buf_l, PSTR("G91\nG1 E%d F%d\nG90"), 0 - uiCfg.extruStep, 60 * uiCfg.extruSpeed);
|
||||||
sprintf_P((char *)public_buf_l, PSTR("G1 E%d F%d"), 0 - uiCfg.extruStep, 60 * uiCfg.extruSpeed);
|
|
||||||
queue.enqueue_one_now(public_buf_l);
|
queue.enqueue_one_now(public_buf_l);
|
||||||
queue.enqueue_now_P(PSTR("G90"));
|
|
||||||
extrudeAmount -= uiCfg.extruStep;
|
extrudeAmount -= uiCfg.extruStep;
|
||||||
disp_extru_amount();
|
disp_extru_amount();
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,10 +59,8 @@ void printer_state_polling() {
|
||||||
uiCfg.current_z_position_bak = current_position.z;
|
uiCfg.current_z_position_bak = current_position.z;
|
||||||
|
|
||||||
if (gCfgItems.pausePosZ != (float)-1) {
|
if (gCfgItems.pausePosZ != (float)-1) {
|
||||||
gcode.process_subcommands_now_P(PSTR("G91"));
|
sprintf_P(public_buf_l, PSTR("G91\nG1 Z%.1f\nG90"), gCfgItems.pausePosZ);
|
||||||
sprintf_P(public_buf_l, PSTR("G1 Z%.1f"), gCfgItems.pausePosZ);
|
|
||||||
gcode.process_subcommands_now(public_buf_l);
|
gcode.process_subcommands_now(public_buf_l);
|
||||||
gcode.process_subcommands_now_P(PSTR("G90"));
|
|
||||||
}
|
}
|
||||||
if (gCfgItems.pausePosX != (float)-1 && gCfgItems.pausePosY != (float)-1) {
|
if (gCfgItems.pausePosX != (float)-1 && gCfgItems.pausePosY != (float)-1) {
|
||||||
sprintf_P(public_buf_l, PSTR("G1 X%.1f Y%.1f"), gCfgItems.pausePosX, gCfgItems.pausePosY);
|
sprintf_P(public_buf_l, PSTR("G1 X%.1f Y%.1f"), gCfgItems.pausePosX, gCfgItems.pausePosY);
|
||||||
|
@ -128,10 +126,8 @@ void printer_state_polling() {
|
||||||
gcode.process_subcommands_now(public_buf_m);
|
gcode.process_subcommands_now(public_buf_m);
|
||||||
|
|
||||||
if (gCfgItems.pause_reprint && gCfgItems.pausePosZ != -1.0f) {
|
if (gCfgItems.pause_reprint && gCfgItems.pausePosZ != -1.0f) {
|
||||||
gcode.process_subcommands_now_P(PSTR("G91"));
|
sprintf_P(public_buf_l, PSTR("G91\nG1 Z-%.1f\nG90"), gCfgItems.pausePosZ);
|
||||||
sprintf_P(public_buf_l, PSTR("G1 Z-%.1f"), gCfgItems.pausePosZ);
|
|
||||||
gcode.process_subcommands_now(public_buf_l);
|
gcode.process_subcommands_now(public_buf_l);
|
||||||
gcode.process_subcommands_now_P(PSTR("G90"));
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
uiCfg.print_state = WORKING;
|
uiCfg.print_state = WORKING;
|
||||||
|
|
|
@ -945,27 +945,13 @@ void disp_language_init() {
|
||||||
filesys_menu.usb_sys = U_DISK_TEXT_CN;
|
filesys_menu.usb_sys = U_DISK_TEXT_CN;
|
||||||
//
|
//
|
||||||
more_menu.title = TITLE_MORE_CN;
|
more_menu.title = TITLE_MORE_CN;
|
||||||
#if ENABLED(USER_CMD_1_ENABLE)
|
TERN_(USER_CMD_1_ENABLE, more_menu.custom1 = MORE_CUSTOM1_TEXT_CN);
|
||||||
more_menu.custom1 = MORE_CUSTOM1_TEXT_CN;
|
TERN_(USER_CMD_2_ENABLE, more_menu.custom2 = MORE_CUSTOM2_TEXT_CN);
|
||||||
#endif
|
TERN_(USER_CMD_3_ENABLE, more_menu.custom3 = MORE_CUSTOM3_TEXT_CN);
|
||||||
#if ENABLED(USER_CMD_2_ENABLE)
|
TERN_(USER_CMD_4_ENABLE, more_menu.custom4 = MORE_CUSTOM4_TEXT_CN);
|
||||||
more_menu.custom2 = MORE_CUSTOM2_TEXT_CN;
|
TERN_(USER_CMD_5_ENABLE, more_menu.custom5 = MORE_CUSTOM5_TEXT_CN);
|
||||||
#endif
|
TERN_(USER_CMD_6_ENABLE, more_menu.custom6 = MORE_CUSTOM6_TEXT_CN);
|
||||||
#if ENABLED(USER_CMD_3_ENABLE)
|
TERN_(USER_CMD_7_ENABLE, more_menu.custom7 = MORE_CUSTOM7_TEXT_CN);
|
||||||
more_menu.custom3 = MORE_CUSTOM3_TEXT_CN;
|
|
||||||
#endif
|
|
||||||
#if ENABLED(USER_CMD_4_ENABLE)
|
|
||||||
more_menu.custom4 = MORE_CUSTOM4_TEXT_CN;
|
|
||||||
#endif
|
|
||||||
#if ENABLED(USER_CMD_5_ENABLE)
|
|
||||||
more_menu.custom5 = MORE_CUSTOM5_TEXT_CN;
|
|
||||||
#endif
|
|
||||||
#if ENABLED(USER_CMD_6_ENABLE)
|
|
||||||
more_menu.custom6 = MORE_CUSTOM6_TEXT_CN;
|
|
||||||
#endif
|
|
||||||
#if ENABLED(USER_CMD_7_ENABLE)
|
|
||||||
more_menu.custom7 = MORE_CUSTOM7_TEXT_CN;
|
|
||||||
#endif
|
|
||||||
// WIFI
|
// WIFI
|
||||||
wifi_menu.title = WIFI_TEXT;
|
wifi_menu.title = WIFI_TEXT;
|
||||||
wifi_menu.cloud = CLOUD_TEXT_CN;
|
wifi_menu.cloud = CLOUD_TEXT_CN;
|
||||||
|
@ -1191,27 +1177,13 @@ void disp_language_init() {
|
||||||
filesys_menu.usb_sys = U_DISK_TEXT_T_CN;
|
filesys_menu.usb_sys = U_DISK_TEXT_T_CN;
|
||||||
//
|
//
|
||||||
more_menu.title = TITLE_MORE_T_CN;
|
more_menu.title = TITLE_MORE_T_CN;
|
||||||
#if ENABLED(USER_CMD_1_ENABLE)
|
TERN_(USER_CMD_1_ENABLE, more_menu.custom1 = MORE_CUSTOM1_TEXT_T_CN);
|
||||||
more_menu.custom1 = MORE_CUSTOM1_TEXT_T_CN;
|
TERN_(USER_CMD_2_ENABLE, more_menu.custom2 = MORE_CUSTOM2_TEXT_T_CN);
|
||||||
#endif
|
TERN_(USER_CMD_3_ENABLE, more_menu.custom3 = MORE_CUSTOM3_TEXT_T_CN);
|
||||||
#if ENABLED(USER_CMD_2_ENABLE)
|
TERN_(USER_CMD_4_ENABLE, more_menu.custom4 = MORE_CUSTOM4_TEXT_T_CN);
|
||||||
more_menu.custom2 = MORE_CUSTOM2_TEXT_T_CN;
|
TERN_(USER_CMD_5_ENABLE, more_menu.custom5 = MORE_CUSTOM5_TEXT_T_CN);
|
||||||
#endif
|
TERN_(USER_CMD_6_ENABLE, more_menu.custom6 = MORE_CUSTOM6_TEXT_T_CN);
|
||||||
#if ENABLED(USER_CMD_3_ENABLE)
|
TERN_(USER_CMD_7_ENABLE, more_menu.custom7 = MORE_CUSTOM7_TEXT_T_CN);
|
||||||
more_menu.custom3 = MORE_CUSTOM3_TEXT_T_CN;
|
|
||||||
#endif
|
|
||||||
#if ENABLED(USER_CMD_4_ENABLE)
|
|
||||||
more_menu.custom4 = MORE_CUSTOM4_TEXT_T_CN;
|
|
||||||
#endif
|
|
||||||
#if ENABLED(USER_CMD_5_ENABLE)
|
|
||||||
more_menu.custom5 = MORE_CUSTOM5_TEXT_T_CN;
|
|
||||||
#endif
|
|
||||||
#if ENABLED(USER_CMD_6_ENABLE)
|
|
||||||
more_menu.custom6 = MORE_CUSTOM6_TEXT_T_CN;
|
|
||||||
#endif
|
|
||||||
#if ENABLED(USER_CMD_7_ENABLE)
|
|
||||||
more_menu.custom7 = MORE_CUSTOM7_TEXT_T_CN;
|
|
||||||
#endif
|
|
||||||
// WIFI
|
// WIFI
|
||||||
wifi_menu.title = WIFI_TEXT;
|
wifi_menu.title = WIFI_TEXT;
|
||||||
wifi_menu.cloud = CLOUD_TEXT_T_CN;
|
wifi_menu.cloud = CLOUD_TEXT_T_CN;
|
||||||
|
|
Loading…
Reference in a new issue