|
@@ -336,7 +336,7 @@ void ICON_Button(const bool selected, const int iconid, const frame_rect_t &ico,
|
|
//
|
|
//
|
|
void ICON_Print() {
|
|
void ICON_Print() {
|
|
constexpr frame_rect_t ico = { 17, 110, 110, 100 };
|
|
constexpr frame_rect_t ico = { 17, 110, 110, 100 };
|
|
- constexpr text_info_t txt = { 1, { 405, TERN(USE_STOCK_DWIN_SET, 446, 447) }, 27, 15 };
|
|
|
|
|
|
+ constexpr text_info_t txt = { 1, { 405, 447 }, 27, 15 };
|
|
ICON_Button(select_page.now == PAGE_PRINT, ICON_Print_0, ico, txt, GET_TEXT_F(MSG_BUTTON_PRINT));
|
|
ICON_Button(select_page.now == PAGE_PRINT, ICON_Print_0, ico, txt, GET_TEXT_F(MSG_BUTTON_PRINT));
|
|
}
|
|
}
|
|
|
|
|
|
@@ -345,7 +345,7 @@ void ICON_Print() {
|
|
//
|
|
//
|
|
void ICON_Prepare() {
|
|
void ICON_Prepare() {
|
|
constexpr frame_rect_t ico = { 145, 110, 110, 100 };
|
|
constexpr frame_rect_t ico = { 145, 110, 110, 100 };
|
|
- constexpr text_info_t txt = { 31, { 405, TERN(USE_STOCK_DWIN_SET, 446, 447) }, 27, 15 };
|
|
|
|
|
|
+ constexpr text_info_t txt = { 31, { 405, 447 }, 27, 15 };
|
|
ICON_Button(select_page.now == PAGE_PREPARE, ICON_Prepare_0, ico, txt, GET_TEXT_F(MSG_PREPARE));
|
|
ICON_Button(select_page.now == PAGE_PREPARE, ICON_Prepare_0, ico, txt, GET_TEXT_F(MSG_PREPARE));
|
|
}
|
|
}
|
|
|
|
|
|
@@ -354,7 +354,7 @@ void ICON_Prepare() {
|
|
//
|
|
//
|
|
void ICON_Control() {
|
|
void ICON_Control() {
|
|
constexpr frame_rect_t ico = { 17, 226, 110, 100 };
|
|
constexpr frame_rect_t ico = { 17, 226, 110, 100 };
|
|
- constexpr text_info_t txt = { 61, { 405, TERN(USE_STOCK_DWIN_SET, 446, 447) }, 27, 15 };
|
|
|
|
|
|
+ constexpr text_info_t txt = { 61, { 405, 447 }, 27, 15 };
|
|
ICON_Button(select_page.now == PAGE_CONTROL, ICON_Control_0, ico, txt, GET_TEXT_F(MSG_CONTROL));
|
|
ICON_Button(select_page.now == PAGE_CONTROL, ICON_Control_0, ico, txt, GET_TEXT_F(MSG_CONTROL));
|
|
}
|
|
}
|
|
|
|
|
|
@@ -363,7 +363,7 @@ void ICON_Control() {
|
|
//
|
|
//
|
|
void ICON_AdvSettings() {
|
|
void ICON_AdvSettings() {
|
|
constexpr frame_rect_t ico = { 145, 226, 110, 100 };
|
|
constexpr frame_rect_t ico = { 145, 226, 110, 100 };
|
|
- constexpr text_info_t txt = { 91, { 405, TERN(USE_STOCK_DWIN_SET, 446, 447) }, 27, 15 };
|
|
|
|
|
|
+ constexpr text_info_t txt = { 91, { 405, 447 }, 27, 15 };
|
|
ICON_Button(select_page.now == PAGE_ADVANCE, ICON_Info_0, ico, txt, GET_TEXT_F(MSG_BUTTON_ADVANCED));
|
|
ICON_Button(select_page.now == PAGE_ADVANCE, ICON_Info_0, ico, txt, GET_TEXT_F(MSG_BUTTON_ADVANCED));
|
|
}
|
|
}
|
|
|
|
|
|
@@ -372,7 +372,7 @@ void ICON_AdvSettings() {
|
|
//
|
|
//
|
|
void ICON_Tune() {
|
|
void ICON_Tune() {
|
|
constexpr frame_rect_t ico = { 8, 232, 80, 100 };
|
|
constexpr frame_rect_t ico = { 8, 232, 80, 100 };
|
|
- constexpr text_info_t txt = { 121, { 405, TERN(USE_STOCK_DWIN_SET, 446, 447) }, 27, 15 };
|
|
|
|
|
|
+ constexpr text_info_t txt = { 121, { 405, 447 }, 27, 15 };
|
|
ICON_Button(select_print.now == PRINT_SETUP, ICON_Setup_0, ico, txt, GET_TEXT_F(MSG_TUNE));
|
|
ICON_Button(select_print.now == PRINT_SETUP, ICON_Setup_0, ico, txt, GET_TEXT_F(MSG_TUNE));
|
|
}
|
|
}
|
|
|
|
|
|
@@ -381,7 +381,7 @@ void ICON_Tune() {
|
|
//
|
|
//
|
|
void ICON_Pause() {
|
|
void ICON_Pause() {
|
|
constexpr frame_rect_t ico = { 96, 232, 80, 100 };
|
|
constexpr frame_rect_t ico = { 96, 232, 80, 100 };
|
|
- constexpr text_info_t txt = { 181, { 405, TERN(USE_STOCK_DWIN_SET, 446, 447) }, 27, 15 };
|
|
|
|
|
|
+ constexpr text_info_t txt = { 181, { 405, 447 }, 27, 15 };
|
|
ICON_Button(select_print.now == PRINT_PAUSE_RESUME, ICON_Pause_0, ico, txt, GET_TEXT_F(MSG_BUTTON_PAUSE));
|
|
ICON_Button(select_print.now == PRINT_PAUSE_RESUME, ICON_Pause_0, ico, txt, GET_TEXT_F(MSG_BUTTON_PAUSE));
|
|
}
|
|
}
|
|
|
|
|
|
@@ -390,7 +390,7 @@ void ICON_Pause() {
|
|
//
|
|
//
|
|
void ICON_Resume() {
|
|
void ICON_Resume() {
|
|
constexpr frame_rect_t ico = { 96, 232, 80, 100 };
|
|
constexpr frame_rect_t ico = { 96, 232, 80, 100 };
|
|
- constexpr text_info_t txt = { 1, { 405, TERN(USE_STOCK_DWIN_SET, 446, 447) }, 27, 15 };
|
|
|
|
|
|
+ constexpr text_info_t txt = { 1, { 405, 447 }, 27, 15 };
|
|
ICON_Button(select_print.now == PRINT_PAUSE_RESUME, ICON_Continue_0, ico, txt, GET_TEXT_F(MSG_BUTTON_RESUME));
|
|
ICON_Button(select_print.now == PRINT_PAUSE_RESUME, ICON_Continue_0, ico, txt, GET_TEXT_F(MSG_BUTTON_RESUME));
|
|
}
|
|
}
|
|
|
|
|
|
@@ -399,7 +399,7 @@ void ICON_Resume() {
|
|
//
|
|
//
|
|
void ICON_Stop() {
|
|
void ICON_Stop() {
|
|
constexpr frame_rect_t ico = { 184, 232, 80, 100 };
|
|
constexpr frame_rect_t ico = { 184, 232, 80, 100 };
|
|
- constexpr text_info_t txt = { 151, { 405, TERN(USE_STOCK_DWIN_SET, 446, 447) }, 27, 12 };
|
|
|
|
|
|
+ constexpr text_info_t txt = { 151, { 405, 447 }, 27, 12 };
|
|
ICON_Button(select_print.now == PRINT_STOP, ICON_Stop_0, ico, txt, GET_TEXT_F(MSG_BUTTON_STOP));
|
|
ICON_Button(select_print.now == PRINT_STOP, ICON_Stop_0, ico, txt, GET_TEXT_F(MSG_BUTTON_STOP));
|
|
}
|
|
}
|
|
|
|
|
|
@@ -482,8 +482,7 @@ void dwinResetStatusLine() {
|
|
// Djb2 hash algorithm
|
|
// Djb2 hash algorithm
|
|
uint32_t getHash(char * str) {
|
|
uint32_t getHash(char * str) {
|
|
uint32_t hash = 5381;
|
|
uint32_t hash = 5381;
|
|
- char c;
|
|
|
|
- while ((c = *str++)) hash = ((hash << 5) + hash) + c; /* hash * 33 + c */
|
|
|
|
|
|
+ for (char c; (c = *str++);) hash = ((hash << 5) + hash) + c; /* hash * 33 + c */
|
|
return hash;
|
|
return hash;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1943,13 +1942,7 @@ void dwinRedrawScreen() {
|
|
case PAUSE_MESSAGE_INSERT: dwinPopupPause(GET_TEXT_F(MSG_FILAMENT_CHANGE_INSERT), BTN_Continue); break;
|
|
case PAUSE_MESSAGE_INSERT: dwinPopupPause(GET_TEXT_F(MSG_FILAMENT_CHANGE_INSERT), BTN_Continue); break;
|
|
case PAUSE_MESSAGE_LOAD: dwinPopupPause(GET_TEXT_F(MSG_FILAMENT_CHANGE_LOAD)); break;
|
|
case PAUSE_MESSAGE_LOAD: dwinPopupPause(GET_TEXT_F(MSG_FILAMENT_CHANGE_LOAD)); break;
|
|
case PAUSE_MESSAGE_UNLOAD: dwinPopupPause(GET_TEXT_F(MSG_FILAMENT_CHANGE_UNLOAD)); break; // Unload of pause and Unload of M702
|
|
case PAUSE_MESSAGE_UNLOAD: dwinPopupPause(GET_TEXT_F(MSG_FILAMENT_CHANGE_UNLOAD)); break; // Unload of pause and Unload of M702
|
|
- case PAUSE_MESSAGE_PURGE:
|
|
|
|
- #if ENABLED(ADVANCED_PAUSE_CONTINUOUS_PURGE)
|
|
|
|
- dwinPopupPause(GET_TEXT_F(MSG_FILAMENT_CHANGE_CONT_PURGE));
|
|
|
|
- #else
|
|
|
|
- dwinPopupPause(GET_TEXT_F(MSG_FILAMENT_CHANGE_PURGE));
|
|
|
|
- #endif
|
|
|
|
- break;
|
|
|
|
|
|
+ case PAUSE_MESSAGE_PURGE: dwinPopupPause(GET_TEXT_F(TERN(ADVANCED_PAUSE_CONTINUOUS_PURGE, MSG_FILAMENT_CHANGE_CONT_PURGE, MSG_FILAMENT_CHANGE_PURGE))); break;
|
|
case PAUSE_MESSAGE_OPTION: gotoFilamentPurge(); break;
|
|
case PAUSE_MESSAGE_OPTION: gotoFilamentPurge(); break;
|
|
case PAUSE_MESSAGE_RESUME: dwinPopupPause(GET_TEXT_F(MSG_FILAMENT_CHANGE_RESUME)); break;
|
|
case PAUSE_MESSAGE_RESUME: dwinPopupPause(GET_TEXT_F(MSG_FILAMENT_CHANGE_RESUME)); break;
|
|
case PAUSE_MESSAGE_HEAT: dwinPopupPause(GET_TEXT_F(MSG_FILAMENT_CHANGE_HEAT), BTN_Continue); break;
|
|
case PAUSE_MESSAGE_HEAT: dwinPopupPause(GET_TEXT_F(MSG_FILAMENT_CHANGE_HEAT), BTN_Continue); break;
|
|
@@ -3141,7 +3134,7 @@ void drawControlMenu() {
|
|
#if ENABLED(EEPROM_SETTINGS)
|
|
#if ENABLED(EEPROM_SETTINGS)
|
|
MENU_ITEM(ICON_WriteEEPROM, MSG_STORE_EEPROM, onDrawWriteEeprom, writeEEPROM);
|
|
MENU_ITEM(ICON_WriteEEPROM, MSG_STORE_EEPROM, onDrawWriteEeprom, writeEEPROM);
|
|
MENU_ITEM(ICON_ReadEEPROM, MSG_LOAD_EEPROM, onDrawReadEeprom, readEEPROM);
|
|
MENU_ITEM(ICON_ReadEEPROM, MSG_LOAD_EEPROM, onDrawReadEeprom, readEEPROM);
|
|
- MENU_ITEM(ICON_ResumeEEPROM, MSG_RESTORE_DEFAULTS, onDrawResetEeprom, resetEEPROM);
|
|
|
|
|
|
+ MENU_ITEM(ICON_ResetEEPROM, MSG_RESTORE_DEFAULTS, onDrawResetEeprom, resetEEPROM);
|
|
#endif
|
|
#endif
|
|
MENU_ITEM(ICON_Reboot, MSG_RESET_PRINTER, onDrawMenuItem, rebootPrinter);
|
|
MENU_ITEM(ICON_Reboot, MSG_RESET_PRINTER, onDrawMenuItem, rebootPrinter);
|
|
MENU_ITEM(ICON_Info, MSG_INFO_SCREEN, onDrawInfoSubMenu, gotoInfoMenu);
|
|
MENU_ITEM(ICON_Info, MSG_INFO_SCREEN, onDrawInfoSubMenu, gotoInfoMenu);
|
|
@@ -3957,8 +3950,8 @@ void drawStepsMenu() {
|
|
if (SET_MENU(zOffsetWizMenu, MSG_PROBE_WIZARD, 4)) {
|
|
if (SET_MENU(zOffsetWizMenu, MSG_PROBE_WIZARD, 4)) {
|
|
BACK_ITEM(drawPrepareMenu);
|
|
BACK_ITEM(drawPrepareMenu);
|
|
MENU_ITEM(ICON_Homing, MSG_AUTO_HOME, onDrawMenuItem, autoHome);
|
|
MENU_ITEM(ICON_Homing, MSG_AUTO_HOME, onDrawMenuItem, autoHome);
|
|
- MENU_ITEM_F(ICON_MoveZ0, "Move Z to Home", onDrawMenuItem, setMoveZto0);
|
|
|
|
- EDIT_ITEM(ICON_Zoffset, MSG_ZPROBE_ZOFFSET, onDrawPFloat2Menu, setZOffset, &BABY_Z_VAR);
|
|
|
|
|
|
+ MENU_ITEM(ICON_MoveZ0, MSG_MOVE_NOZZLE_TO_BED, onDrawMenuItem, setMoveZto0);
|
|
|
|
+ EDIT_ITEM(ICON_Zoffset, MSG_XATC_UPDATE_Z_OFFSET, onDrawPFloat2Menu, setZOffset, &BABY_Z_VAR);
|
|
}
|
|
}
|
|
updateMenu(zOffsetWizMenu);
|
|
updateMenu(zOffsetWizMenu);
|
|
if (!axis_is_trusted(Z_AXIS)) LCD_MESSAGE_F("WARNING: Z position unknown, move Z to home");
|
|
if (!axis_is_trusted(Z_AXIS)) LCD_MESSAGE_F("WARNING: Z position unknown, move Z to home");
|