From 41ad1f0e3895ed62c44c9b5ab35ecb2e4b8c2864 Mon Sep 17 00:00:00 2001 From: classicrocker883 Date: Sat, 27 Apr 2024 17:15:54 -0400 Subject: [PATCH 1/3] change to GET_TEXT_F --- Marlin/Configuration.h | 12 ++++++------ Marlin/Configuration_adv.h | 4 ++-- Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp | 6 +++--- Marlin/src/feature/stepper_driver_safety.cpp | 2 +- Marlin/src/gcode/bedlevel/abl/G29.cpp | 4 ++-- Marlin/src/gcode/bedlevel/mbl/G29.cpp | 2 +- Marlin/src/gcode/calibrate/M48.cpp | 2 +- Marlin/src/lcd/e3v2/proui/printstats.cpp | 4 ++-- Marlin/src/module/endstops.cpp | 2 +- Marlin/src/module/temperature.cpp | 6 +++--- 10 files changed, 22 insertions(+), 22 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 72ec272b4d99..2b03bde44b29 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -2039,11 +2039,11 @@ * leveling in steps so you can manually adjust the Z height at each grid-point. * With an LCD controller the process is guided step-by-step. */ -//#define AUTO_BED_LEVELING_3POINT +#define AUTO_BED_LEVELING_3POINT //#define AUTO_BED_LEVELING_LINEAR -//#define AUTO_BED_LEVELING_BILINEAR +#define AUTO_BED_LEVELING_BILINEAR //#define AUTO_BED_LEVELING_UBL -//#define MESH_BED_LEVELING +#define MESH_BED_LEVELING /** * Commands to execute at the end of G29 probing. @@ -2555,7 +2555,7 @@ * * View the current statistics with M78. */ -//#define PRINTCOUNTER +#define PRINTCOUNTER #if ENABLED(PRINTCOUNTER) #define PRINTCOUNTER_SAVE_INTERVAL 60 // (minutes) EEPROM save interval during print. A value of 0 will save stats at end of print. #endif @@ -2648,7 +2648,7 @@ * SD Card support is disabled by default. If your controller has an SD slot, * you must uncomment the following option or it won't work. */ -//#define SDSUPPORT +#define SDSUPPORT /** * SD CARD: ENABLE CRC @@ -3402,7 +3402,7 @@ // Ender-3 v2 OEM display. A DWIN display with Rotary Encoder. // //#define DWIN_CREALITY_LCD // Creality UI -//#define DWIN_LCD_PROUI // Pro UI by MRiscoC +#define DWIN_LCD_PROUI // Pro UI by MRiscoC //#define DWIN_CREALITY_LCD_JYERSUI // Jyers UI by Jacob Myers //#define DWIN_MARLINUI_PORTRAIT // MarlinUI (portrait orientation) //#define DWIN_MARLINUI_LANDSCAPE // MarlinUI (landscape orientation) diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index f0066338c177..e023064be885 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -1020,7 +1020,7 @@ * Z Steppers Auto-Alignment * Add the G34 command to align multiple Z steppers using a bed probe. */ -//#define Z_STEPPER_AUTO_ALIGN +#define Z_STEPPER_AUTO_ALIGN #if ENABLED(Z_STEPPER_AUTO_ALIGN) /** * Define probe X and Y positions for Z1, Z2 [, Z3 [, Z4]] @@ -4246,7 +4246,7 @@ * Implemented as G34 because M915 is deprecated. * @section calibrate */ -//#define MECHANICAL_GANTRY_CALIBRATION +#define MECHANICAL_GANTRY_CALIBRATION #if ENABLED(MECHANICAL_GANTRY_CALIBRATION) #define GANTRY_CALIBRATION_CURRENT 600 // Default calibration current in ma #define GANTRY_CALIBRATION_EXTRA_HEIGHT 15 // Extra distance in mm past Z_###_POS to move diff --git a/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp b/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp index fcf408b34ed1..4637bf87e828 100644 --- a/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp +++ b/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp @@ -765,7 +765,7 @@ void unified_bed_leveling::shift_mesh_height() { const grid_count_t point_num = (GRID_MAX_POINTS - count) + 1; SERIAL_ECHOLNPGM("Probing mesh point ", point_num, "/", GRID_MAX_POINTS, "."); - TERN_(HAS_STATUS_MESSAGE, ui.status_printf(0, F(S_FMT " %i/%i"), GET_TEXT(MSG_PROBING_POINT), point_num, int(GRID_MAX_POINTS))); + TERN_(HAS_STATUS_MESSAGE, ui.status_printf(0, F(S_FMT " %i/%i"), GET_TEXT_F(MSG_PROBING_POINT), point_num, int(GRID_MAX_POINTS))); TERN_(HAS_BACKLIGHT_TIMEOUT, ui.refresh_backlight_timeout()); #if HAS_MARLINUI_MENU @@ -1494,7 +1494,7 @@ void unified_bed_leveling::smart_fill_mesh() { for (uint8_t i = 0; i < 3; ++i) { SERIAL_ECHOLNPGM("Tilting mesh (", i + 1, "/3)"); - TERN_(HAS_STATUS_MESSAGE, ui.status_printf(0, F(S_FMT " %i/3"), GET_TEXT(MSG_LCD_TILTING_MESH), i + 1)); + TERN_(HAS_STATUS_MESSAGE, ui.status_printf(0, F(S_FMT " %i/3"), GET_TEXT_F(MSG_LCD_TILTING_MESH), i + 1)); measured_z = probe.probe_at_point(points[i], i < 2 ? PROBE_PT_RAISE : PROBE_PT_LAST_STOW, param.V_verbosity); if ((abort_flag = isnan(measured_z))) break; @@ -1550,7 +1550,7 @@ void unified_bed_leveling::smart_fill_mesh() { #endif SERIAL_ECHOLNPGM("Tilting mesh point ", point_num, "/", total_points, "\n"); - TERN_(HAS_STATUS_MESSAGE, ui.status_printf(0, F(S_FMT " %i/%i"), GET_TEXT(MSG_LCD_TILTING_MESH), point_num, total_points)); + TERN_(HAS_STATUS_MESSAGE, ui.status_printf(0, F(S_FMT " %i/%i"), GET_TEXT_F(MSG_LCD_TILTING_MESH), point_num, total_points)); measured_z = probe.probe_at_point(rpos, parser.seen_test('E') ? PROBE_PT_STOW : PROBE_PT_RAISE, param.V_verbosity); // TODO: Needs error handling diff --git a/Marlin/src/feature/stepper_driver_safety.cpp b/Marlin/src/feature/stepper_driver_safety.cpp index acdd695909db..3ddc05ea1ec2 100644 --- a/Marlin/src/feature/stepper_driver_safety.cpp +++ b/Marlin/src/feature/stepper_driver_safety.cpp @@ -31,7 +31,7 @@ static uint32_t axis_plug_backward = 0; void stepper_driver_backward_error(FSTR_P const fstr) { SERIAL_ERROR_START(); SERIAL_ECHOLN(fstr, F(" driver is backward!")); - ui.status_printf(2, F(S_FMT S_FMT), FTOP(fstr), GET_TEXT(MSG_DRIVER_BACKWARD)); + ui.status_printf(2, F(S_FMT S_FMT), FTOP(fstr), GET_TEXT_F(MSG_DRIVER_BACKWARD)); } void stepper_driver_backward_check() { diff --git a/Marlin/src/gcode/bedlevel/abl/G29.cpp b/Marlin/src/gcode/bedlevel/abl/G29.cpp index 449c25fefdc3..d97fc48906b2 100644 --- a/Marlin/src/gcode/bedlevel/abl/G29.cpp +++ b/Marlin/src/gcode/bedlevel/abl/G29.cpp @@ -683,7 +683,7 @@ G29_TYPE GcodeSuite::G29() { if (TERN0(IS_KINEMATIC, !probe.can_reach(abl.probePos))) continue; if (abl.verbose_level) SERIAL_ECHOLNPGM("Probing mesh point ", pt_index, "/", abl.abl_points, "."); - TERN_(HAS_STATUS_MESSAGE, ui.status_printf(0, F(S_FMT " %i/%i"), GET_TEXT(MSG_PROBING_POINT), int(pt_index), int(abl.abl_points))); + TERN_(HAS_STATUS_MESSAGE, ui.status_printf(0, F(S_FMT " %i/%i"), GET_TEXT_F(MSG_PROBING_POINT), int(pt_index), int(abl.abl_points))); #if ENABLED(BD_SENSOR_PROBE_NO_STOP) if (PR_INNER_VAR == inStart) { @@ -782,7 +782,7 @@ G29_TYPE GcodeSuite::G29() { for (uint8_t i = 0; i < 3; ++i) { if (abl.verbose_level) SERIAL_ECHOLNPGM("Probing point ", i + 1, "/3."); - TERN_(HAS_STATUS_MESSAGE, ui.status_printf(0, F(S_FMT " %i/3"), GET_TEXT(MSG_PROBING_POINT), int(i + 1))); + TERN_(HAS_STATUS_MESSAGE, ui.status_printf(0, F(S_FMT " %i/3"), GET_TEXT_F(MSG_PROBING_POINT), int(i + 1))); // Retain the last probe position abl.probePos = xy_pos_t(points[i]); diff --git a/Marlin/src/gcode/bedlevel/mbl/G29.cpp b/Marlin/src/gcode/bedlevel/mbl/G29.cpp index c9c04b4f0ca0..6d23de4f77b4 100644 --- a/Marlin/src/gcode/bedlevel/mbl/G29.cpp +++ b/Marlin/src/gcode/bedlevel/mbl/G29.cpp @@ -253,7 +253,7 @@ void GcodeSuite::G29() { if (state == MeshNext) { SERIAL_ECHOLNPGM("MBL G29 point ", _MIN(mbl_probe_index, GRID_MAX_POINTS), " of ", GRID_MAX_POINTS); - if (mbl_probe_index > 0) TERN_(HAS_STATUS_MESSAGE, ui.status_printf(0, F(S_FMT " %i/%i"), GET_TEXT(MSG_PROBING_POINT), _MIN(mbl_probe_index, GRID_MAX_POINTS), int(GRID_MAX_POINTS))); + if (mbl_probe_index > 0) TERN_(HAS_STATUS_MESSAGE, ui.status_printf(0, F(S_FMT " %i/%i"), GET_TEXT_F(MSG_PROBING_POINT), _MIN(mbl_probe_index, GRID_MAX_POINTS), int(GRID_MAX_POINTS))); } report_current_position(); diff --git a/Marlin/src/gcode/calibrate/M48.cpp b/Marlin/src/gcode/calibrate/M48.cpp index 8dd951e054b3..910395e5617c 100644 --- a/Marlin/src/gcode/calibrate/M48.cpp +++ b/Marlin/src/gcode/calibrate/M48.cpp @@ -149,7 +149,7 @@ void GcodeSuite::M48() { for (uint8_t n = 0; n < n_samples; ++n) { #if HAS_STATUS_MESSAGE // Display M48 progress in the status bar - ui.status_printf(0, F(S_FMT ": %d/%d"), GET_TEXT(MSG_M48_POINT), int(n + 1), int(n_samples)); + ui.status_printf(0, F(S_FMT ": %d/%d"), GET_TEXT_F(MSG_M48_POINT), int(n + 1), int(n_samples)); #endif // When there are "legs" of movement move around the point before probing diff --git a/Marlin/src/lcd/e3v2/proui/printstats.cpp b/Marlin/src/lcd/e3v2/proui/printstats.cpp index 732e80542d16..2942261b7cd1 100644 --- a/Marlin/src/lcd/e3v2/proui/printstats.cpp +++ b/Marlin/src/lcd/e3v2/proui/printstats.cpp @@ -55,9 +55,9 @@ void PrintStats::draw() { DWINUI::drawString(MRG, 80, TS(GET_TEXT_F(MSG_INFO_PRINT_COUNT), F(": "), ps.totalPrints)); DWINUI::drawString(MRG, 100, TS(GET_TEXT_F(MSG_INFO_COMPLETED_PRINTS), F(": "), ps.finishedPrints)); duration_t(print_job_timer.getStats().printTime).toDigital(str, true); - DWINUI::drawString(MRG, 120, MString<50>(GET_TEXT_F(MSG_INFO_PRINT_TIME), F(": "), str)); + DWINUI::drawString(MRG, 120, TS(GET_TEXT_F(MSG_INFO_PRINT_TIME), F(": "), str)); duration_t(print_job_timer.getStats().longestPrint).toDigital(str, true); - DWINUI::drawString(MRG, 140, MString<50>(GET_TEXT(MSG_INFO_PRINT_LONGEST), F(": "), str)); + DWINUI::drawString(MRG, 140, TS(GET_TEXT_F(MSG_INFO_PRINT_LONGEST), F(": "), str)); DWINUI::drawString(MRG, 160, TS(GET_TEXT_F(MSG_INFO_PRINT_FILAMENT), F(": "), p_float_t(ps.filamentUsed / 1000, 2), F(" m"))); } diff --git a/Marlin/src/module/endstops.cpp b/Marlin/src/module/endstops.cpp index 490d6bc2cefb..09154b65a20f 100644 --- a/Marlin/src/module/endstops.cpp +++ b/Marlin/src/module/endstops.cpp @@ -351,7 +351,7 @@ void Endstops::event_handler() { TERN_(HAS_STATUS_MESSAGE, ui.status_printf(0, F(S_FMT GANG_N_1(NUM_AXES, " %c") " %c"), - GET_TEXT(MSG_LCD_ENDSTOPS), + GET_TEXT_F(MSG_LCD_ENDSTOPS), NUM_AXIS_LIST_(chrX, chrY, chrZ, chrI, chrJ, chrK, chrU, chrV, chrW) chrP ) ); diff --git a/Marlin/src/module/temperature.cpp b/Marlin/src/module/temperature.cpp index 1fa7eaae0df3..95d2da38f188 100644 --- a/Marlin/src/module/temperature.cpp +++ b/Marlin/src/module/temperature.cpp @@ -806,7 +806,7 @@ volatile bool Temperature::raw_temps_ready = false; } } SHV((bias + d) >> 1); - TERN_(HAS_STATUS_MESSAGE, ui.status_printf(0, F(S_FMT " %i/%i"), GET_TEXT(MSG_PID_CYCLE), cycles, ncycles)); + TERN_(HAS_STATUS_MESSAGE, ui.status_printf(0, F(S_FMT " %i/%i"), GET_TEXT_F(MSG_PID_CYCLE), cycles, ncycles)); cycles++; minT = target; } @@ -2019,7 +2019,7 @@ void Temperature::mintemp_error(const heater_id_t heater_id OPTARG(ERR_INCLUDE_T if (watch_cooler.elapsed(ms)) { // Time to check the cooler? const auto deg = degCooler(); if (deg > watch_cooler.target) // Failed to decrease enough? - _TEMP_ERROR(H_COOLER, GET_EN_TEXT_F(MSG_ERR_COOLING_FAILED), MSG_ERR_COOLING_FAILED, deg); + _TEMP_ERROR(H_COOLER, GET_TEXT_F(MSG_ERR_COOLING_FAILED), MSG_ERR_COOLING_FAILED, deg); else start_watching_cooler(); // Start again if the target is still far off } @@ -4434,7 +4434,7 @@ void Temperature::isr() { #else F("E1 " S_FMT) #endif - , heating ? GET_TEXT(MSG_HEATING) : GET_TEXT(MSG_COOLING) + , heating ? GET_TEXT_F(MSG_HEATING) : GET_TEXT_F(MSG_COOLING) ); if (isM104) { From b47a3c06528f85affc8109dbe0380584d6da1a1f Mon Sep 17 00:00:00 2001 From: classicrocker883 Date: Mon, 29 Apr 2024 09:53:30 -0400 Subject: [PATCH 2/3] revert configs --- Marlin/Configuration.h | 12 ++++++------ Marlin/Configuration_adv.h | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 2b03bde44b29..72ec272b4d99 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -2039,11 +2039,11 @@ * leveling in steps so you can manually adjust the Z height at each grid-point. * With an LCD controller the process is guided step-by-step. */ -#define AUTO_BED_LEVELING_3POINT +//#define AUTO_BED_LEVELING_3POINT //#define AUTO_BED_LEVELING_LINEAR -#define AUTO_BED_LEVELING_BILINEAR +//#define AUTO_BED_LEVELING_BILINEAR //#define AUTO_BED_LEVELING_UBL -#define MESH_BED_LEVELING +//#define MESH_BED_LEVELING /** * Commands to execute at the end of G29 probing. @@ -2555,7 +2555,7 @@ * * View the current statistics with M78. */ -#define PRINTCOUNTER +//#define PRINTCOUNTER #if ENABLED(PRINTCOUNTER) #define PRINTCOUNTER_SAVE_INTERVAL 60 // (minutes) EEPROM save interval during print. A value of 0 will save stats at end of print. #endif @@ -2648,7 +2648,7 @@ * SD Card support is disabled by default. If your controller has an SD slot, * you must uncomment the following option or it won't work. */ -#define SDSUPPORT +//#define SDSUPPORT /** * SD CARD: ENABLE CRC @@ -3402,7 +3402,7 @@ // Ender-3 v2 OEM display. A DWIN display with Rotary Encoder. // //#define DWIN_CREALITY_LCD // Creality UI -#define DWIN_LCD_PROUI // Pro UI by MRiscoC +//#define DWIN_LCD_PROUI // Pro UI by MRiscoC //#define DWIN_CREALITY_LCD_JYERSUI // Jyers UI by Jacob Myers //#define DWIN_MARLINUI_PORTRAIT // MarlinUI (portrait orientation) //#define DWIN_MARLINUI_LANDSCAPE // MarlinUI (landscape orientation) diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index e023064be885..f0066338c177 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -1020,7 +1020,7 @@ * Z Steppers Auto-Alignment * Add the G34 command to align multiple Z steppers using a bed probe. */ -#define Z_STEPPER_AUTO_ALIGN +//#define Z_STEPPER_AUTO_ALIGN #if ENABLED(Z_STEPPER_AUTO_ALIGN) /** * Define probe X and Y positions for Z1, Z2 [, Z3 [, Z4]] @@ -4246,7 +4246,7 @@ * Implemented as G34 because M915 is deprecated. * @section calibrate */ -#define MECHANICAL_GANTRY_CALIBRATION +//#define MECHANICAL_GANTRY_CALIBRATION #if ENABLED(MECHANICAL_GANTRY_CALIBRATION) #define GANTRY_CALIBRATION_CURRENT 600 // Default calibration current in ma #define GANTRY_CALIBRATION_EXTRA_HEIGHT 15 // Extra distance in mm past Z_###_POS to move From a874aeda2770fb5b8739314513280ffe82679526 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Mon, 6 May 2024 18:56:39 -0500 Subject: [PATCH 3/3] fix status_printf in kill_screen --- Marlin/src/lcd/marlinui.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/src/lcd/marlinui.cpp b/Marlin/src/lcd/marlinui.cpp index ef78dc2f1dc3..dad17814c6c9 100644 --- a/Marlin/src/lcd/marlinui.cpp +++ b/Marlin/src/lcd/marlinui.cpp @@ -739,7 +739,7 @@ void MarlinUI::init() { void MarlinUI::kill_screen(FSTR_P const lcd_error, FSTR_P const lcd_component) { init(); - status_printf(1, F(S_FMT ": " S_FMT), FTOP(lcd_error), FTOP(lcd_component)); + status_printf(1, F(S_FMT ": " S_FMT), lcd_error, lcd_component); TERN_(HAS_MARLINUI_MENU, return_to_status()); // RED ALERT. RED ALERT.