Browse Source

Use a STR_ prefix for non-translated strings

pull/1/head
Scott Lahteine 5 years ago
parent
commit
e78f607ef3
  1. 2
      Marlin/src/HAL/HAL_AVR/persistent_store_eeprom.cpp
  2. 2
      Marlin/src/HAL/HAL_AVR/watchdog.cpp
  3. 2
      Marlin/src/HAL/HAL_DUE/persistent_store_eeprom.cpp
  4. 2
      Marlin/src/HAL/HAL_SAMD51/persistent_store_eeprom.cpp
  5. 2
      Marlin/src/HAL/HAL_STM32/persistent_store_impl.cpp
  6. 2
      Marlin/src/HAL/HAL_STM32F1/persistent_store_eeprom.cpp
  7. 2
      Marlin/src/HAL/HAL_STM32_F4_F7/persistent_store_eeprom.cpp
  8. 2
      Marlin/src/HAL/HAL_TEENSY31_32/persistent_store_impl.cpp
  9. 2
      Marlin/src/HAL/HAL_TEENSY35_36/persistent_store_eeprom.cpp
  10. 28
      Marlin/src/MarlinCore.cpp
  11. 408
      Marlin/src/core/language.h
  12. 2
      Marlin/src/core/serial.cpp
  13. 4
      Marlin/src/feature/bltouch.cpp
  14. 4
      Marlin/src/feature/pause.cpp
  15. 2
      Marlin/src/feature/prusa_MMU2/mmu2.cpp
  16. 2
      Marlin/src/feature/solenoid.cpp
  17. 2
      Marlin/src/gcode/bedlevel/G42.cpp
  18. 4
      Marlin/src/gcode/bedlevel/M420.cpp
  19. 4
      Marlin/src/gcode/bedlevel/abl/M421.cpp
  20. 4
      Marlin/src/gcode/bedlevel/mbl/M421.cpp
  21. 4
      Marlin/src/gcode/bedlevel/ubl/M421.cpp
  22. 6
      Marlin/src/gcode/calibrate/G28.cpp
  23. 2
      Marlin/src/gcode/calibrate/M852.cpp
  24. 2
      Marlin/src/gcode/config/M218.cpp
  25. 2
      Marlin/src/gcode/config/M301.cpp
  26. 16
      Marlin/src/gcode/control/M111.cpp
  27. 6
      Marlin/src/gcode/control/M211.cpp
  28. 2
      Marlin/src/gcode/control/M605.cpp
  29. 2
      Marlin/src/gcode/control/M80_M81.cpp
  30. 4
      Marlin/src/gcode/feature/pause/G60.cpp
  31. 4
      Marlin/src/gcode/feature/pause/G61.cpp
  32. 12
      Marlin/src/gcode/gcode.cpp
  33. 2
      Marlin/src/gcode/geometry/M206_M428.cpp
  34. 2
      Marlin/src/gcode/host/M115.cpp
  35. 2
      Marlin/src/gcode/lcd/M145.cpp
  36. 2
      Marlin/src/gcode/motion/G0_G1.cpp
  37. 4
      Marlin/src/gcode/motion/G2_G3.cpp
  38. 2
      Marlin/src/gcode/motion/G4.cpp
  39. 2
      Marlin/src/gcode/motion/G5.cpp
  40. 6
      Marlin/src/gcode/motion/M290.cpp
  41. 2
      Marlin/src/gcode/parser.cpp
  42. 4
      Marlin/src/gcode/probe/M851.cpp
  43. 22
      Marlin/src/gcode/queue.cpp
  44. 4
      Marlin/src/gcode/sdcard/M20.cpp
  45. 2
      Marlin/src/gcode/temperature/M105.cpp
  46. 2
      Marlin/src/gcode/temperature/M303.cpp
  47. 8
      Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/marlin_events.cpp
  48. 4
      Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/advanced_settings_menu.cpp
  49. 2
      Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/bio_advanced_settings.cpp
  50. 28
      Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/endstop_state_screen.cpp
  51. 2
      Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/nozzle_offsets_screen.cpp
  52. 2
      Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/nudge_nozzle_screen.cpp
  53. 8
      Marlin/src/lcd/extui_dgus_lcd.cpp
  54. 6
      Marlin/src/lcd/menu/menu_advanced.cpp
  55. 2
      Marlin/src/lcd/menu/menu_configuration.cpp
  56. 48
      Marlin/src/lcd/menu/menu_tmc.cpp
  57. 12
      Marlin/src/module/endstops.cpp
  58. 6
      Marlin/src/module/motion.cpp
  59. 4
      Marlin/src/module/planner.cpp
  60. 8
      Marlin/src/module/printcounter.cpp
  61. 4
      Marlin/src/module/probe.cpp
  62. 4
      Marlin/src/module/stepper.cpp
  63. 75
      Marlin/src/module/temperature.cpp
  64. 6
      Marlin/src/module/tool_change.cpp
  65. 38
      Marlin/src/sd/cardreader.cpp

2
Marlin/src/HAL/HAL_AVR/persistent_store_eeprom.cpp

@ -39,7 +39,7 @@ bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, ui
if (v != eeprom_read_byte(p)) { if (v != eeprom_read_byte(p)) {
eeprom_write_byte(p, v); eeprom_write_byte(p, v);
if (eeprom_read_byte(p) != v) { if (eeprom_read_byte(p) != v) {
SERIAL_ECHO_MSG(MSG_ERR_EEPROM_WRITE); SERIAL_ECHO_MSG(STR_ERR_EEPROM_WRITE);
return true; return true;
} }
} }

2
Marlin/src/HAL/HAL_AVR/watchdog.cpp

@ -62,7 +62,7 @@ void watchdog_init() {
#if ENABLED(WATCHDOG_RESET_MANUAL) #if ENABLED(WATCHDOG_RESET_MANUAL)
ISR(WDT_vect) { ISR(WDT_vect) {
sei(); // With the interrupt driven serial we need to allow interrupts. sei(); // With the interrupt driven serial we need to allow interrupts.
SERIAL_ERROR_MSG(MSG_WATCHDOG_FIRED); SERIAL_ERROR_MSG(STR_WATCHDOG_FIRED);
minkill(); // interrupt-safe final kill and infinite loop minkill(); // interrupt-safe final kill and infinite loop
} }
#endif #endif

2
Marlin/src/HAL/HAL_DUE/persistent_store_eeprom.cpp

@ -54,7 +54,7 @@ bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, ui
eeprom_write_byte(p, v); eeprom_write_byte(p, v);
delay(2); delay(2);
if (eeprom_read_byte(p) != v) { if (eeprom_read_byte(p) != v) {
SERIAL_ECHO_MSG(MSG_ERR_EEPROM_WRITE); SERIAL_ECHO_MSG(STR_ERR_EEPROM_WRITE);
return true; return true;
} }
} }

2
Marlin/src/HAL/HAL_SAMD51/persistent_store_eeprom.cpp

@ -72,7 +72,7 @@ bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, ui
eeprom_write_byte(p, v); eeprom_write_byte(p, v);
delay(2); delay(2);
if (eeprom_read_byte(p) != v) { if (eeprom_read_byte(p) != v) {
SERIAL_ECHO_MSG(MSG_ERR_EEPROM_WRITE); SERIAL_ECHO_MSG(STR_ERR_EEPROM_WRITE);
return true; return true;
} }
} }

2
Marlin/src/HAL/HAL_STM32/persistent_store_impl.cpp

@ -48,7 +48,7 @@ bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, ui
if (v != eeprom_read_byte(p)) { if (v != eeprom_read_byte(p)) {
eeprom_write_byte(p, v); eeprom_write_byte(p, v);
if (eeprom_read_byte(p) != v) { if (eeprom_read_byte(p) != v) {
SERIAL_ECHO_MSG(MSG_ERR_EEPROM_WRITE); SERIAL_ECHO_MSG(STR_ERR_EEPROM_WRITE);
return true; return true;
} }
} }

2
Marlin/src/HAL/HAL_STM32F1/persistent_store_eeprom.cpp

@ -49,7 +49,7 @@ bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, ui
if (v != eeprom_read_byte(p)) { if (v != eeprom_read_byte(p)) {
eeprom_write_byte(p, v); eeprom_write_byte(p, v);
if (eeprom_read_byte(p) != v) { if (eeprom_read_byte(p) != v) {
SERIAL_ECHO_MSG(MSG_ERR_EEPROM_WRITE); SERIAL_ECHO_MSG(STR_ERR_EEPROM_WRITE);
return true; return true;
} }
} }

2
Marlin/src/HAL/HAL_STM32_F4_F7/persistent_store_eeprom.cpp

@ -41,7 +41,7 @@ bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, ui
if (v != eeprom_read_byte(p)) { if (v != eeprom_read_byte(p)) {
eeprom_write_byte(p, v); eeprom_write_byte(p, v);
if (eeprom_read_byte(p) != v) { if (eeprom_read_byte(p) != v) {
SERIAL_ECHO_MSG(MSG_ERR_EEPROM_WRITE); SERIAL_ECHO_MSG(STR_ERR_EEPROM_WRITE);
return true; return true;
} }
} }

2
Marlin/src/HAL/HAL_TEENSY31_32/persistent_store_impl.cpp

@ -36,7 +36,7 @@ bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, ui
if (v != eeprom_read_byte(p)) { if (v != eeprom_read_byte(p)) {
eeprom_write_byte(p, v); eeprom_write_byte(p, v);
if (eeprom_read_byte(p) != v) { if (eeprom_read_byte(p) != v) {
SERIAL_ECHO_MSG(MSG_ERR_EEPROM_WRITE); SERIAL_ECHO_MSG(STR_ERR_EEPROM_WRITE);
return true; return true;
} }
} }

2
Marlin/src/HAL/HAL_TEENSY35_36/persistent_store_eeprom.cpp

@ -42,7 +42,7 @@ bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, ui
if (v != eeprom_read_byte(p)) { if (v != eeprom_read_byte(p)) {
eeprom_write_byte(p, v); eeprom_write_byte(p, v);
if (eeprom_read_byte(p) != v) { if (eeprom_read_byte(p) != v) {
SERIAL_ECHO_MSG(MSG_ERR_EEPROM_WRITE); SERIAL_ECHO_MSG(STR_ERR_EEPROM_WRITE);
return true; return true;
} }
} }

28
Marlin/src/MarlinCore.cpp

@ -278,7 +278,7 @@ bool pin_is_protected(const pin_t pin) {
} }
void protected_pin_err() { void protected_pin_err() {
SERIAL_ERROR_MSG(MSG_ERR_PROTECTED_PIN); SERIAL_ERROR_MSG(STR_ERR_PROTECTED_PIN);
} }
void quickstop_stepper() { void quickstop_stepper() {
@ -461,7 +461,7 @@ void startOrResumeJob() {
ui.reselect_last_file(); ui.reselect_last_file();
#endif #endif
SERIAL_ECHOLNPGM(MSG_FILE_PRINTED); SERIAL_ECHOLNPGM(STR_FILE_PRINTED);
default: default:
did_state = false; did_state = false;
@ -498,7 +498,7 @@ inline void manage_inactivity(const bool ignore_stepper_queue=false) {
if (max_inactive_time && ELAPSED(ms, gcode.previous_move_ms + max_inactive_time)) { if (max_inactive_time && ELAPSED(ms, gcode.previous_move_ms + max_inactive_time)) {
SERIAL_ERROR_START(); SERIAL_ERROR_START();
SERIAL_ECHOLNPAIR(MSG_KILL_INACTIVE_TIME, parser.command_ptr); SERIAL_ECHOLNPAIR(STR_KILL_INACTIVE_TIME, parser.command_ptr);
kill(); kill();
} }
@ -563,7 +563,7 @@ inline void manage_inactivity(const bool ignore_stepper_queue=false) {
// KILL the machine // KILL the machine
// ---------------------------------------------------------------- // ----------------------------------------------------------------
if (killCount >= KILL_DELAY) { if (killCount >= KILL_DELAY) {
SERIAL_ERROR_MSG(MSG_KILL_BUTTON); SERIAL_ERROR_MSG(STR_KILL_BUTTON);
kill(); kill();
} }
#endif #endif
@ -781,7 +781,7 @@ void idle(
void kill(PGM_P const lcd_error/*=nullptr*/, PGM_P const lcd_component/*=nullptr*/, const bool steppers_off/*=false*/) { void kill(PGM_P const lcd_error/*=nullptr*/, PGM_P const lcd_component/*=nullptr*/, const bool steppers_off/*=false*/) {
thermalManager.disable_all_heaters(); thermalManager.disable_all_heaters();
SERIAL_ERROR_MSG(MSG_ERR_KILLED); SERIAL_ERROR_MSG(STR_ERR_KILLED);
#if HAS_DISPLAY #if HAS_DISPLAY
ui.kill_screen(lcd_error ?: GET_TEXT(MSG_KILLED), lcd_component ?: NUL_STR); ui.kill_screen(lcd_error ?: GET_TEXT(MSG_KILLED), lcd_component ?: NUL_STR);
@ -852,7 +852,7 @@ void stop() {
#endif #endif
if (IsRunning()) { if (IsRunning()) {
SERIAL_ERROR_MSG(MSG_ERR_STOPPED); SERIAL_ERROR_MSG(STR_ERR_STOPPED);
LCD_MESSAGEPGM(MSG_STOPPED); LCD_MESSAGEPGM(MSG_STOPPED);
safe_delay(350); // allow enough time for messages to get out before stopping safe_delay(350); // allow enough time for messages to get out before stopping
Running = false; Running = false;
@ -958,11 +958,11 @@ void setup() {
// Check startup - does nothing if bootloader sets MCUSR to 0 // Check startup - does nothing if bootloader sets MCUSR to 0
byte mcu = HAL_get_reset_source(); byte mcu = HAL_get_reset_source();
if (mcu & 1) SERIAL_ECHOLNPGM(MSG_POWERUP); if (mcu & 1) SERIAL_ECHOLNPGM(STR_POWERUP);
if (mcu & 2) SERIAL_ECHOLNPGM(MSG_EXTERNAL_RESET); if (mcu & 2) SERIAL_ECHOLNPGM(STR_EXTERNAL_RESET);
if (mcu & 4) SERIAL_ECHOLNPGM(MSG_BROWNOUT_RESET); if (mcu & 4) SERIAL_ECHOLNPGM(STR_BROWNOUT_RESET);
if (mcu & 8) SERIAL_ECHOLNPGM(MSG_WATCHDOG_RESET); if (mcu & 8) SERIAL_ECHOLNPGM(STR_WATCHDOG_RESET);
if (mcu & 32) SERIAL_ECHOLNPGM(MSG_SOFTWARE_RESET); if (mcu & 32) SERIAL_ECHOLNPGM(STR_SOFTWARE_RESET);
HAL_clear_reset_source(); HAL_clear_reset_source();
serialprintPGM(GET_TEXT(MSG_MARLIN)); serialprintPGM(GET_TEXT(MSG_MARLIN));
@ -972,15 +972,15 @@ void setup() {
#if defined(STRING_DISTRIBUTION_DATE) && defined(STRING_CONFIG_H_AUTHOR) #if defined(STRING_DISTRIBUTION_DATE) && defined(STRING_CONFIG_H_AUTHOR)
SERIAL_ECHO_MSG( SERIAL_ECHO_MSG(
MSG_CONFIGURATION_VER STR_CONFIGURATION_VER
STRING_DISTRIBUTION_DATE STRING_DISTRIBUTION_DATE
MSG_AUTHOR STRING_CONFIG_H_AUTHOR STR_AUTHOR STRING_CONFIG_H_AUTHOR
); );
SERIAL_ECHO_MSG("Compiled: " __DATE__); SERIAL_ECHO_MSG("Compiled: " __DATE__);
#endif #endif
SERIAL_ECHO_START(); SERIAL_ECHO_START();
SERIAL_ECHOLNPAIR(MSG_FREE_MEMORY, freeMemory(), MSG_PLANNER_BUFFER_BYTES, (int)sizeof(block_t) * (BLOCK_BUFFER_SIZE)); SERIAL_ECHOLNPAIR(STR_FREE_MEMORY, freeMemory(), STR_PLANNER_BUFFER_BYTES, (int)sizeof(block_t) * (BLOCK_BUFFER_SIZE));
// UI must be initialized before EEPROM // UI must be initialized before EEPROM
// (because EEPROM code calls the UI). // (because EEPROM code calls the UI).

408
Marlin/src/core/language.h

@ -97,6 +97,210 @@
// #define STRING_SPLASH_LINE3 WEBSITE_URL // #define STRING_SPLASH_LINE3 WEBSITE_URL
//#endif //#endif
//
// Common Serial Console Messages
// Don't change these strings because serial hosts look for them.
//
#define STR_ENQUEUEING "enqueueing \""
#define STR_POWERUP "PowerUp"
#define STR_EXTERNAL_RESET " External Reset"
#define STR_BROWNOUT_RESET " Brown out Reset"
#define STR_WATCHDOG_RESET " Watchdog Reset"
#define STR_SOFTWARE_RESET " Software Reset"
#define STR_AUTHOR " | Author: "
#define STR_CONFIGURATION_VER " Last Updated: "
#define STR_FREE_MEMORY " Free Memory: "
#define STR_PLANNER_BUFFER_BYTES " PlannerBufferBytes: "
#define STR_OK "ok"
#define STR_WAIT "wait"
#define STR_STATS "Stats: "
#define STR_FILE_SAVED "Done saving file."
#define STR_ERR_LINE_NO "Line Number is not Last Line Number+1, Last Line: "
#define STR_ERR_CHECKSUM_MISMATCH "checksum mismatch, Last Line: "
#define STR_ERR_NO_CHECKSUM "No Checksum with line number, Last Line: "
#define STR_FILE_PRINTED "Done printing file"
#define STR_BEGIN_FILE_LIST "Begin file list"
#define STR_END_FILE_LIST "End file list"
#define STR_INVALID_EXTRUDER "Invalid extruder"
#define STR_INVALID_E_STEPPER "Invalid E stepper"
#define STR_E_STEPPER_NOT_SPECIFIED "E stepper not specified"
#define STR_INVALID_SOLENOID "Invalid solenoid"
#define STR_M115_REPORT "FIRMWARE_NAME:Marlin " DETAILED_BUILD_VERSION " SOURCE_CODE_URL:" SOURCE_CODE_URL " PROTOCOL_VERSION:" PROTOCOL_VERSION " MACHINE_TYPE:" MACHINE_NAME " EXTRUDER_COUNT:" STRINGIFY(EXTRUDERS) " UUID:" MACHINE_UUID
#define STR_COUNT_X " Count X:"
#define STR_COUNT_A " Count A:"
#define STR_WATCHDOG_FIRED "Watchdog timeout. Reset required."
#define STR_ERR_KILLED "Printer halted. kill() called!"
#define STR_ERR_STOPPED "Printer stopped due to errors. Fix the error and use M999 to restart. (Temperature is reset. Set it after restarting)"
#define STR_BUSY_PROCESSING "busy: processing"
#define STR_BUSY_PAUSED_FOR_USER "busy: paused for user"
#define STR_BUSY_PAUSED_FOR_INPUT "busy: paused for input"
#define STR_Z_MOVE_COMP "Z_move_comp"
#define STR_RESEND "Resend: "
#define STR_UNKNOWN_COMMAND "Unknown command: \""
#define STR_ACTIVE_EXTRUDER "Active Extruder: "
#define STR_X_MIN "x_min"
#define STR_X_MAX "x_max"
#define STR_X2_MIN "x2_min"
#define STR_X2_MAX "x2_max"
#define STR_Y_MIN "y_min"
#define STR_Y_MAX "y_max"
#define STR_Y2_MIN "y2_min"
#define STR_Y2_MAX "y2_max"
#define STR_Z_MIN "z_min"
#define STR_Z_MAX "z_max"
#define STR_Z2_MIN "z2_min"
#define STR_Z2_MAX "z2_max"
#define STR_Z3_MIN "z3_min"
#define STR_Z3_MAX "z3_max"
#define STR_Z4_MIN "z4_min"
#define STR_Z4_MAX "z4_max"
#define STR_Z_PROBE "z_probe"
#define STR_FILAMENT_RUNOUT_SENSOR "filament"
#define STR_PROBE_OFFSET "Probe Offset"
#define STR_SKEW_MIN "min_skew_factor: "
#define STR_SKEW_MAX "max_skew_factor: "
#define STR_ERR_MATERIAL_INDEX "M145 S<index> out of range (0-1)"
#define STR_ERR_M421_PARAMETERS "M421 incorrect parameter usage"
#define STR_ERR_BAD_PLANE_MODE "G5 requires XY plane mode"
#define STR_ERR_MESH_XY "Mesh point cannot be resolved"
#define STR_ERR_ARC_ARGS "G2/G3 bad parameters"
#define STR_ERR_PROTECTED_PIN "Protected Pin"
#define STR_ERR_M420_FAILED "Failed to enable Bed Leveling"
#define STR_ERR_M428_TOO_FAR "Too far from reference point"
#define STR_ERR_M303_DISABLED "PIDTEMP disabled"
#define STR_M119_REPORT "Reporting endstop status"
#define STR_ON "ON"
#define STR_OFF "OFF"
#define STR_ENDSTOP_HIT "TRIGGERED"
#define STR_ENDSTOP_OPEN "open"
#define STR_HOTEND_OFFSET "Hotend offsets:"
#define STR_DUPLICATION_MODE "Duplication mode: "
#define STR_SOFT_ENDSTOPS "Soft endstops: "
#define STR_SOFT_MIN " Min: "
#define STR_SOFT_MAX " Max: "
#define STR_SAVED_POS "Position saved"
#define STR_RESTORING_POS "Restoring position"
#define STR_INVALID_POS_SLOT "Invalid slot. Total: "
#define STR_SD_CANT_OPEN_SUBDIR "Cannot open subdir "
#define STR_SD_INIT_FAIL "SD init fail"
#define STR_SD_VOL_INIT_FAIL "volume.init failed"
#define STR_SD_OPENROOT_FAIL "openRoot failed"
#define STR_SD_CARD_OK "SD card ok"
#define STR_SD_WORKDIR_FAIL "workDir open failed"
#define STR_SD_OPEN_FILE_FAIL "open failed, File: "
#define STR_SD_FILE_OPENED "File opened: "
#define STR_SD_SIZE " Size: "
#define STR_SD_FILE_SELECTED "File selected"
#define STR_SD_WRITE_TO_FILE "Writing to file: "
#define STR_SD_PRINTING_BYTE "SD printing byte "
#define STR_SD_NOT_PRINTING "Not SD printing"
#define STR_SD_ERR_WRITE_TO_FILE "error writing to file"
#define STR_SD_ERR_READ "SD read error"
#define STR_SD_CANT_ENTER_SUBDIR "Cannot enter subdir: "
#define STR_ENDSTOPS_HIT "endstops hit: "
#define STR_ERR_COLD_EXTRUDE_STOP " cold extrusion prevented"
#define STR_ERR_LONG_EXTRUDE_STOP " too long extrusion prevented"
#define STR_ERR_HOTEND_TOO_COLD "Hotend too cold"
#define STR_ERR_Z_HOMING_SER "Home XY first"
#define STR_ERR_EEPROM_WRITE "Error writing to EEPROM!"
#define STR_FILAMENT_CHANGE_HEAT_LCD "Press button to heat nozzle"
#define STR_FILAMENT_CHANGE_INSERT_LCD "Insert filament and press button"
#define STR_FILAMENT_CHANGE_WAIT_LCD "Press button to resume"
#define STR_FILAMENT_CHANGE_HEAT_M108 "Send M108 to heat nozzle"
#define STR_FILAMENT_CHANGE_INSERT_M108 "Insert filament and send M108"
#define STR_FILAMENT_CHANGE_WAIT_M108 "Send M108 to resume"
#define STR_STOP_BLTOUCH "!! STOP called because of BLTouch error - restart with M999"
#define STR_STOP_UNHOMED "!! STOP called because of unhomed error - restart with M999"
#define STR_KILL_INACTIVE_TIME "!! KILL caused by too much inactive time - current command: "
#define STR_KILL_BUTTON "!! KILL caused by KILL button/pin"
// temperature.cpp strings
#define STR_PID_AUTOTUNE_PREFIX "PID Autotune"
#define STR_PID_AUTOTUNE_START STR_PID_AUTOTUNE_PREFIX " start"
#define STR_PID_AUTOTUNE_FAILED STR_PID_AUTOTUNE_PREFIX " failed!"
#define STR_PID_BAD_EXTRUDER_NUM STR_PID_AUTOTUNE_FAILED " Bad extruder number"
#define STR_PID_TEMP_TOO_HIGH STR_PID_AUTOTUNE_FAILED " Temperature too high"
#define STR_PID_TIMEOUT STR_PID_AUTOTUNE_FAILED " timeout"
#define STR_BIAS " bias: "
#define STR_D_COLON " d: "
#define STR_T_MIN " min: "
#define STR_T_MAX " max: "
#define STR_KU " Ku: "
#define STR_TU " Tu: "
#define STR_CLASSIC_PID " Classic PID "
#define STR_KP " Kp: "
#define STR_KI " Ki: "
#define STR_KD " Kd: "
#define STR_PID_AUTOTUNE_FINISHED STR_PID_AUTOTUNE_PREFIX " finished! Put the last Kp, Ki and Kd constants from below into Configuration.h"
#define STR_PID_DEBUG " PID_DEBUG "
#define STR_PID_DEBUG_INPUT ": Input "
#define STR_PID_DEBUG_OUTPUT " Output "
#define STR_PID_DEBUG_PTERM " pTerm "
#define STR_PID_DEBUG_ITERM " iTerm "
#define STR_PID_DEBUG_DTERM " dTerm "
#define STR_PID_DEBUG_CTERM " cTerm "
#define STR_INVALID_EXTRUDER_NUM " - Invalid extruder number !"
#define STR_HEATER_BED "bed"
#define STR_HEATER_CHAMBER "chamber"
#define STR_STOPPED_HEATER ", system stopped! Heater_ID: "
#define STR_REDUNDANCY "Heater switched off. Temperature difference between temp sensors is too high !"
#define STR_T_HEATING_FAILED "Heating failed"
#define STR_T_THERMAL_RUNAWAY "Thermal Runaway"
#define STR_T_MAXTEMP "MAXTEMP triggered"
#define STR_T_MINTEMP "MINTEMP triggered"
#define STR_ERR_PROBING_FAILED "Probing Failed"
#define STR_ZPROBE_OUT_SER "Z Probe Past Bed"
// Debug
#define STR_DEBUG_PREFIX "DEBUG:"
#define STR_DEBUG_OFF "off"
#define STR_DEBUG_ECHO "ECHO"
#define STR_DEBUG_INFO "INFO"
#define STR_DEBUG_ERRORS "ERRORS"
#define STR_DEBUG_DRYRUN "DRYRUN"
#define STR_DEBUG_COMMUNICATION "COMMUNICATION"
#define STR_DEBUG_LEVELING "LEVELING"
// LCD Menu Messages
#define LANGUAGE_DATA_INCL_(M) STRINGIFY_(fontdata/langdata_##M.h)
#define LANGUAGE_DATA_INCL(M) LANGUAGE_DATA_INCL_(M)
#define LANGUAGE_INCL_(M) STRINGIFY_(../lcd/language/language_##M.h)
#define LANGUAGE_INCL(M) LANGUAGE_INCL_(M)
#define STR_X "X"
#define STR_Y "Y"
#define STR_Z "Z"
#define STR_E "E"
#if IS_KINEMATIC
#define STR_A "A"
#define STR_B "B"
#define STR_C "C"
#else
#define STR_A "X"
#define STR_B "Y"
#define STR_C "Z"
#endif
#define STR_X2 "X2"
#define STR_Y2 "Y2"
#define STR_Z2 "Z2"
#define STR_Z3 "Z3"
#define STR_Z4 "Z4"
#define LCD_STR_A STR_A
#define LCD_STR_B STR_B
#define LCD_STR_C STR_C
#define LCD_STR_E STR_E
#if HAS_CHARACTER_LCD #if HAS_CHARACTER_LCD
// Custom characters defined in the first 8 characters of the LCD // Custom characters defined in the first 8 characters of the LCD
@ -135,210 +339,6 @@
#endif #endif
// Common Serial Console Messages (do not translate those!)
#define MSG_ENQUEUEING "enqueueing \""
#define MSG_POWERUP "PowerUp"
#define MSG_EXTERNAL_RESET " External Reset"
#define MSG_BROWNOUT_RESET " Brown out Reset"
#define MSG_WATCHDOG_RESET " Watchdog Reset"
#define MSG_SOFTWARE_RESET " Software Reset"
#define MSG_AUTHOR " | Author: "
#define MSG_CONFIGURATION_VER " Last Updated: "
#define MSG_FREE_MEMORY " Free Memory: "
#define MSG_PLANNER_BUFFER_BYTES " PlannerBufferBytes: "
#define MSG_OK "ok"
#define MSG_WAIT "wait"
#define MSG_STATS "Stats: "
#define MSG_FILE_SAVED "Done saving file."
#define MSG_ERR_LINE_NO "Line Number is not Last Line Number+1, Last Line: "
#define MSG_ERR_CHECKSUM_MISMATCH "checksum mismatch, Last Line: "
#define MSG_ERR_NO_CHECKSUM "No Checksum with line number, Last Line: "
#define MSG_FILE_PRINTED "Done printing file"
#define MSG_BEGIN_FILE_LIST "Begin file list"
#define MSG_END_FILE_LIST "End file list"
#define MSG_INVALID_EXTRUDER "Invalid extruder"
#define MSG_INVALID_E_STEPPER "Invalid E stepper"
#define MSG_E_STEPPER_NOT_SPECIFIED "E stepper not specified"
#define MSG_INVALID_SOLENOID "Invalid solenoid"
#define MSG_M115_REPORT "FIRMWARE_NAME:Marlin " DETAILED_BUILD_VERSION " SOURCE_CODE_URL:" SOURCE_CODE_URL " PROTOCOL_VERSION:" PROTOCOL_VERSION " MACHINE_TYPE:" MACHINE_NAME " EXTRUDER_COUNT:" STRINGIFY(EXTRUDERS) " UUID:" MACHINE_UUID
#define MSG_COUNT_X " Count X:"
#define MSG_COUNT_A " Count A:"
#define MSG_WATCHDOG_FIRED "Watchdog timeout. Reset required."
#define MSG_ERR_KILLED "Printer halted. kill() called!"
#define MSG_ERR_STOPPED "Printer stopped due to errors. Fix the error and use M999 to restart. (Temperature is reset. Set it after restarting)"
#define MSG_BUSY_PROCESSING "busy: processing"
#define MSG_BUSY_PAUSED_FOR_USER "busy: paused for user"
#define MSG_BUSY_PAUSED_FOR_INPUT "busy: paused for input"
#define MSG_Z_MOVE_COMP "Z_move_comp"
#define MSG_RESEND "Resend: "
#define MSG_UNKNOWN_COMMAND "Unknown command: \""
#define MSG_ACTIVE_EXTRUDER "Active Extruder: "
#define MSG_X_MIN "x_min"
#define MSG_X_MAX "x_max"
#define MSG_X2_MIN "x2_min"
#define MSG_X2_MAX "x2_max"
#define MSG_Y_MIN "y_min"
#define MSG_Y_MAX "y_max"
#define MSG_Y2_MIN "y2_min"
#define MSG_Y2_MAX "y2_max"
#define MSG_Z_MIN "z_min"
#define MSG_Z_MAX "z_max"
#define MSG_Z2_MIN "z2_min"
#define MSG_Z2_MAX "z2_max"
#define MSG_Z3_MIN "z3_min"
#define MSG_Z3_MAX "z3_max"
#define MSG_Z4_MIN "z4_min"
#define MSG_Z4_MAX "z4_max"
#define MSG_Z_PROBE "z_probe"
#define MSG_FILAMENT_RUNOUT_SENSOR "filament"
#define MSG_PROBE_OFFSET "Probe Offset"
#define MSG_SKEW_MIN "min_skew_factor: "
#define MSG_SKEW_MAX "max_skew_factor: "
#define MSG_ERR_MATERIAL_INDEX "M145 S<index> out of range (0-1)"
#define MSG_ERR_M421_PARAMETERS "M421 incorrect parameter usage"
#define MSG_ERR_BAD_PLANE_MODE "G5 requires XY plane mode"
#define MSG_ERR_MESH_XY "Mesh point cannot be resolved"
#define MSG_ERR_ARC_ARGS "G2/G3 bad parameters"
#define MSG_ERR_PROTECTED_PIN "Protected Pin"
#define MSG_ERR_M420_FAILED "Failed to enable Bed Leveling"
#define MSG_ERR_M428_TOO_FAR "Too far from reference point"
#define MSG_ERR_M303_DISABLED "PIDTEMP disabled"
#define MSG_M119_REPORT "Reporting endstop status"
#define MSG_ON "ON"
#define MSG_OFF "OFF"
#define MSG_ENDSTOP_HIT "TRIGGERED"
#define MSG_ENDSTOP_OPEN "open"
#define MSG_HOTEND_OFFSET "Hotend offsets:"
#define MSG_DUPLICATION_MODE "Duplication mode: "
#define MSG_SOFT_ENDSTOPS "Soft endstops: "
#define MSG_SOFT_MIN " Min: "
#define MSG_SOFT_MAX " Max: "
#define MSG_SAVED_POS "Position saved"
#define MSG_RESTORING_POS "Restoring position"
#define MSG_INVALID_POS_SLOT "Invalid slot. Total: "
#define MSG_SD_CANT_OPEN_SUBDIR "Cannot open subdir "
#define MSG_SD_INIT_FAIL "SD init fail"
#define MSG_SD_VOL_INIT_FAIL "volume.init failed"
#define MSG_SD_OPENROOT_FAIL "openRoot failed"
#define MSG_SD_CARD_OK "SD card ok"
#define MSG_SD_WORKDIR_FAIL "workDir open failed"
#define MSG_SD_OPEN_FILE_FAIL "open failed, File: "
#define MSG_SD_FILE_OPENED "File opened: "
#define MSG_SD_SIZE " Size: "
#define MSG_SD_FILE_SELECTED "File selected"
#define MSG_SD_WRITE_TO_FILE "Writing to file: "
#define MSG_SD_PRINTING_BYTE "SD printing byte "
#define MSG_SD_NOT_PRINTING "Not SD printing"
#define MSG_SD_ERR_WRITE_TO_FILE "error writing to file"
#define MSG_SD_ERR_READ "SD read error"
#define MSG_SD_CANT_ENTER_SUBDIR "Cannot enter subdir: "
#define MSG_STEPPER_TOO_HIGH "Steprate too high: "
#define MSG_ENDSTOPS_HIT "endstops hit: "
#define MSG_ERR_COLD_EXTRUDE_STOP " cold extrusion prevented"
#define MSG_ERR_LONG_EXTRUDE_STOP " too long extrusion prevented"
#define MSG_ERR_HOTEND_TOO_COLD "Hotend too cold"
#define MSG_ERR_Z_HOMING_SER "Home XY first"
#define MSG_ERR_EEPROM_WRITE "Error writing to EEPROM!"
#define MSG_FILAMENT_CHANGE_HEAT_LCD "Press button to heat nozzle"
#define MSG_FILAMENT_CHANGE_INSERT_LCD "Insert filament and press button"
#define MSG_FILAMENT_CHANGE_WAIT_LCD "Press button to resume"
#define MSG_FILAMENT_CHANGE_HEAT_M108 "Send M108 to heat nozzle"
#define MSG_FILAMENT_CHANGE_INSERT_M108 "Insert filament and send M108"
#define MSG_FILAMENT_CHANGE_WAIT_M108 "Send M108 to resume"
#define MSG_STOP_BLTOUCH "!! STOP called because of BLTouch error - restart with M999"
#define MSG_STOP_UNHOMED "!! STOP called because of unhomed error - restart with M999"
#define MSG_KILL_INACTIVE_TIME "!! KILL caused by too much inactive time - current command: "
#define MSG_KILL_BUTTON "!! KILL caused by KILL button/pin"
// temperature.cpp strings
#define MSG_PID_AUTOTUNE_PREFIX "PID Autotune"
#define MSG_PID_AUTOTUNE_START MSG_PID_AUTOTUNE_PREFIX " start"
#define MSG_PID_AUTOTUNE_FAILED MSG_PID_AUTOTUNE_PREFIX " failed!"
#define MSG_PID_BAD_EXTRUDER_NUM MSG_PID_AUTOTUNE_FAILED " Bad extruder number"
#define MSG_PID_TEMP_TOO_HIGH MSG_PID_AUTOTUNE_FAILED " Temperature too high"
#define MSG_PID_TIMEOUT MSG_PID_AUTOTUNE_FAILED " timeout"
#define MSG_BIAS " bias: "
#define MSG_D " d: "
#define MSG_T_MIN " min: "
#define MSG_T_MAX " max: "
#define MSG_KU " Ku: "
#define MSG_TU " Tu: "
#define MSG_CLASSIC_PID " Classic PID "
#define MSG_KP " Kp: "
#define MSG_KI " Ki: "
#define MSG_KD " Kd: "
#define MSG_AT " @:"
#define MSG_PID_AUTOTUNE_FINISHED MSG_PID_AUTOTUNE_PREFIX " finished! Put the last Kp, Ki and Kd constants from below into Configuration.h"
#define MSG_PID_DEBUG " PID_DEBUG "
#define MSG_PID_DEBUG_INPUT ": Input "
#define MSG_PID_DEBUG_OUTPUT " Output "
#define MSG_PID_DEBUG_PTERM " pTerm "
#define MSG_PID_DEBUG_ITERM " iTerm "
#define MSG_PID_DEBUG_DTERM " dTerm "
#define MSG_PID_DEBUG_CTERM " cTerm "
#define MSG_INVALID_EXTRUDER_NUM " - Invalid extruder number !"
#define MSG_HEATER_BED "bed"
#define MSG_HEATER_CHAMBER "chamber"
#define MSG_STOPPED_HEATER ", system stopped! Heater_ID: "
#define MSG_REDUNDANCY "Heater switched off. Temperature difference between temp sensors is too high !"
#define MSG_T_HEATING_FAILED "Heating failed"
#define MSG_T_THERMAL_RUNAWAY "Thermal Runaway"
#define MSG_T_MAXTEMP "MAXTEMP triggered"
#define MSG_T_MINTEMP "MINTEMP triggered"
#define MSG_ERR_PROBING_FAILED "Probing Failed"
#define MSG_ZPROBE_OUT_SER "Z Probe Past Bed"
// Debug
#define MSG_DEBUG_PREFIX "DEBUG:"
#define MSG_DEBUG_OFF "off"
#define MSG_DEBUG_ECHO "ECHO"
#define MSG_DEBUG_INFO "INFO"
#define MSG_DEBUG_ERRORS "ERRORS"
#define MSG_DEBUG_DRYRUN "DRYRUN"
#define MSG_DEBUG_COMMUNICATION "COMMUNICATION"
#define MSG_DEBUG_LEVELING "LEVELING"
// LCD Menu Messages
#define LANGUAGE_DATA_INCL_(M) STRINGIFY_(fontdata/langdata_##M.h)
#define LANGUAGE_DATA_INCL(M) LANGUAGE_DATA_INCL_(M)
#define LANGUAGE_INCL_(M) STRINGIFY_(../lcd/language/language_##M.h)
#define LANGUAGE_INCL(M) LANGUAGE_INCL_(M)
// Never translate these strings
#define MSG_X "X"
#define MSG_Y "Y"
#define MSG_Z "Z"
#define MSG_E "E"
#if IS_KINEMATIC
#define MSG_A "A"
#define MSG_B "B"
#define MSG_C "C"
#else
#define MSG_A "X"
#define MSG_B "Y"
#define MSG_C "Z"
#endif
#define MSG_X2 "X2"
#define MSG_Y2 "Y2"
#define MSG_Z2 "Z2"
#define MSG_Z3 "Z3"
#define MSG_Z4 "Z4"
#define LCD_STR_A MSG_A
#define LCD_STR_B MSG_B
#define LCD_STR_C MSG_C
#define LCD_STR_E MSG_E
/** /**
* Tool indexes for LCD display only * Tool indexes for LCD display only
* *

2
Marlin/src/core/serial.cpp

@ -54,7 +54,7 @@ void serial_ternary(const bool onoff, PGM_P const pre, PGM_P const on, PGM_P con
serialprintPGM(onoff ? on : off); serialprintPGM(onoff ? on : off);
if (post) serialprintPGM(post); if (post) serialprintPGM(post);
} }
void serialprint_onoff(const bool onoff) { serialprintPGM(onoff ? PSTR(MSG_ON) : PSTR(MSG_OFF)); } void serialprint_onoff(const bool onoff) { serialprintPGM(onoff ? PSTR(STR_ON) : PSTR(STR_OFF)); }
void serialprintln_onoff(const bool onoff) { serialprint_onoff(onoff); SERIAL_EOL(); } void serialprintln_onoff(const bool onoff) { serialprint_onoff(onoff); SERIAL_EOL(); }
void serialprint_truefalse(const bool tf) { serialprintPGM(tf ? PSTR("true") : PSTR("false")); } void serialprint_truefalse(const bool tf) { serialprintPGM(tf ? PSTR("true") : PSTR("false")); }

4
Marlin/src/feature/bltouch.cpp

@ -124,7 +124,7 @@ bool BLTouch::deploy_proc() {
// The deploy might have failed or the probe is actually triggered (nozzle too low?) again // The deploy might have failed or the probe is actually triggered (nozzle too low?) again
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("BLTouch Recovery Failed"); if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("BLTouch Recovery Failed");
SERIAL_ERROR_MSG(MSG_STOP_BLTOUCH); // Tell the user something is wrong, needs action SERIAL_ERROR_MSG(STR_STOP_BLTOUCH); // Tell the user something is wrong, needs action
stop(); // but it's not too bad, no need to kill, allow restart stop(); // but it's not too bad, no need to kill, allow restart
return true; // Tell our caller we goofed in case he cares to know return true; // Tell our caller we goofed in case he cares to know
@ -169,7 +169,7 @@ bool BLTouch::stow_proc() {
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("BLTouch Recovery Failed"); if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("BLTouch Recovery Failed");
SERIAL_ERROR_MSG(MSG_STOP_BLTOUCH); // Tell the user something is wrong, needs action SERIAL_ERROR_MSG(STR_STOP_BLTOUCH); // Tell the user something is wrong, needs action
stop(); // but it's not too bad, no need to kill, allow restart stop(); // but it's not too bad, no need to kill, allow restart
return true; // Tell our caller we goofed in case he cares to know return true; // Tell our caller we goofed in case he cares to know

4
Marlin/src/feature/pause.cpp

@ -120,7 +120,7 @@ static bool ensure_safe_temperature(const PauseMode mode=PAUSE_MODE_SAME) {
#if ENABLED(PREVENT_COLD_EXTRUSION) #if ENABLED(PREVENT_COLD_EXTRUSION)
if (!DEBUGGING(DRYRUN) && thermalManager.targetTooColdToExtrude(active_extruder)) { if (!DEBUGGING(DRYRUN) && thermalManager.targetTooColdToExtrude(active_extruder)) {
SERIAL_ECHO_MSG(MSG_ERR_HOTEND_TOO_COLD); SERIAL_ECHO_MSG(STR_ERR_HOTEND_TOO_COLD);
return false; return false;
} }
#endif #endif
@ -400,7 +400,7 @@ bool pause_print(const float &retract, const xyz_pos_t &park_point, const float
#endif #endif
if (!DEBUGGING(DRYRUN) && unload_length && thermalManager.targetTooColdToExtrude(active_extruder)) { if (!DEBUGGING(DRYRUN) && unload_length && thermalManager.targetTooColdToExtrude(active_extruder)) {
SERIAL_ECHO_MSG(MSG_ERR_HOTEND_TOO_COLD); SERIAL_ECHO_MSG(STR_ERR_HOTEND_TOO_COLD);
#if HAS_LCD_MENU #if HAS_LCD_MENU
if (show_lcd) { // Show status screen if (show_lcd) { // Show status screen

2
Marlin/src/feature/prusa_MMU2/mmu2.cpp

@ -462,7 +462,7 @@ void MMU2::tool_change(uint8_t index) {
ENABLE_AXIS_E0(); ENABLE_AXIS_E0();
SERIAL_ECHO_START(); SERIAL_ECHO_START();
SERIAL_ECHOLNPAIR(MSG_ACTIVE_EXTRUDER, int(extruder)); SERIAL_ECHOLNPAIR(STR_ACTIVE_EXTRUDER, int(extruder));
ui.reset_status(); ui.reset_status();
} }

2
Marlin/src/feature/solenoid.cpp

@ -67,7 +67,7 @@ static void set_solenoid(const uint8_t num, const bool active) {
break; break;
#endif #endif
default: default:
SERIAL_ECHO_MSG(MSG_INVALID_SOLENOID); SERIAL_ECHO_MSG(STR_INVALID_SOLENOID);
break; break;
} }
} }

2
Marlin/src/gcode/bedlevel/G42.cpp

@ -41,7 +41,7 @@ void GcodeSuite::G42() {
const int8_t iy = hasJ ? parser.value_int() : 0; const int8_t iy = hasJ ? parser.value_int() : 0;
if ((hasI && !WITHIN(ix, 0, GRID_MAX_POINTS_X - 1)) || (hasJ && !WITHIN(iy, 0, GRID_MAX_POINTS_Y - 1))) { if ((hasI && !WITHIN(ix, 0, GRID_MAX_POINTS_X - 1)) || (hasJ && !WITHIN(iy, 0, GRID_MAX_POINTS_Y - 1))) {
SERIAL_ECHOLNPGM(MSG_ERR_MESH_XY); SERIAL_ECHOLNPGM(STR_ERR_MESH_XY);
return; return;
} }

4
Marlin/src/gcode/bedlevel/M420.cpp

@ -235,7 +235,7 @@ void GcodeSuite::M420() {
// Error if leveling failed to enable or reenable // Error if leveling failed to enable or reenable
if (to_enable && !planner.leveling_active) if (to_enable && !planner.leveling_active)
SERIAL_ERROR_MSG(MSG_ERR_M420_FAILED); SERIAL_ERROR_MSG(STR_ERR_M420_FAILED);
SERIAL_ECHO_START(); SERIAL_ECHO_START();
SERIAL_ECHOPGM("Bed Leveling "); SERIAL_ECHOPGM("Bed Leveling ");
@ -247,7 +247,7 @@ void GcodeSuite::M420() {
if (planner.z_fade_height > 0.0) if (planner.z_fade_height > 0.0)
SERIAL_ECHOLN(planner.z_fade_height); SERIAL_ECHOLN(planner.z_fade_height);
else else
SERIAL_ECHOLNPGM(MSG_OFF); SERIAL_ECHOLNPGM(STR_OFF);
#endif #endif
// Report change in position // Report change in position

4
Marlin/src/gcode/bedlevel/abl/M421.cpp

@ -50,9 +50,9 @@ void GcodeSuite::M421() {
hasQ = !hasZ && parser.seen('Q'); hasQ = !hasZ && parser.seen('Q');
if (!hasI || !hasJ || !(hasZ || hasQ)) if (!hasI || !hasJ || !(hasZ || hasQ))
SERIAL_ERROR_MSG(MSG_ERR_M421_PARAMETERS); SERIAL_ERROR_MSG(STR_ERR_M421_PARAMETERS);
else if (!WITHIN(ix, 0, GRID_MAX_POINTS_X - 1) || !WITHIN(iy, 0, GRID_MAX_POINTS_Y - 1)) else if (!WITHIN(ix, 0, GRID_MAX_POINTS_X - 1) || !WITHIN(iy, 0, GRID_MAX_POINTS_Y - 1))
SERIAL_ERROR_MSG(MSG_ERR_MESH_XY); SERIAL_ERROR_MSG(STR_ERR_MESH_XY);
else { else {
z_values[ix][iy] = parser.value_linear_units() + (hasQ ? z_values[ix][iy] : 0); z_values[ix][iy] = parser.value_linear_units() + (hasQ ? z_values[ix][iy] : 0);
#if ENABLED(ABL_BILINEAR_SUBDIVISION) #if ENABLED(ABL_BILINEAR_SUBDIVISION)

4
Marlin/src/gcode/bedlevel/mbl/M421.cpp

@ -49,9 +49,9 @@ void GcodeSuite::M421() {
const bool hasZ = parser.seen('Z'), hasQ = !hasZ && parser.seen('Q'); const bool hasZ = parser.seen('Z'), hasQ = !hasZ && parser.seen('Q');
if (int(hasI && hasJ) + int(hasX && hasY) != 1 || !(hasZ || hasQ)) if (int(hasI && hasJ) + int(hasX && hasY) != 1 || !(hasZ || hasQ))
SERIAL_ERROR_MSG(MSG_ERR_M421_PARAMETERS); SERIAL_ERROR_MSG(STR_ERR_M421_PARAMETERS);
else if (ix < 0 || iy < 0) else if (ix < 0 || iy < 0)
SERIAL_ERROR_MSG(MSG_ERR_MESH_XY); SERIAL_ERROR_MSG(STR_ERR_MESH_XY);
else else
mbl.set_z(ix, iy, parser.value_linear_units() + (hasQ ? mbl.z_values[ix][iy] : 0)); mbl.set_z(ix, iy, parser.value_linear_units() + (hasQ ? mbl.z_values[ix][iy] : 0));
} }

4
Marlin/src/gcode/bedlevel/ubl/M421.cpp

@ -57,9 +57,9 @@ void GcodeSuite::M421() {
if (hasC) ij = ubl.find_closest_mesh_point_of_type(REAL, current_position); if (hasC) ij = ubl.find_closest_mesh_point_of_type(REAL, current_position);
if (int(hasC) + int(hasI && hasJ) != 1 || !(hasZ || hasQ || hasN)) if (int(hasC) + int(hasI && hasJ) != 1 || !(hasZ || hasQ || hasN))
SERIAL_ERROR_MSG(MSG_ERR_M421_PARAMETERS); SERIAL_ERROR_MSG(STR_ERR_M421_PARAMETERS);
else if (!WITHIN(ij.x, 0, GRID_MAX_POINTS_X - 1) || !WITHIN(ij.y, 0, GRID_MAX_POINTS_Y - 1)) else if (!WITHIN(ij.x, 0, GRID_MAX_POINTS_X - 1) || !WITHIN(ij.y, 0, GRID_MAX_POINTS_Y - 1))
SERIAL_ERROR_MSG(MSG_ERR_MESH_XY); SERIAL_ERROR_MSG(STR_ERR_MESH_XY);
else { else {
float &zval = ubl.z_values[ij.x][ij.y]; float &zval = ubl.z_values[ij.x][ij.y];
zval = hasN ? NAN : parser.value_linear_units() + (hasQ ? zval : 0); zval = hasN ? NAN : parser.value_linear_units() + (hasQ ? zval : 0);

6
Marlin/src/gcode/calibrate/G28.cpp

@ -118,7 +118,7 @@
// Disallow Z homing if X or Y are unknown // Disallow Z homing if X or Y are unknown
if (!TEST(axis_known_position, X_AXIS) || !TEST(axis_known_position, Y_AXIS)) { if (!TEST(axis_known_position, X_AXIS) || !TEST(axis_known_position, Y_AXIS)) {
LCD_MESSAGEPGM(MSG_ERR_Z_HOMING); LCD_MESSAGEPGM(MSG_ERR_Z_HOMING);
SERIAL_ECHO_MSG(MSG_ERR_Z_HOMING_SER); SERIAL_ECHO_MSG(STR_ERR_Z_HOMING_SER);
return; return;
} }
@ -154,7 +154,7 @@
} }
else { else {
LCD_MESSAGEPGM(MSG_ZPROBE_OUT); LCD_MESSAGEPGM(MSG_ZPROBE_OUT);
SERIAL_ECHO_MSG(MSG_ZPROBE_OUT_SER); SERIAL_ECHO_MSG(STR_ZPROBE_OUT_SER);
} }
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("<<< home_z_safely"); if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("<<< home_z_safely");
@ -529,7 +529,7 @@ void GcodeSuite::G28(const bool always_home_all) {
#define _HOME_SYNC doZ // Only for Z-axis #define _HOME_SYNC doZ // Only for Z-axis
#endif #endif
if (_HOME_SYNC) if (_HOME_SYNC)
SERIAL_ECHOLNPGM(MSG_Z_MOVE_COMP); SERIAL_ECHOLNPGM(STR_Z_MOVE_COMP);
#endif #endif
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("<<< G28"); if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("<<< G28");

2
Marlin/src/gcode/calibrate/M852.cpp

@ -82,7 +82,7 @@ void GcodeSuite::M852() {
#endif #endif
if (badval) if (badval)
SERIAL_ECHOLNPGM(MSG_SKEW_MIN " " STRINGIFY(SKEW_FACTOR_MIN) " " MSG_SKEW_MAX " " STRINGIFY(SKEW_FACTOR_MAX)); SERIAL_ECHOLNPGM(STR_SKEW_MIN " " STRINGIFY(SKEW_FACTOR_MIN) " " STR_SKEW_MAX " " STRINGIFY(SKEW_FACTOR_MAX));
// When skew is changed the current position changes // When skew is changed the current position changes
if (setval) { if (setval) {

2
Marlin/src/gcode/config/M218.cpp

@ -50,7 +50,7 @@ void GcodeSuite::M218() {
if (!parser.seen("XYZ")) { if (!parser.seen("XYZ")) {
SERIAL_ECHO_START(); SERIAL_ECHO_START();
SERIAL_ECHOPGM(MSG_HOTEND_OFFSET); SERIAL_ECHOPGM(STR_HOTEND_OFFSET);
HOTEND_LOOP() { HOTEND_LOOP() {
SERIAL_CHAR(' '); SERIAL_CHAR(' ');
SERIAL_ECHO(hotend_offset[e].x); SERIAL_ECHO(hotend_offset[e].x);

2
Marlin/src/gcode/config/M301.cpp

@ -82,7 +82,7 @@ void GcodeSuite::M301() {
SERIAL_EOL(); SERIAL_EOL();
} }
else else
SERIAL_ERROR_MSG(MSG_INVALID_EXTRUDER); SERIAL_ERROR_MSG(STR_INVALID_EXTRUDER);
} }
#endif // PIDTEMP #endif // PIDTEMP

16
Marlin/src/gcode/control/M111.cpp

@ -28,13 +28,13 @@
void GcodeSuite::M111() { void GcodeSuite::M111() {
if (parser.seen('S')) marlin_debug_flags = parser.byteval('S'); if (parser.seen('S')) marlin_debug_flags = parser.byteval('S');
static const char str_debug_1[] PROGMEM = MSG_DEBUG_ECHO, static const char str_debug_1[] PROGMEM = STR_DEBUG_ECHO,
str_debug_2[] PROGMEM = MSG_DEBUG_INFO, str_debug_2[] PROGMEM = STR_DEBUG_INFO,
str_debug_4[] PROGMEM = MSG_DEBUG_ERRORS, str_debug_4[] PROGMEM = STR_DEBUG_ERRORS,
str_debug_8[] PROGMEM = MSG_DEBUG_DRYRUN, str_debug_8[] PROGMEM = STR_DEBUG_DRYRUN,
str_debug_16[] PROGMEM = MSG_DEBUG_COMMUNICATION str_debug_16[] PROGMEM = STR_DEBUG_COMMUNICATION
#if ENABLED(DEBUG_LEVELING_FEATURE) #if ENABLED(DEBUG_LEVELING_FEATURE)
, str_debug_lvl[] PROGMEM = MSG_DEBUG_LEVELING , str_debug_lvl[] PROGMEM = STR_DEBUG_LEVELING
#endif #endif
; ;
@ -46,7 +46,7 @@ void GcodeSuite::M111() {
}; };
SERIAL_ECHO_START(); SERIAL_ECHO_START();
SERIAL_ECHOPGM(MSG_DEBUG_PREFIX); SERIAL_ECHOPGM(STR_DEBUG_PREFIX);
if (marlin_debug_flags) { if (marlin_debug_flags) {
uint8_t comma = 0; uint8_t comma = 0;
for (uint8_t i = 0; i < COUNT(debug_strings); i++) { for (uint8_t i = 0; i < COUNT(debug_strings); i++) {
@ -57,7 +57,7 @@ void GcodeSuite::M111() {
} }
} }
else { else {
SERIAL_ECHOPGM(MSG_DEBUG_OFF); SERIAL_ECHOPGM(STR_DEBUG_OFF);
#if !defined(__AVR__) || !defined(USBCON) #if !defined(__AVR__) || !defined(USBCON)
#if ENABLED(SERIAL_STATS_RX_BUFFER_OVERRUNS) #if ENABLED(SERIAL_STATS_RX_BUFFER_OVERRUNS)
SERIAL_ECHOPAIR("\nBuffer Overruns: ", MYSERIAL0.buffer_overruns()); SERIAL_ECHOPAIR("\nBuffer Overruns: ", MYSERIAL0.buffer_overruns());

6
Marlin/src/gcode/control/M211.cpp

@ -36,11 +36,11 @@ void GcodeSuite::M211() {
const xyz_pos_t l_soft_min = soft_endstop.min.asLogical(), const xyz_pos_t l_soft_min = soft_endstop.min.asLogical(),
l_soft_max = soft_endstop.max.asLogical(); l_soft_max = soft_endstop.max.asLogical();
SERIAL_ECHO_START(); SERIAL_ECHO_START();
SERIAL_ECHOPGM(MSG_SOFT_ENDSTOPS); SERIAL_ECHOPGM(STR_SOFT_ENDSTOPS);
if (parser.seen('S')) soft_endstops_enabled = parser.value_bool(); if (parser.seen('S')) soft_endstops_enabled = parser.value_bool();
serialprint_onoff(soft_endstops_enabled); serialprint_onoff(soft_endstops_enabled);
print_xyz(l_soft_min, PSTR(MSG_SOFT_MIN), PSTR(" ")); print_xyz(l_soft_min, PSTR(STR_SOFT_MIN), PSTR(" "));
print_xyz(l_soft_max, PSTR(MSG_SOFT_MAX)); print_xyz(l_soft_max, PSTR(STR_SOFT_MAX));
} }
#endif #endif

2
Marlin/src/gcode/control/M605.cpp

@ -167,7 +167,7 @@
extruder_duplication_enabled = ena && (duplication_e_mask >= 3); extruder_duplication_enabled = ena && (duplication_e_mask >= 3);
} }
SERIAL_ECHO_START(); SERIAL_ECHO_START();
SERIAL_ECHOPGM(MSG_DUPLICATION_MODE); SERIAL_ECHOPGM(STR_DUPLICATION_MODE);
serialprint_onoff(extruder_duplication_enabled); serialprint_onoff(extruder_duplication_enabled);
if (ena) { if (ena) {
SERIAL_ECHOPGM(" ( "); SERIAL_ECHOPGM(" ( ");

2
Marlin/src/gcode/control/M80_M81.cpp

@ -110,6 +110,6 @@ void GcodeSuite::M81() {
#endif #endif
#if HAS_LCD_MENU #if HAS_LCD_MENU
LCD_MESSAGEPGM_P(PSTR(MACHINE_NAME " " MSG_OFF ".")); LCD_MESSAGEPGM_P(PSTR(MACHINE_NAME " " STR_OFF "."));
#endif #endif
} }

4
Marlin/src/gcode/feature/pause/G60.cpp

@ -40,7 +40,7 @@ void GcodeSuite::G60() {
const uint8_t slot = parser.byteval('S'); const uint8_t slot = parser.byteval('S');
if (slot >= SAVED_POSITIONS) { if (slot >= SAVED_POSITIONS) {
SERIAL_ERROR_MSG(MSG_INVALID_POS_SLOT STRINGIFY(SAVED_POSITIONS)); SERIAL_ERROR_MSG(STR_INVALID_POS_SLOT STRINGIFY(SAVED_POSITIONS));
return; return;
} }
@ -49,7 +49,7 @@ void GcodeSuite::G60() {
#if ENABLED(SAVED_POSITIONS_DEBUG) #if ENABLED(SAVED_POSITIONS_DEBUG)
const xyze_pos_t &pos = stored_position[slot]; const xyze_pos_t &pos = stored_position[slot];
DEBUG_ECHOPAIR_F(MSG_SAVED_POS " S", slot); DEBUG_ECHOPAIR_F(STR_SAVED_POS " S", slot);
DEBUG_ECHOPAIR_F(" : X", pos.x); DEBUG_ECHOPAIR_F(" : X", pos.x);
DEBUG_ECHOPAIR_F_P(SP_Y_STR, pos.y); DEBUG_ECHOPAIR_F_P(SP_Y_STR, pos.y);
DEBUG_ECHOLNPAIR_F_P(SP_Z_STR, pos.z); DEBUG_ECHOLNPAIR_F_P(SP_Z_STR, pos.z);

4
Marlin/src/gcode/feature/pause/G61.cpp

@ -42,7 +42,7 @@ void GcodeSuite::G61(void) {
#if SAVED_POSITIONS < 256 #if SAVED_POSITIONS < 256
if (slot >= SAVED_POSITIONS) { if (slot >= SAVED_POSITIONS) {
SERIAL_ERROR_MSG(MSG_INVALID_POS_SLOT STRINGIFY(SAVED_POSITIONS)); SERIAL_ERROR_MSG(STR_INVALID_POS_SLOT STRINGIFY(SAVED_POSITIONS));
return; return;
} }
#endif #endif
@ -54,7 +54,7 @@ void GcodeSuite::G61(void) {
const float fr = parser.linearval('F'); const float fr = parser.linearval('F');
if (fr > 0.0) feedrate_mm_s = MMM_TO_MMS(fr); if (fr > 0.0) feedrate_mm_s = MMM_TO_MMS(fr);
SERIAL_ECHOPAIR(MSG_RESTORING_POS " S", int(slot)); SERIAL_ECHOPAIR(STR_RESTORING_POS " S", int(slot));
LOOP_XYZ(i) { LOOP_XYZ(i) {
destination[i] = parser.seen(axis_codes[i]) destination[i] = parser.seen(axis_codes[i])
? stored_position[slot][i] + parser.value_axis_units((AxisEnum)i) ? stored_position[slot][i] + parser.value_axis_units((AxisEnum)i)

12
Marlin/src/gcode/gcode.cpp

@ -94,7 +94,7 @@ int8_t GcodeSuite::get_target_extruder_from_command() {
if (e < EXTRUDERS) return e; if (e < EXTRUDERS) return e;
SERIAL_ECHO_START(); SERIAL_ECHO_START();
SERIAL_CHAR('M'); SERIAL_ECHO(parser.codenum); SERIAL_CHAR('M'); SERIAL_ECHO(parser.codenum);
SERIAL_ECHOLNPAIR(" " MSG_INVALID_EXTRUDER " ", int(e)); SERIAL_ECHOLNPAIR(" " STR_INVALID_EXTRUDER " ", int(e));
return -1; return -1;
} }
return active_extruder; return active_extruder;
@ -111,9 +111,9 @@ int8_t GcodeSuite::get_target_e_stepper_from_command() {
SERIAL_ECHO_START(); SERIAL_ECHO_START();
SERIAL_CHAR('M'); SERIAL_ECHO(parser.codenum); SERIAL_CHAR('M'); SERIAL_ECHO(parser.codenum);
if (e == -1) if (e == -1)
SERIAL_ECHOLNPGM(" " MSG_E_STEPPER_NOT_SPECIFIED); SERIAL_ECHOLNPGM(" " STR_E_STEPPER_NOT_SPECIFIED);
else else
SERIAL_ECHOLNPAIR(" " MSG_INVALID_E_STEPPER " ", int(e)); SERIAL_ECHOLNPAIR(" " STR_INVALID_E_STEPPER " ", int(e));
return -1; return -1;
} }
@ -951,13 +951,13 @@ void GcodeSuite::process_subcommands_now(char * gcode) {
switch (busy_state) { switch (busy_state) {
case IN_HANDLER: case IN_HANDLER:
case IN_PROCESS: case IN_PROCESS:
SERIAL_ECHO_MSG(MSG_BUSY_PROCESSING); SERIAL_ECHO_MSG(STR_BUSY_PROCESSING);
break; break;
case PAUSED_FOR_USER: case PAUSED_FOR_USER:
SERIAL_ECHO_MSG(MSG_BUSY_PAUSED_FOR_USER); SERIAL_ECHO_MSG(STR_BUSY_PAUSED_FOR_USER);
break; break;
case PAUSED_FOR_INPUT: case PAUSED_FOR_INPUT:
SERIAL_ECHO_MSG(MSG_BUSY_PAUSED_FOR_INPUT); SERIAL_ECHO_MSG(STR_BUSY_PAUSED_FOR_INPUT);
break; break;
default: default:
break; break;

2
Marlin/src/gcode/geometry/M206_M428.cpp

@ -69,7 +69,7 @@ void GcodeSuite::M428() {
if (!WITHIN(diff[i], -20, 20) && home_dir((AxisEnum)i) > 0) if (!WITHIN(diff[i], -20, 20) && home_dir((AxisEnum)i) > 0)
diff[i] = -current_position[i]; diff[i] = -current_position[i];
if (!WITHIN(diff[i], -20, 20)) { if (!WITHIN(diff[i], -20, 20)) {
SERIAL_ERROR_MSG(MSG_ERR_M428_TOO_FAR); SERIAL_ERROR_MSG(STR_ERR_M428_TOO_FAR);
LCD_ALERTMESSAGEPGM_P(PSTR("Err: Too far!")); LCD_ALERTMESSAGEPGM_P(PSTR("Err: Too far!"));
BUZZ(200, 40); BUZZ(200, 40);
return; return;

2
Marlin/src/gcode/host/M115.cpp

@ -39,7 +39,7 @@
*/ */
void GcodeSuite::M115() { void GcodeSuite::M115() {
SERIAL_ECHOLNPGM(MSG_M115_REPORT); SERIAL_ECHOLNPGM(STR_M115_REPORT);
#if ENABLED(EXTENDED_CAPABILITIES_REPORT) #if ENABLED(EXTENDED_CAPABILITIES_REPORT)

2
Marlin/src/gcode/lcd/M145.cpp

@ -38,7 +38,7 @@
void GcodeSuite::M145() { void GcodeSuite::M145() {
const uint8_t material = (uint8_t)parser.intval('S'); const uint8_t material = (uint8_t)parser.intval('S');
if (material >= COUNT(ui.preheat_hotend_temp)) if (material >= COUNT(ui.preheat_hotend_temp))
SERIAL_ERROR_MSG(MSG_ERR_MATERIAL_INDEX); SERIAL_ERROR_MSG(STR_ERR_MATERIAL_INDEX);
else { else {
int v; int v;
if (parser.seenval('H')) { if (parser.seenval('H')) {

2
Marlin/src/gcode/motion/G0_G1.cpp

@ -118,7 +118,7 @@ void GcodeSuite::G0_G1(
#endif #endif
if (_MOVE_SYNC) { if (_MOVE_SYNC) {
planner.synchronize(); planner.synchronize();
SERIAL_ECHOLNPGM(MSG_Z_MOVE_COMP); SERIAL_ECHOLNPGM(STR_Z_MOVE_COMP);
} }
#endif #endif
} }

4
Marlin/src/gcode/motion/G2_G3.cpp

@ -327,7 +327,7 @@ void GcodeSuite::G2_G3(const bool clockwise) {
// P indicates number of circles to do // P indicates number of circles to do
int8_t circles_to_do = parser.byteval('P'); int8_t circles_to_do = parser.byteval('P');
if (!WITHIN(circles_to_do, 0, 100)) if (!WITHIN(circles_to_do, 0, 100))
SERIAL_ERROR_MSG(MSG_ERR_ARC_ARGS); SERIAL_ERROR_MSG(STR_ERR_ARC_ARGS);
while (circles_to_do--) while (circles_to_do--)
plan_arc(current_position, arc_offset, clockwise); plan_arc(current_position, arc_offset, clockwise);
@ -338,7 +338,7 @@ void GcodeSuite::G2_G3(const bool clockwise) {
reset_stepper_timeout(); reset_stepper_timeout();
} }
else else
SERIAL_ERROR_MSG(MSG_ERR_ARC_ARGS); SERIAL_ERROR_MSG(STR_ERR_ARC_ARGS);
} }
} }

2
Marlin/src/gcode/motion/G4.cpp

@ -35,7 +35,7 @@ void GcodeSuite::G4() {
planner.synchronize(); planner.synchronize();
#if ENABLED(NANODLP_Z_SYNC) #if ENABLED(NANODLP_Z_SYNC)
SERIAL_ECHOLNPGM(MSG_Z_MOVE_COMP); SERIAL_ECHOLNPGM(STR_Z_MOVE_COMP);
#endif #endif
if (!ui.has_status()) LCD_MESSAGEPGM(MSG_DWELL); if (!ui.has_status()) LCD_MESSAGEPGM(MSG_DWELL);

2
Marlin/src/gcode/motion/G5.cpp

@ -45,7 +45,7 @@ void GcodeSuite::G5() {
#if ENABLED(CNC_WORKSPACE_PLANES) #if ENABLED(CNC_WORKSPACE_PLANES)
if (workspace_plane != PLANE_XY) { if (workspace_plane != PLANE_XY) {
SERIAL_ERROR_MSG(MSG_ERR_BAD_PLANE_MODE); SERIAL_ERROR_MSG(STR_ERR_BAD_PLANE_MODE);
return; return;
} }
#endif #endif

6
Marlin/src/gcode/motion/M290.cpp

@ -48,13 +48,13 @@
) { ) {
probe.offset.z += offs; probe.offset.z += offs;
SERIAL_ECHO_START(); SERIAL_ECHO_START();
SERIAL_ECHOLNPAIR(MSG_PROBE_OFFSET MSG_Z ": ", probe.offset.z); SERIAL_ECHOLNPAIR(STR_PROBE_OFFSET STR_Z ": ", probe.offset.z);
} }
else { else {
#if ENABLED(BABYSTEP_HOTEND_Z_OFFSET) #if ENABLED(BABYSTEP_HOTEND_Z_OFFSET)
hotend_offset[active_extruder].z -= offs; hotend_offset[active_extruder].z -= offs;
SERIAL_ECHO_START(); SERIAL_ECHO_START();
SERIAL_ECHOLNPAIR(MSG_PROBE_OFFSET MSG_Z ": ", hotend_offset[active_extruder].z); SERIAL_ECHOLNPAIR(STR_PROBE_OFFSET STR_Z ": ", hotend_offset[active_extruder].z);
#endif #endif
} }
} }
@ -98,7 +98,7 @@ void GcodeSuite::M290() {
SERIAL_ECHO_START(); SERIAL_ECHO_START();
#if ENABLED(BABYSTEP_ZPROBE_OFFSET) #if ENABLED(BABYSTEP_ZPROBE_OFFSET)
SERIAL_ECHOLNPAIR(MSG_PROBE_OFFSET " " MSG_Z, probe.offset.z); SERIAL_ECHOLNPAIR(STR_PROBE_OFFSET " " STR_Z, probe.offset.z);
#endif #endif
#if ENABLED(BABYSTEP_HOTEND_Z_OFFSET) #if ENABLED(BABYSTEP_HOTEND_Z_OFFSET)

2
Marlin/src/gcode/parser.cpp

@ -365,7 +365,7 @@ void GCodeParser::parse(char *p) {
#endif // CNC_COORDINATE_SYSTEMS #endif // CNC_COORDINATE_SYSTEMS
void GCodeParser::unknown_command_warning() { void GCodeParser::unknown_command_warning() {
SERIAL_ECHO_MSG(MSG_UNKNOWN_COMMAND, command_ptr, "\""); SERIAL_ECHO_MSG(STR_UNKNOWN_COMMAND, command_ptr, "\"");
} }
#if ENABLED(DEBUG_GCODE_PARSER) #if ENABLED(DEBUG_GCODE_PARSER)

4
Marlin/src/gcode/probe/M851.cpp

@ -39,9 +39,9 @@ void GcodeSuite::M851() {
if (!parser.seen("XYZ")) { if (!parser.seen("XYZ")) {
SERIAL_ECHOLNPAIR_P( SERIAL_ECHOLNPAIR_P(
#if HAS_PROBE_XY_OFFSET #if HAS_PROBE_XY_OFFSET
PSTR(MSG_PROBE_OFFSET " X"), probe.offset_xy.x, SP_Y_STR, probe.offset_xy.y, SP_Z_STR PSTR(STR_PROBE_OFFSET " X"), probe.offset_xy.x, SP_Y_STR, probe.offset_xy.y, SP_Z_STR
#else #else
PSTR(MSG_PROBE_OFFSET " X0 Y0 Z") PSTR(STR_PROBE_OFFSET " X0 Y0 Z")
#endif #endif
, probe.offset.z , probe.offset.z
); );

22
Marlin/src/gcode/queue.cpp

@ -163,7 +163,7 @@ bool GCodeQueue::enqueue_one(const char* cmd) {
if (*cmd == 0 || *cmd == '\n' || *cmd == '\r') return true; if (*cmd == 0 || *cmd == '\n' || *cmd == '\r') return true;
if (_enqueue(cmd)) { if (_enqueue(cmd)) {
SERIAL_ECHO_MSG(MSG_ENQUEUEING, cmd, "\""); SERIAL_ECHO_MSG(STR_ENQUEUEING, cmd, "\"");
return true; return true;
} }
return false; return false;
@ -244,7 +244,7 @@ void GCodeQueue::ok_to_send() {
PORT_REDIRECT(pn); // Reply to the serial port that sent the command PORT_REDIRECT(pn); // Reply to the serial port that sent the command
#endif #endif
if (!send_ok[index_r]) return; if (!send_ok[index_r]) return;
SERIAL_ECHOPGM(MSG_OK); SERIAL_ECHOPGM(STR_OK);
#if ENABLED(ADVANCED_OK) #if ENABLED(ADVANCED_OK)
char* p = command_buffer[index_r]; char* p = command_buffer[index_r];
if (*p == 'N') { if (*p == 'N') {
@ -270,7 +270,7 @@ void GCodeQueue::flush_and_request_resend() {
PORT_REDIRECT(pn); // Reply to the serial port that sent the command PORT_REDIRECT(pn); // Reply to the serial port that sent the command
#endif #endif
SERIAL_FLUSH(); SERIAL_FLUSH();
SERIAL_ECHOPGM(MSG_RESEND); SERIAL_ECHOPGM(STR_RESEND);
SERIAL_ECHOLN(last_N + 1); SERIAL_ECHOLN(last_N + 1);
ok_to_send(); ok_to_send();
} }
@ -397,7 +397,7 @@ void GCodeQueue::get_serial_commands() {
static millis_t last_command_time = 0; static millis_t last_command_time = 0;
const millis_t ms = millis(); const millis_t ms = millis();
if (length == 0 && !serial_data_available() && ELAPSED(ms, last_command_time + NO_TIMEOUTS)) { if (length == 0 && !serial_data_available() && ELAPSED(ms, last_command_time + NO_TIMEOUTS)) {
SERIAL_ECHOLNPGM(MSG_WAIT); SERIAL_ECHOLNPGM(STR_WAIT);
last_command_time = ms; last_command_time = ms;
} }
#endif #endif
@ -436,24 +436,24 @@ void GCodeQueue::get_serial_commands() {
gcode_N = strtol(npos + 1, nullptr, 10); gcode_N = strtol(npos + 1, nullptr, 10);
if (gcode_N != last_N + 1 && !M110) if (gcode_N != last_N + 1 && !M110)
return gcode_line_error(PSTR(MSG_ERR_LINE_NO), i); return gcode_line_error(PSTR(STR_ERR_LINE_NO), i);
char *apos = strrchr(command, '*'); char *apos = strrchr(command, '*');
if (apos) { if (apos) {
uint8_t checksum = 0, count = uint8_t(apos - command); uint8_t checksum = 0, count = uint8_t(apos - command);
while (count) checksum ^= command[--count]; while (count) checksum ^= command[--count];
if (strtol(apos + 1, nullptr, 10) != checksum) if (strtol(apos + 1, nullptr, 10) != checksum)
return gcode_line_error(PSTR(MSG_ERR_CHECKSUM_MISMATCH), i); return gcode_line_error(PSTR(STR_ERR_CHECKSUM_MISMATCH), i);
} }
else else
return gcode_line_error(PSTR(MSG_ERR_NO_CHECKSUM), i); return gcode_line_error(PSTR(STR_ERR_NO_CHECKSUM), i);
last_N = gcode_N; last_N = gcode_N;
} }
#if ENABLED(SDSUPPORT) #if ENABLED(SDSUPPORT)
// Pronterface "M29" and "M29 " has no line number // Pronterface "M29" and "M29 " has no line number
else if (card.flag.saving && !is_M29(command)) else if (card.flag.saving && !is_M29(command))
return gcode_line_error(PSTR(MSG_ERR_NO_CHECKSUM), i); return gcode_line_error(PSTR(STR_ERR_NO_CHECKSUM), i);
#endif #endif
// //
@ -472,7 +472,7 @@ void GCodeQueue::get_serial_commands() {
case 5: case 5:
#endif #endif
PORT_REDIRECT(i); // Reply to the serial port that sent the command PORT_REDIRECT(i); // Reply to the serial port that sent the command
SERIAL_ECHOLNPGM(MSG_ERR_STOPPED); SERIAL_ECHOLNPGM(STR_ERR_STOPPED);
LCD_MESSAGEPGM(MSG_STOPPED); LCD_MESSAGEPGM(MSG_STOPPED);
break; break;
} }
@ -527,7 +527,7 @@ void GCodeQueue::get_serial_commands() {
while (length < BUFSIZE && !card_eof) { while (length < BUFSIZE && !card_eof) {
const int16_t n = card.get(); const int16_t n = card.get();
card_eof = card.eof(); card_eof = card.eof();
if (n < 0 && !card_eof) { SERIAL_ERROR_MSG(MSG_SD_ERR_READ); continue; } if (n < 0 && !card_eof) { SERIAL_ERROR_MSG(STR_SD_ERR_READ); continue; }
const char sd_char = (char)n; const char sd_char = (char)n;
const bool is_eol = sd_char == '\n' || sd_char == '\r'; const bool is_eol = sd_char == '\n' || sd_char == '\r';
@ -585,7 +585,7 @@ void GCodeQueue::advance() {
if (is_M29(command)) { if (is_M29(command)) {
// M29 closes the file // M29 closes the file
card.closefile(); card.closefile();
SERIAL_ECHOLNPGM(MSG_FILE_SAVED); SERIAL_ECHOLNPGM(STR_FILE_SAVED);
#if !defined(__AVR__) || !defined(USBCON) #if !defined(__AVR__) || !defined(USBCON)
#if ENABLED(SERIAL_STATS_DROPPED_RX) #if ENABLED(SERIAL_STATS_DROPPED_RX)

4
Marlin/src/gcode/sdcard/M20.cpp

@ -31,9 +31,9 @@
* M20: List SD card to serial output * M20: List SD card to serial output
*/ */
void GcodeSuite::M20() { void GcodeSuite::M20() {
SERIAL_ECHOLNPGM(MSG_BEGIN_FILE_LIST); SERIAL_ECHOLNPGM(STR_BEGIN_FILE_LIST);
card.ls(); card.ls();
SERIAL_ECHOLNPGM(MSG_END_FILE_LIST); SERIAL_ECHOLNPGM(STR_END_FILE_LIST);
} }
#endif // SDSUPPORT #endif // SDSUPPORT

2
Marlin/src/gcode/temperature/M105.cpp

@ -31,7 +31,7 @@ void GcodeSuite::M105() {
const int8_t target_extruder = get_target_extruder_from_command(); const int8_t target_extruder = get_target_extruder_from_command();
if (target_extruder < 0) return; if (target_extruder < 0) return;
SERIAL_ECHOPGM(MSG_OK); SERIAL_ECHOPGM(STR_OK);
#if HAS_TEMP_SENSOR #if HAS_TEMP_SENSOR

2
Marlin/src/gcode/temperature/M303.cpp

@ -52,7 +52,7 @@ void GcodeSuite::M303() {
#endif #endif
const heater_ind_t e = (heater_ind_t)parser.intval('E'); const heater_ind_t e = (heater_ind_t)parser.intval('E');
if (!WITHIN(e, SI, EI)) { if (!WITHIN(e, SI, EI)) {
SERIAL_ECHOLNPGM(MSG_PID_BAD_EXTRUDER_NUM); SERIAL_ECHOLNPGM(STR_PID_BAD_EXTRUDER_NUM);
#if ENABLED(EXTENSIBLE_UI) #if ENABLED(EXTENSIBLE_UI)
ExtUI::OnPidTuning(ExtUI::result_t::PID_BAD_EXTRUDER_NUM); ExtUI::OnPidTuning(ExtUI::result_t::PID_BAD_EXTRUDER_NUM);
#endif #endif

8
Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/marlin_events.cpp

@ -137,16 +137,16 @@ namespace ExtUI {
SERIAL_ECHOLNPAIR("OnPidTuning:", rst); SERIAL_ECHOLNPAIR("OnPidTuning:", rst);
switch (rst) { switch (rst) {
case PID_BAD_EXTRUDER_NUM: case PID_BAD_EXTRUDER_NUM:
StatusScreen::setStatusMessage(MSG_PID_BAD_EXTRUDER_NUM); StatusScreen::setStatusMessage(STR_PID_BAD_EXTRUDER_NUM);
break; break;
case PID_TEMP_TOO_HIGH: case PID_TEMP_TOO_HIGH:
StatusScreen::setStatusMessage(MSG_PID_TEMP_TOO_HIGH); StatusScreen::setStatusMessage(STR_PID_TEMP_TOO_HIGH);
break; break;
case PID_TUNING_TIMEOUT: case PID_TUNING_TIMEOUT:
StatusScreen::setStatusMessage(MSG_PID_TIMEOUT); StatusScreen::setStatusMessage(STR_PID_TIMEOUT);
break; break;
case PID_DONE: case PID_DONE:
StatusScreen::setStatusMessage(MSG_PID_AUTOTUNE_FINISHED); StatusScreen::setStatusMessage(STR_PID_AUTOTUNE_FINISHED);
break; break;
} }
GOTO_SCREEN(StatusScreen); GOTO_SCREEN(StatusScreen);

4
Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/advanced_settings_menu.cpp

@ -74,7 +74,7 @@ void AdvancedSettingsMenu::onRedraw(draw_mode_t what) {
1 1
#endif #endif
) )
.tag(4) .button( BTN_POS(1,2), BTN_SIZE(1,1), GET_TEXT_F(MSG_OFFSETS_MENU)) .tag(4) .button( BTN_POS(1,2), BTN_SIZE(1,1), GET_TEXT_F(STR_OFFSETS_MENU))
.enabled( .enabled(
#if EITHER(LIN_ADVANCE, FILAMENT_RUNOUT_SENSOR) #if EITHER(LIN_ADVANCE, FILAMENT_RUNOUT_SENSOR)
1 1
@ -142,7 +142,7 @@ void AdvancedSettingsMenu::onRedraw(draw_mode_t what) {
1 1
#endif #endif
) )
.tag(4) .button( BTN_POS(1,2), BTN_SIZE(1,1), GET_TEXT_F(MSG_OFFSETS_MENU)) .tag(4) .button( BTN_POS(1,2), BTN_SIZE(1,1), GET_TEXT_F(STR_OFFSETS_MENU))
.tag(12).button( BTN_POS(3,4), BTN_SIZE(1,1), GET_TEXT_F(MSG_LCD_ENDSTOPS)) .tag(12).button( BTN_POS(3,4), BTN_SIZE(1,1), GET_TEXT_F(MSG_LCD_ENDSTOPS))
.tag(5) .button( BTN_POS(2,2), BTN_SIZE(1,1), GET_TEXT_F(MSG_VELOCITY)) .tag(5) .button( BTN_POS(2,2), BTN_SIZE(1,1), GET_TEXT_F(MSG_VELOCITY))
.tag(6) .button( BTN_POS(2,3), BTN_SIZE(1,1), GET_TEXT_F(MSG_ACCELERATION)) .tag(6) .button( BTN_POS(2,3), BTN_SIZE(1,1), GET_TEXT_F(MSG_ACCELERATION))

2
Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/bio_advanced_settings.cpp

@ -62,7 +62,7 @@ void AdvancedSettingsMenu::onRedraw(draw_mode_t what) {
1 1
#endif #endif
) )
.tag(6) .button( BTN_POS(1,5), BTN_SIZE(1,1), GET_TEXT_F(MSG_OFFSETS_MENU)) .tag(6) .button( BTN_POS(1,5), BTN_SIZE(1,1), GET_TEXT_F(STR_OFFSETS_MENU))
.tag(7) .button( BTN_POS(2,1), BTN_SIZE(1,1), GET_TEXT_F(MSG_STEPS_PER_MM)) .tag(7) .button( BTN_POS(2,1), BTN_SIZE(1,1), GET_TEXT_F(MSG_STEPS_PER_MM))

28
Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/endstop_state_screen.cpp

@ -62,34 +62,34 @@ void EndstopStatesScreen::onRedraw(draw_mode_t) {
.text(BTN_POS(1,1), BTN_SIZE(6,1), GET_TEXT_F(MSG_LCD_ENDSTOPS)) .text(BTN_POS(1,1), BTN_SIZE(6,1), GET_TEXT_F(MSG_LCD_ENDSTOPS))
.font(font_tiny); .font(font_tiny);
#if PIN_EXISTS(X_MAX) #if PIN_EXISTS(X_MAX)
PIN_ENABLED (1, 2, PSTR(MSG_X_MAX), X_MAX, X_MAX_ENDSTOP_INVERTING) PIN_ENABLED (1, 2, PSTR(STR_X_MAX), X_MAX, X_MAX_ENDSTOP_INVERTING)
#else #else
PIN_DISABLED(1, 2, PSTR(MSG_X_MAX), X_MAX) PIN_DISABLED(1, 2, PSTR(STR_X_MAX), X_MAX)
#endif #endif
#if PIN_EXISTS(Y_MAX) #if PIN_EXISTS(Y_MAX)
PIN_ENABLED (3, 2, PSTR(MSG_Y_MAX), Y_MAX, Y_MAX_ENDSTOP_INVERTING) PIN_ENABLED (3, 2, PSTR(STR_Y_MAX), Y_MAX, Y_MAX_ENDSTOP_INVERTING)
#else #else
PIN_DISABLED(3, 2, PSTR(MSG_Y_MAX), Y_MAX) PIN_DISABLED(3, 2, PSTR(STR_Y_MAX), Y_MAX)
#endif #endif
#if PIN_EXISTS(Z_MAX) #if PIN_EXISTS(Z_MAX)
PIN_ENABLED (5, 2, PSTR(MSG_Z_MAX), Z_MAX, Z_MAX_ENDSTOP_INVERTING) PIN_ENABLED (5, 2, PSTR(STR_Z_MAX), Z_MAX, Z_MAX_ENDSTOP_INVERTING)
#else #else
PIN_DISABLED(5, 2, PSTR(MSG_Z_MAX), Z_MAX) PIN_DISABLED(5, 2, PSTR(STR_Z_MAX), Z_MAX)
#endif #endif
#if PIN_EXISTS(X_MIN) #if PIN_EXISTS(X_MIN)
PIN_ENABLED (1, 3, PSTR(MSG_X_MIN), X_MIN, X_MIN_ENDSTOP_INVERTING) PIN_ENABLED (1, 3, PSTR(STR_X_MIN), X_MIN, X_MIN_ENDSTOP_INVERTING)
#else #else
PIN_DISABLED(1, 3, PSTR(MSG_X_MIN), X_MIN) PIN_DISABLED(1, 3, PSTR(STR_X_MIN), X_MIN)
#endif #endif
#if PIN_EXISTS(Y_MIN) #if PIN_EXISTS(Y_MIN)
PIN_ENABLED (3, 3, PSTR(MSG_Y_MIN), Y_MIN, Y_MIN_ENDSTOP_INVERTING) PIN_ENABLED (3, 3, PSTR(STR_Y_MIN), Y_MIN, Y_MIN_ENDSTOP_INVERTING)
#else #else
PIN_DISABLED(3, 3, PSTR(MSG_Y_MIN), Y_MIN) PIN_DISABLED(3, 3, PSTR(STR_Y_MIN), Y_MIN)
#endif #endif
#if PIN_EXISTS(Z_MIN) #if PIN_EXISTS(Z_MIN)
PIN_ENABLED (5, 3, PSTR(MSG_Z_MIN), Z_MIN, Z_MIN_ENDSTOP_INVERTING) PIN_ENABLED (5, 3, PSTR(STR_Z_MIN), Z_MIN, Z_MIN_ENDSTOP_INVERTING)
#else #else
PIN_DISABLED(5, 3, PSTR(MSG_Z_MIN), Z_MIN) PIN_DISABLED(5, 3, PSTR(STR_Z_MIN), Z_MIN)
#endif #endif
#if ENABLED(FILAMENT_RUNOUT_SENSOR) && PIN_EXISTS(FIL_RUNOUT) #if ENABLED(FILAMENT_RUNOUT_SENSOR) && PIN_EXISTS(FIL_RUNOUT)
PIN_ENABLED (1, 4, GET_TEXT_F(MSG_RUNOUT_1), FIL_RUNOUT, FIL_RUNOUT_INVERTING) PIN_ENABLED (1, 4, GET_TEXT_F(MSG_RUNOUT_1), FIL_RUNOUT, FIL_RUNOUT_INVERTING)
@ -102,9 +102,9 @@ void EndstopStatesScreen::onRedraw(draw_mode_t) {
PIN_DISABLED(3, 4, GET_TEXT_F(MSG_RUNOUT_2), FIL_RUNOUT2) PIN_DISABLED(3, 4, GET_TEXT_F(MSG_RUNOUT_2), FIL_RUNOUT2)
#endif #endif
#if PIN_EXISTS(Z_MIN_PROBE) #if PIN_EXISTS(Z_MIN_PROBE)
PIN_ENABLED (5, 4, PSTR(MSG_Z_PROBE), Z_MIN_PROBE, Z_MIN_PROBE_ENDSTOP_INVERTING) PIN_ENABLED (5, 4, PSTR(STR_Z_PROBE), Z_MIN_PROBE, Z_MIN_PROBE_ENDSTOP_INVERTING)
#else #else
PIN_DISABLED(5, 4, PSTR(MSG_Z_PROBE), Z_MIN_PROBE) PIN_DISABLED(5, 4, PSTR(STR_Z_PROBE), Z_MIN_PROBE)
#endif #endif
#if HAS_SOFTWARE_ENDSTOPS #if HAS_SOFTWARE_ENDSTOPS

2
Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/nozzle_offsets_screen.cpp

@ -41,7 +41,7 @@ void NozzleOffsetScreen::onRedraw(draw_mode_t what) {
widgets_t w(what); widgets_t w(what);
w.precision(2).units(GET_TEXT_F(MSG_UNITS_MM)); w.precision(2).units(GET_TEXT_F(MSG_UNITS_MM));
w.heading( GET_TEXT_F(MSG_OFFSETS_MENU)); w.heading( GET_TEXT_F(STR_OFFSETS_MENU));
w.color(Theme::x_axis).adjuster(2, GET_TEXT_F(MSG_AXIS_X), ExtUI::getNozzleOffset_mm(X, E1)); w.color(Theme::x_axis).adjuster(2, GET_TEXT_F(MSG_AXIS_X), ExtUI::getNozzleOffset_mm(X, E1));
w.color(Theme::y_axis).adjuster(4, GET_TEXT_F(MSG_AXIS_Y), ExtUI::getNozzleOffset_mm(Y, E1)); w.color(Theme::y_axis).adjuster(4, GET_TEXT_F(MSG_AXIS_Y), ExtUI::getNozzleOffset_mm(Y, E1));
w.color(Theme::z_axis).adjuster(6, GET_TEXT_F(MSG_AXIS_Z), ExtUI::getNozzleOffset_mm(Z, E1)); w.color(Theme::z_axis).adjuster(6, GET_TEXT_F(MSG_AXIS_Z), ExtUI::getNozzleOffset_mm(Z, E1));

2
Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/nudge_nozzle_screen.cpp

@ -74,7 +74,7 @@ void NudgeNozzleScreen::onRedraw(draw_mode_t what) {
#if HOTENDS > 1 #if HOTENDS > 1
format_position(str, getNozzleOffset_mm(X, E1), getNozzleOffset_mm(Y, E1), getNozzleOffset_mm(Z, E1)); format_position(str, getNozzleOffset_mm(X, E1), getNozzleOffset_mm(Y, E1), getNozzleOffset_mm(Z, E1));
w.text_field(0, GET_TEXT_F(MSG_OFFSETS_MENU), str); w.text_field(0, GET_TEXT_F(STR_OFFSETS_MENU), str);
#endif #endif
} }
#endif #endif

8
Marlin/src/lcd/extui_dgus_lcd.cpp

@ -136,16 +136,16 @@ namespace ExtUI {
SERIAL_ECHOLNPAIR("OnPidTuning:",rst); SERIAL_ECHOLNPAIR("OnPidTuning:",rst);
switch(rst) { switch(rst) {
case PID_BAD_EXTRUDER_NUM: case PID_BAD_EXTRUDER_NUM:
ScreenHandler.setstatusmessagePGM(PSTR(MSG_PID_BAD_EXTRUDER_NUM)); ScreenHandler.setstatusmessagePGM(PSTR(STR_PID_BAD_EXTRUDER_NUM));
break; break;
case PID_TEMP_TOO_HIGH: case PID_TEMP_TOO_HIGH:
ScreenHandler.setstatusmessagePGM(PSTR(MSG_PID_TEMP_TOO_HIGH)); ScreenHandler.setstatusmessagePGM(PSTR(STR_PID_TEMP_TOO_HIGH));
break; break;
case PID_TUNING_TIMEOUT: case PID_TUNING_TIMEOUT:
ScreenHandler.setstatusmessagePGM(PSTR(MSG_PID_TIMEOUT)); ScreenHandler.setstatusmessagePGM(PSTR(STR_PID_TIMEOUT));
break; break;
case PID_DONE: case PID_DONE:
ScreenHandler.setstatusmessagePGM(PSTR(MSG_PID_AUTOTUNE_FINISHED)); ScreenHandler.setstatusmessagePGM(PSTR(STR_PID_AUTOTUNE_FINISHED));
break; break;
} }
ScreenHandler.GotoScreen(DGUSLCD_SCREEN_MAIN); ScreenHandler.GotoScreen(DGUSLCD_SCREEN_MAIN);

6
Marlin/src/lcd/menu/menu_advanced.cpp

@ -85,13 +85,13 @@ void menu_cancelobject();
BACK_ITEM(MSG_ADVANCED_SETTINGS); BACK_ITEM(MSG_ADVANCED_SETTINGS);
#define EDIT_CURRENT_PWM(LABEL,I) EDIT_ITEM_P(long5, PSTR(LABEL), &stepper.motor_current_setting[I], 100, 2000, stepper.refresh_motor_power) #define EDIT_CURRENT_PWM(LABEL,I) EDIT_ITEM_P(long5, PSTR(LABEL), &stepper.motor_current_setting[I], 100, 2000, stepper.refresh_motor_power)
#if PIN_EXISTS(MOTOR_CURRENT_PWM_XY) #if PIN_EXISTS(MOTOR_CURRENT_PWM_XY)
EDIT_CURRENT_PWM(MSG_X MSG_Y, 0); EDIT_CURRENT_PWM(STR_X STR_Y, 0);
#endif #endif
#if PIN_EXISTS(MOTOR_CURRENT_PWM_Z) #if PIN_EXISTS(MOTOR_CURRENT_PWM_Z)
EDIT_CURRENT_PWM(MSG_Z, 1); EDIT_CURRENT_PWM(STR_Z, 1);
#endif #endif
#if PIN_EXISTS(MOTOR_CURRENT_PWM_E) #if PIN_EXISTS(MOTOR_CURRENT_PWM_E)
EDIT_CURRENT_PWM(MSG_E, 2); EDIT_CURRENT_PWM(STR_E, 2);
#endif #endif
END_MENU(); END_MENU();
} }

2
Marlin/src/lcd/menu/menu_configuration.cpp

@ -327,7 +327,7 @@ void menu_configuration() {
#endif #endif
#if HAS_HOTEND_OFFSET #if HAS_HOTEND_OFFSET
SUBMENU(MSG_OFFSETS_MENU, menu_tool_offsets); SUBMENU(STR_OFFSETS_MENU, menu_tool_offsets);
#endif #endif
#if ENABLED(DUAL_X_CARRIAGE) #if ENABLED(DUAL_X_CARRIAGE)

48
Marlin/src/lcd/menu/menu_tmc.cpp

@ -38,28 +38,28 @@ void menu_tmc_current() {
START_MENU(); START_MENU();
BACK_ITEM(MSG_TMC_DRIVERS); BACK_ITEM(MSG_TMC_DRIVERS);
#if AXIS_IS_TMC(X) #if AXIS_IS_TMC(X)
TMC_EDIT_STORED_I_RMS(X, MSG_X); TMC_EDIT_STORED_I_RMS(X, STR_X);
#endif #endif
#if AXIS_IS_TMC(Y) #if AXIS_IS_TMC(Y)
TMC_EDIT_STORED_I_RMS(Y, MSG_Y); TMC_EDIT_STORED_I_RMS(Y, STR_Y);
#endif #endif
#if AXIS_IS_TMC(Z) #if AXIS_IS_TMC(Z)
TMC_EDIT_STORED_I_RMS(Z, MSG_Z); TMC_EDIT_STORED_I_RMS(Z, STR_Z);
#endif #endif
#if AXIS_IS_TMC(X2) #if AXIS_IS_TMC(X2)
TMC_EDIT_STORED_I_RMS(X2, MSG_X2); TMC_EDIT_STORED_I_RMS(X2, STR_X2);
#endif #endif
#if AXIS_IS_TMC(Y2) #if AXIS_IS_TMC(Y2)
TMC_EDIT_STORED_I_RMS(Y2, MSG_Y2); TMC_EDIT_STORED_I_RMS(Y2, STR_Y2);
#endif #endif
#if AXIS_IS_TMC(Z2) #if AXIS_IS_TMC(Z2)
TMC_EDIT_STORED_I_RMS(Z2, MSG_Z2); TMC_EDIT_STORED_I_RMS(Z2, STR_Z2);
#endif #endif
#if AXIS_IS_TMC(Z3) #if AXIS_IS_TMC(Z3)
TMC_EDIT_STORED_I_RMS(Z3, MSG_Z3); TMC_EDIT_STORED_I_RMS(Z3, STR_Z3);
#endif #endif
#if AXIS_IS_TMC(Z4) #if AXIS_IS_TMC(Z4)
TMC_EDIT_STORED_I_RMS(Z4, MSG_Z4); TMC_EDIT_STORED_I_RMS(Z4, STR_Z4);
#endif #endif
#if AXIS_IS_TMC(E0) #if AXIS_IS_TMC(E0)
TMC_EDIT_STORED_I_RMS(E0, LCD_STR_E0); TMC_EDIT_STORED_I_RMS(E0, LCD_STR_E0);
@ -96,28 +96,28 @@ void menu_tmc_current() {
START_MENU(); START_MENU();
BACK_ITEM(MSG_TMC_DRIVERS); BACK_ITEM(MSG_TMC_DRIVERS);
#if AXIS_HAS_STEALTHCHOP(X) #if AXIS_HAS_STEALTHCHOP(X)
TMC_EDIT_STORED_HYBRID_THRS(X, MSG_X); TMC_EDIT_STORED_HYBRID_THRS(X, STR_X);
#endif #endif
#if AXIS_HAS_STEALTHCHOP(Y) #if AXIS_HAS_STEALTHCHOP(Y)
TMC_EDIT_STORED_HYBRID_THRS(Y, MSG_Y); TMC_EDIT_STORED_HYBRID_THRS(Y, STR_Y);
#endif #endif
#if AXIS_HAS_STEALTHCHOP(Z) #if AXIS_HAS_STEALTHCHOP(Z)
TMC_EDIT_STORED_HYBRID_THRS(Z, MSG_Z); TMC_EDIT_STORED_HYBRID_THRS(Z, STR_Z);
#endif #endif
#if AXIS_HAS_STEALTHCHOP(X2) #if AXIS_HAS_STEALTHCHOP(X2)
TMC_EDIT_STORED_HYBRID_THRS(X2, MSG_X2); TMC_EDIT_STORED_HYBRID_THRS(X2, STR_X2);
#endif #endif
#if AXIS_HAS_STEALTHCHOP(Y2) #if AXIS_HAS_STEALTHCHOP(Y2)
TMC_EDIT_STORED_HYBRID_THRS(Y2, MSG_Y2); TMC_EDIT_STORED_HYBRID_THRS(Y2, STR_Y2);
#endif #endif
#if AXIS_HAS_STEALTHCHOP(Z2) #if AXIS_HAS_STEALTHCHOP(Z2)
TMC_EDIT_STORED_HYBRID_THRS(Z2, MSG_Z2); TMC_EDIT_STORED_HYBRID_THRS(Z2, STR_Z2);
#endif #endif
#if AXIS_HAS_STEALTHCHOP(Z3) #if AXIS_HAS_STEALTHCHOP(Z3)
TMC_EDIT_STORED_HYBRID_THRS(Z3, MSG_Z3); TMC_EDIT_STORED_HYBRID_THRS(Z3, STR_Z3);
#endif #endif
#if AXIS_HAS_STEALTHCHOP(Z4) #if AXIS_HAS_STEALTHCHOP(Z4)
TMC_EDIT_STORED_HYBRID_THRS(Z4, MSG_Z4); TMC_EDIT_STORED_HYBRID_THRS(Z4, STR_Z4);
#endif #endif
#if AXIS_HAS_STEALTHCHOP(E0) #if AXIS_HAS_STEALTHCHOP(E0)
TMC_EDIT_STORED_HYBRID_THRS(E0, LCD_STR_E0); TMC_EDIT_STORED_HYBRID_THRS(E0, LCD_STR_E0);
@ -181,28 +181,28 @@ void menu_tmc_current() {
STATIC_ITEM(MSG_TMC_STEALTH_ENABLED); STATIC_ITEM(MSG_TMC_STEALTH_ENABLED);
BACK_ITEM(MSG_TMC_DRIVERS); BACK_ITEM(MSG_TMC_DRIVERS);
#if AXIS_HAS_STEALTHCHOP(X) #if AXIS_HAS_STEALTHCHOP(X)
TMC_EDIT_STEP_MODE(X, MSG_X); TMC_EDIT_STEP_MODE(X, STR_X);
#endif #endif
#if AXIS_HAS_STEALTHCHOP(Y) #if AXIS_HAS_STEALTHCHOP(Y)
TMC_EDIT_STEP_MODE(Y, MSG_Y); TMC_EDIT_STEP_MODE(Y, STR_Y);
#endif #endif
#if AXIS_HAS_STEALTHCHOP(Z) #if AXIS_HAS_STEALTHCHOP(Z)
TMC_EDIT_STEP_MODE(Z, MSG_Z); TMC_EDIT_STEP_MODE(Z, STR_Z);
#endif #endif
#if AXIS_HAS_STEALTHCHOP(X2) #if AXIS_HAS_STEALTHCHOP(X2)
TMC_EDIT_STEP_MODE(X2, MSG_X2); TMC_EDIT_STEP_MODE(X2, STR_X2);
#endif #endif
#if AXIS_HAS_STEALTHCHOP(Y2) #if AXIS_HAS_STEALTHCHOP(Y2)
TMC_EDIT_STEP_MODE(Y2, MSG_Y2); TMC_EDIT_STEP_MODE(Y2, STR_Y2);
#endif #endif
#if AXIS_HAS_STEALTHCHOP(Z2) #if AXIS_HAS_STEALTHCHOP(Z2)
TMC_EDIT_STEP_MODE(Z2, MSG_Z2); TMC_EDIT_STEP_MODE(Z2, STR_Z2);
#endif #endif
#if AXIS_HAS_STEALTHCHOP(Z3) #if AXIS_HAS_STEALTHCHOP(Z3)
TMC_EDIT_STEP_MODE(Z3, MSG_Z3); TMC_EDIT_STEP_MODE(Z3, STR_Z3);
#endif #endif
#if AXIS_HAS_STEALTHCHOP(Z4) #if AXIS_HAS_STEALTHCHOP(Z4)
TMC_EDIT_STEP_MODE(Z4, MSG_Z4); TMC_EDIT_STEP_MODE(Z4, STR_Z4);
#endif #endif
#if AXIS_HAS_STEALTHCHOP(E0) #if AXIS_HAS_STEALTHCHOP(E0)
TMC_EDIT_STEP_MODE(E0, LCD_STR_E0); TMC_EDIT_STEP_MODE(E0, LCD_STR_E0);

12
Marlin/src/module/endstops.cpp

@ -386,7 +386,7 @@ void Endstops::event_handler() {
#define ENDSTOP_HIT_TEST_Z() _ENDSTOP_HIT_TEST(Z,'Z') #define ENDSTOP_HIT_TEST_Z() _ENDSTOP_HIT_TEST(Z,'Z')
SERIAL_ECHO_START(); SERIAL_ECHO_START();
SERIAL_ECHOPGM(MSG_ENDSTOPS_HIT); SERIAL_ECHOPGM(STR_ENDSTOPS_HIT);
ENDSTOP_HIT_TEST_X(); ENDSTOP_HIT_TEST_X();
ENDSTOP_HIT_TEST_Y(); ENDSTOP_HIT_TEST_Y();
ENDSTOP_HIT_TEST_Z(); ENDSTOP_HIT_TEST_Z();
@ -415,7 +415,7 @@ void Endstops::event_handler() {
static void print_es_state(const bool is_hit, PGM_P const label=nullptr) { static void print_es_state(const bool is_hit, PGM_P const label=nullptr) {
if (label) serialprintPGM(label); if (label) serialprintPGM(label);
SERIAL_ECHOPGM(": "); SERIAL_ECHOPGM(": ");
serialprintPGM(is_hit ? PSTR(MSG_ENDSTOP_HIT) : PSTR(MSG_ENDSTOP_OPEN)); serialprintPGM(is_hit ? PSTR(STR_ENDSTOP_HIT) : PSTR(STR_ENDSTOP_OPEN));
SERIAL_EOL(); SERIAL_EOL();
} }
@ -423,7 +423,7 @@ void _O2 Endstops::report_states() {
#if ENABLED(BLTOUCH) #if ENABLED(BLTOUCH)
bltouch._set_SW_mode(); bltouch._set_SW_mode();
#endif #endif
SERIAL_ECHOLNPGM(MSG_M119_REPORT); SERIAL_ECHOLNPGM(STR_M119_REPORT);
#define ES_REPORT(S) print_es_state(READ(S##_PIN) != S##_ENDSTOP_INVERTING, PSTR(MSG_##S)) #define ES_REPORT(S) print_es_state(READ(S##_PIN) != S##_ENDSTOP_INVERTING, PSTR(MSG_##S))
#if HAS_X_MIN #if HAS_X_MIN
ES_REPORT(X_MIN); ES_REPORT(X_MIN);
@ -474,11 +474,11 @@ void _O2 Endstops::report_states() {
ES_REPORT(Z4_MAX); ES_REPORT(Z4_MAX);
#endif #endif
#if HAS_CUSTOM_PROBE_PIN #if HAS_CUSTOM_PROBE_PIN
print_es_state(READ(Z_MIN_PROBE_PIN) != Z_MIN_PROBE_ENDSTOP_INVERTING, PSTR(MSG_Z_PROBE)); print_es_state(READ(Z_MIN_PROBE_PIN) != Z_MIN_PROBE_ENDSTOP_INVERTING, PSTR(STR_Z_PROBE));
#endif #endif
#if HAS_FILAMENT_SENSOR #if HAS_FILAMENT_SENSOR
#if NUM_RUNOUT_SENSORS == 1 #if NUM_RUNOUT_SENSORS == 1
print_es_state(READ(FIL_RUNOUT_PIN) != FIL_RUNOUT_INVERTING, PSTR(MSG_FILAMENT_RUNOUT_SENSOR)); print_es_state(READ(FIL_RUNOUT_PIN) != FIL_RUNOUT_INVERTING, PSTR(STR_FILAMENT_RUNOUT_SENSOR));
#else #else
#define _CASE_RUNOUT(N) case N: pin = FIL_RUNOUT##N##_PIN; break; #define _CASE_RUNOUT(N) case N: pin = FIL_RUNOUT##N##_PIN; break;
for (uint8_t i = 1; i <= NUM_RUNOUT_SENSORS; i++) { for (uint8_t i = 1; i <= NUM_RUNOUT_SENSORS; i++) {
@ -487,7 +487,7 @@ void _O2 Endstops::report_states() {
default: continue; default: continue;
REPEAT_S(1, INCREMENT(NUM_RUNOUT_SENSORS), _CASE_RUNOUT) REPEAT_S(1, INCREMENT(NUM_RUNOUT_SENSORS), _CASE_RUNOUT)
} }
SERIAL_ECHOPGM(MSG_FILAMENT_RUNOUT_SENSOR); SERIAL_ECHOPGM(STR_FILAMENT_RUNOUT_SENSOR);
if (i > 1) SERIAL_CHAR(' ', '0' + i); if (i > 1) SERIAL_CHAR(' ', '0' + i);
print_es_state(extDigitalRead(pin) != FIL_RUNOUT_INVERTING); print_es_state(extDigitalRead(pin) != FIL_RUNOUT_INVERTING);
} }

6
Marlin/src/module/motion.cpp

@ -1018,7 +1018,7 @@ void prepare_move_to_destination() {
#if ENABLED(PREVENT_COLD_EXTRUSION) #if ENABLED(PREVENT_COLD_EXTRUSION)
ignore_e = thermalManager.tooColdToExtrude(active_extruder); ignore_e = thermalManager.tooColdToExtrude(active_extruder);
if (ignore_e) SERIAL_ECHO_MSG(MSG_ERR_COLD_EXTRUDE_STOP); if (ignore_e) SERIAL_ECHO_MSG(STR_ERR_COLD_EXTRUDE_STOP);
#endif #endif
#if ENABLED(PREVENT_LENGTHY_EXTRUDE) #if ENABLED(PREVENT_LENGTHY_EXTRUDE)
@ -1030,13 +1030,13 @@ void prepare_move_to_destination() {
MIXER_STEPPER_LOOP(e) { MIXER_STEPPER_LOOP(e) {
if (e_delta * collector[e] > (EXTRUDE_MAXLENGTH)) { if (e_delta * collector[e] > (EXTRUDE_MAXLENGTH)) {
ignore_e = true; ignore_e = true;
SERIAL_ECHO_MSG(MSG_ERR_LONG_EXTRUDE_STOP); SERIAL_ECHO_MSG(STR_ERR_LONG_EXTRUDE_STOP);
break; break;
} }
} }
#else #else
ignore_e = true; ignore_e = true;
SERIAL_ECHO_MSG(MSG_ERR_LONG_EXTRUDE_STOP); SERIAL_ECHO_MSG(STR_ERR_LONG_EXTRUDE_STOP);
#endif #endif
} }
#endif #endif

4
Marlin/src/module/planner.cpp

@ -1748,7 +1748,7 @@ bool Planner::_populate_block(block_t * const block, bool split_move,
position_float.e = target_float.e; position_float.e = target_float.e;
#endif #endif
de = 0; // no difference de = 0; // no difference
SERIAL_ECHO_MSG(MSG_ERR_COLD_EXTRUDE_STOP); SERIAL_ECHO_MSG(STR_ERR_COLD_EXTRUDE_STOP);
} }
#endif // PREVENT_COLD_EXTRUSION #endif // PREVENT_COLD_EXTRUSION
#if ENABLED(PREVENT_LENGTHY_EXTRUDE) #if ENABLED(PREVENT_LENGTHY_EXTRUDE)
@ -1770,7 +1770,7 @@ bool Planner::_populate_block(block_t * const block, bool split_move,
position_float.e = target_float.e; position_float.e = target_float.e;
#endif #endif
de = 0; // no difference de = 0; // no difference
SERIAL_ECHO_MSG(MSG_ERR_LONG_EXTRUDE_STOP); SERIAL_ECHO_MSG(STR_ERR_LONG_EXTRUDE_STOP);
} }
} }
#endif // PREVENT_LENGTHY_EXTRUDE #endif // PREVENT_LENGTHY_EXTRUDE

8
Marlin/src/module/printcounter.cpp

@ -183,7 +183,7 @@ void PrintCounter::saveStats() {
#if HAS_SERVICE_INTERVALS #if HAS_SERVICE_INTERVALS
inline void _service_when(char buffer[], const char * const msg, const uint32_t when) { inline void _service_when(char buffer[], const char * const msg, const uint32_t when) {
SERIAL_ECHOPGM(MSG_STATS); SERIAL_ECHOPGM(STR_STATS);
serialprintPGM(msg); serialprintPGM(msg);
SERIAL_ECHOLNPAIR(" in ", duration_t(when).toString(buffer)); SERIAL_ECHOLNPAIR(" in ", duration_t(when).toString(buffer));
} }
@ -192,7 +192,7 @@ void PrintCounter::saveStats() {
void PrintCounter::showStats() { void PrintCounter::showStats() {
char buffer[21]; char buffer[21];
SERIAL_ECHOPGM(MSG_STATS); SERIAL_ECHOPGM(STR_STATS);
SERIAL_ECHOLNPAIR( SERIAL_ECHOLNPAIR(
"Prints: ", data.totalPrints, "Prints: ", data.totalPrints,
", Finished: ", data.finishedPrints, ", Finished: ", data.finishedPrints,
@ -200,7 +200,7 @@ void PrintCounter::showStats() {
- ((isRunning() || isPaused()) ? 1 : 0) // Remove 1 from failures with an active counter - ((isRunning() || isPaused()) ? 1 : 0) // Remove 1 from failures with an active counter
); );
SERIAL_ECHOPGM(MSG_STATS); SERIAL_ECHOPGM(STR_STATS);
duration_t elapsed = data.printTime; duration_t elapsed = data.printTime;
elapsed.toString(buffer); elapsed.toString(buffer);
SERIAL_ECHOPAIR("Total time: ", buffer); SERIAL_ECHOPAIR("Total time: ", buffer);
@ -217,7 +217,7 @@ void PrintCounter::showStats() {
SERIAL_CHAR(')'); SERIAL_CHAR(')');
#endif #endif
SERIAL_ECHOPAIR("\n" MSG_STATS "Filament used: ", data.filamentUsed / 1000); SERIAL_ECHOPAIR("\n" STR_STATS "Filament used: ", data.filamentUsed / 1000);
SERIAL_CHAR('m'); SERIAL_CHAR('m');
SERIAL_EOL(); SERIAL_EOL();

4
Marlin/src/module/probe.cpp

@ -392,7 +392,7 @@ bool Probe::set_deployed(const bool deploy) {
_BV(X_AXIS) _BV(X_AXIS)
#endif #endif
)) { )) {
SERIAL_ERROR_MSG(MSG_STOP_UNHOMED); SERIAL_ERROR_MSG(STR_STOP_UNHOMED);
stop(); stop();
return true; return true;
} }
@ -771,7 +771,7 @@ float Probe::probe_at_point(const float &rx, const float &ry, const ProbePtRaise
if (isnan(measured_z)) { if (isnan(measured_z)) {
stow(); stow();
LCD_MESSAGEPGM(MSG_LCD_PROBING_FAILED); LCD_MESSAGEPGM(MSG_LCD_PROBING_FAILED);
SERIAL_ERROR_MSG(MSG_ERR_PROBING_FAILED); SERIAL_ERROR_MSG(STR_ERR_PROBING_FAILED);
} }
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("<<< Probe::probe_at_point"); if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("<<< Probe::probe_at_point");

4
Marlin/src/module/stepper.cpp

@ -2462,9 +2462,9 @@ void Stepper::report_positions() {
#endif #endif
#if CORE_IS_XY || CORE_IS_XZ || ENABLED(DELTA) || IS_SCARA #if CORE_IS_XY || CORE_IS_XZ || ENABLED(DELTA) || IS_SCARA
SERIAL_ECHOPAIR(MSG_COUNT_A, pos.x, " B:", pos.y); SERIAL_ECHOPAIR(STR_COUNT_A, pos.x, " B:", pos.y);
#else #else
SERIAL_ECHOPAIR(MSG_COUNT_X, pos.x, " Y:", pos.y); SERIAL_ECHOPAIR(STR_COUNT_X, pos.x, " Y:", pos.y);
#endif #endif
#if CORE_IS_XZ || CORE_IS_YZ || ENABLED(DELTA) #if CORE_IS_XZ || CORE_IS_YZ || ENABLED(DELTA)
SERIAL_ECHOLNPAIR(" C:", pos.z); SERIAL_ECHOLNPAIR(" C:", pos.z);

75
Marlin/src/module/temperature.cpp

@ -111,6 +111,9 @@
Temperature thermalManager; Temperature thermalManager;
const char str_t_thermal_runaway[] PROGMEM = STR_T_THERMAL_RUNAWAY,
str_t_heating_failed[] PROGMEM = STR_T_HEATING_FAILED;
/** /**
* Macros to include the heater id in temp errors. The compiler's dead-code * Macros to include the heater id in temp errors. The compiler's dead-code
* elimination should (hopefully) optimize out the unused strings. * elimination should (hopefully) optimize out the unused strings.
@ -404,14 +407,14 @@ volatile bool Temperature::raw_temps_ready = false;
#endif #endif
if (target > GHV(BED_MAXTEMP - 10, temp_range[heater].maxtemp - 15)) { if (target > GHV(BED_MAXTEMP - 10, temp_range[heater].maxtemp - 15)) {
SERIAL_ECHOLNPGM(MSG_PID_TEMP_TOO_HIGH); SERIAL_ECHOLNPGM(STR_PID_TEMP_TOO_HIGH);
#if ENABLED(EXTENSIBLE_UI) #if ENABLED(EXTENSIBLE_UI)
ExtUI::OnPidTuning(ExtUI::result_t::PID_TEMP_TOO_HIGH); ExtUI::OnPidTuning(ExtUI::result_t::PID_TEMP_TOO_HIGH);
#endif #endif
return; return;
} }
SERIAL_ECHOLNPGM(MSG_PID_AUTOTUNE_START); SERIAL_ECHOLNPGM(STR_PID_AUTOTUNE_START);
disable_all_heaters(); disable_all_heaters();
@ -472,27 +475,27 @@ volatile bool Temperature::raw_temps_ready = false;
LIMIT(bias, 20, max_pow - 20); LIMIT(bias, 20, max_pow - 20);
d = (bias > max_pow >> 1) ? max_pow - 1 - bias : bias; d = (bias > max_pow >> 1) ? max_pow - 1 - bias : bias;
SERIAL_ECHOPAIR(MSG_BIAS, bias, MSG_D, d, MSG_T_MIN, minT, MSG_T_MAX, maxT); SERIAL_ECHOPAIR(STR_BIAS, bias, STR_D_COLON, d, STR_T_MIN, minT, STR_T_MAX, maxT);
if (cycles > 2) { if (cycles > 2) {
const float Ku = (4.0f * d) / (float(M_PI) * (maxT - minT) * 0.5f), const float Ku = (4.0f * d) / (float(M_PI) * (maxT - minT) * 0.5f),
Tu = float(t_low + t_high) * 0.001f, Tu = float(t_low + t_high) * 0.001f,
pf = isbed ? 0.2f : 0.6f, pf = isbed ? 0.2f : 0.6f,
df = isbed ? 1.0f / 3.0f : 1.0f / 8.0f; df = isbed ? 1.0f / 3.0f : 1.0f / 8.0f;
SERIAL_ECHOPAIR(MSG_KU, Ku, MSG_TU, Tu); SERIAL_ECHOPAIR(STR_KU, Ku, STR_TU, Tu);
if (isbed) { // Do not remove this otherwise PID autotune won't work right for the bed! if (isbed) { // Do not remove this otherwise PID autotune won't work right for the bed!
tune_pid.Kp = Ku * 0.2f; tune_pid.Kp = Ku * 0.2f;
tune_pid.Ki = 2 * tune_pid.Kp / Tu; tune_pid.Ki = 2 * tune_pid.Kp / Tu;
tune_pid.Kd = tune_pid.Kp * Tu / 3; tune_pid.Kd = tune_pid.Kp * Tu / 3;
SERIAL_ECHOLNPGM("\n" " No overshoot"); // Works far better for the bed. Classic and some have bad ringing. SERIAL_ECHOLNPGM("\n" " No overshoot"); // Works far better for the bed. Classic and some have bad ringing.
SERIAL_ECHOLNPAIR(MSG_KP, tune_pid.Kp, MSG_KI, tune_pid.Ki, MSG_KD, tune_pid.Kd); SERIAL_ECHOLNPAIR(STR_KP, tune_pid.Kp, STR_KI, tune_pid.Ki, STR_KD, tune_pid.Kd);
} }
else { else {
tune_pid.Kp = Ku * pf; tune_pid.Kp = Ku * pf;
tune_pid.Kd = tune_pid.Kp * Tu * df; tune_pid.Kd = tune_pid.Kp * Tu * df;
tune_pid.Ki = 2 * tune_pid.Kp / Tu; tune_pid.Ki = 2 * tune_pid.Kp / Tu;
SERIAL_ECHOLNPGM("\n" MSG_CLASSIC_PID); SERIAL_ECHOLNPGM("\n" STR_CLASSIC_PID);
SERIAL_ECHOLNPAIR(MSG_KP, tune_pid.Kp, MSG_KI, tune_pid.Ki, MSG_KD, tune_pid.Kd); SERIAL_ECHOLNPAIR(STR_KP, tune_pid.Kp, STR_KI, tune_pid.Ki, STR_KD, tune_pid.Kd);
} }
/** /**
@ -520,7 +523,7 @@ volatile bool Temperature::raw_temps_ready = false;
#define MAX_OVERSHOOT_PID_AUTOTUNE 30 #define MAX_OVERSHOOT_PID_AUTOTUNE 30
#endif #endif
if (current_temp > target + MAX_OVERSHOOT_PID_AUTOTUNE) { if (current_temp > target + MAX_OVERSHOOT_PID_AUTOTUNE) {
SERIAL_ECHOLNPGM(MSG_PID_TEMP_TOO_HIGH); SERIAL_ECHOLNPGM(STR_PID_TEMP_TOO_HIGH);
#if ENABLED(EXTENSIBLE_UI) #if ENABLED(EXTENSIBLE_UI)
ExtUI::OnPidTuning(ExtUI::result_t::PID_TEMP_TOO_HIGH); ExtUI::OnPidTuning(ExtUI::result_t::PID_TEMP_TOO_HIGH);
#endif #endif
@ -553,10 +556,10 @@ volatile bool Temperature::raw_temps_ready = false;
if (current_temp > watch_temp_target) heated = true; // - Flag if target temperature reached if (current_temp > watch_temp_target) heated = true; // - Flag if target temperature reached
} }
else if (ELAPSED(ms, temp_change_ms)) // Watch timer expired else if (ELAPSED(ms, temp_change_ms)) // Watch timer expired
_temp_error(heater, PSTR(MSG_T_HEATING_FAILED), GET_TEXT(MSG_HEATING_FAILED_LCD)); _temp_error(heater, str_t_heating_failed, GET_TEXT(MSG_HEATING_FAILED_LCD));
} }
else if (current_temp < target - (MAX_OVERSHOOT_PID_AUTOTUNE)) // Heated, then temperature fell too far? else if (current_temp < target - (MAX_OVERSHOOT_PID_AUTOTUNE)) // Heated, then temperature fell too far?
_temp_error(heater, PSTR(MSG_T_THERMAL_RUNAWAY), GET_TEXT(MSG_THERMAL_RUNAWAY)); _temp_error(heater, str_t_thermal_runaway, GET_TEXT(MSG_THERMAL_RUNAWAY));
} }
#endif #endif
} // every 2 seconds } // every 2 seconds
@ -569,12 +572,12 @@ volatile bool Temperature::raw_temps_ready = false;
#if ENABLED(EXTENSIBLE_UI) #if ENABLED(EXTENSIBLE_UI)
ExtUI::OnPidTuning(ExtUI::result_t::PID_TUNING_TIMEOUT); ExtUI::OnPidTuning(ExtUI::result_t::PID_TUNING_TIMEOUT);
#endif #endif
SERIAL_ECHOLNPGM(MSG_PID_TIMEOUT); SERIAL_ECHOLNPGM(STR_PID_TIMEOUT);
break; break;
} }
if (cycles > ncycles && cycles > 2) { if (cycles > ncycles && cycles > 2) {
SERIAL_ECHOLNPGM(MSG_PID_AUTOTUNE_FINISHED); SERIAL_ECHOLNPGM(STR_PID_AUTOTUNE_FINISHED);
#if HAS_PID_FOR_BOTH #if HAS_PID_FOR_BOTH
const char * const estring = GHV(PSTR("bed"), NUL_STR); const char * const estring = GHV(PSTR("bed"), NUL_STR);
@ -782,12 +785,12 @@ void Temperature::_temp_error(const heater_ind_t heater, PGM_P const serial_msg,
) { ) {
SERIAL_ERROR_START(); SERIAL_ERROR_START();
serialprintPGM(serial_msg); serialprintPGM(serial_msg);
SERIAL_ECHOPGM(MSG_STOPPED_HEATER); SERIAL_ECHOPGM(STR_STOPPED_HEATER);
if (heater >= 0) SERIAL_ECHO((int)heater); if (heater >= 0) SERIAL_ECHO((int)heater);
#if HAS_HEATED_CHAMBER #if HAS_HEATED_CHAMBER
else if (heater == H_CHAMBER) SERIAL_ECHOPGM(MSG_HEATER_CHAMBER); else if (heater == H_CHAMBER) SERIAL_ECHOPGM(STR_HEATER_CHAMBER);
#endif #endif
else SERIAL_ECHOPGM(MSG_HEATER_BED); else SERIAL_ECHOPGM(STR_HEATER_BED);
SERIAL_EOL(); SERIAL_EOL();
} }
@ -817,11 +820,11 @@ void Temperature::_temp_error(const heater_ind_t heater, PGM_P const serial_msg,
} }
void Temperature::max_temp_error(const heater_ind_t heater) { void Temperature::max_temp_error(const heater_ind_t heater) {
_temp_error(heater, PSTR(MSG_T_MAXTEMP), GET_TEXT(MSG_ERR_MAXTEMP)); _temp_error(heater, PSTR(STR_T_MAXTEMP), GET_TEXT(MSG_ERR_MAXTEMP));
} }
void Temperature::min_temp_error(const heater_ind_t heater) { void Temperature::min_temp_error(const heater_ind_t heater) {
_temp_error(heater, PSTR(MSG_T_MINTEMP), GET_TEXT(MSG_ERR_MINTEMP)); _temp_error(heater, PSTR(STR_T_MINTEMP), GET_TEXT(MSG_ERR_MINTEMP));
} }
#if HOTENDS #if HOTENDS
@ -909,18 +912,18 @@ void Temperature::min_temp_error(const heater_ind_t heater) {
if (ee == active_extruder) { if (ee == active_extruder) {
SERIAL_ECHO_START(); SERIAL_ECHO_START();
SERIAL_ECHOPAIR( SERIAL_ECHOPAIR(
MSG_PID_DEBUG, ee, STR_PID_DEBUG, ee,
MSG_PID_DEBUG_INPUT, temp_hotend[ee].celsius, STR_PID_DEBUG_INPUT, temp_hotend[ee].celsius,
MSG_PID_DEBUG_OUTPUT, pid_output STR_PID_DEBUG_OUTPUT, pid_output
); );
#if DISABLED(PID_OPENLOOP) #if DISABLED(PID_OPENLOOP)
{ {
SERIAL_ECHOPAIR( SERIAL_ECHOPAIR(
MSG_PID_DEBUG_PTERM, work_pid[ee].Kp, STR_PID_DEBUG_PTERM, work_pid[ee].Kp,
MSG_PID_DEBUG_ITERM, work_pid[ee].Ki, STR_PID_DEBUG_ITERM, work_pid[ee].Ki,
MSG_PID_DEBUG_DTERM, work_pid[ee].Kd STR_PID_DEBUG_DTERM, work_pid[ee].Kd
#if ENABLED(PID_EXTRUSION_SCALING) #if ENABLED(PID_EXTRUSION_SCALING)
, MSG_PID_DEBUG_CTERM, work_pid[ee].Kc , STR_PID_DEBUG_CTERM, work_pid[ee].Kc
#endif #endif
); );
} }
@ -996,9 +999,9 @@ void Temperature::min_temp_error(const heater_ind_t heater) {
SERIAL_ECHOLNPAIR( SERIAL_ECHOLNPAIR(
" PID_BED_DEBUG : Input ", temp_bed.celsius, " Output ", pid_output, " PID_BED_DEBUG : Input ", temp_bed.celsius, " Output ", pid_output,
#if DISABLED(PID_OPENLOOP) #if DISABLED(PID_OPENLOOP)
MSG_PID_DEBUG_PTERM, work_pid.Kp, STR_PID_DEBUG_PTERM, work_pid.Kp,
MSG_PID_DEBUG_ITERM, work_pid.Ki, STR_PID_DEBUG_ITERM, work_pid.Ki,
MSG_PID_DEBUG_DTERM, work_pid.Kd, STR_PID_DEBUG_DTERM, work_pid.Kd,
#endif #endif
); );
} }
@ -1054,7 +1057,7 @@ void Temperature::manage_heater() {
HOTEND_LOOP() { HOTEND_LOOP() {
#if ENABLED(THERMAL_PROTECTION_HOTENDS) #if ENABLED(THERMAL_PROTECTION_HOTENDS)
if (degHotend(e) > temp_range[e].maxtemp) if (degHotend(e) > temp_range[e].maxtemp)
_temp_error((heater_ind_t)e, PSTR(MSG_T_THERMAL_RUNAWAY), GET_TEXT(MSG_THERMAL_RUNAWAY)); _temp_error((heater_ind_t)e, str_t_thermal_runaway, GET_TEXT(MSG_THERMAL_RUNAWAY));
#endif #endif
#if HEATER_IDLE_HANDLER #if HEATER_IDLE_HANDLER
@ -1072,7 +1075,7 @@ void Temperature::manage_heater() {
// Make sure temperature is increasing // Make sure temperature is increasing
if (watch_hotend[e].next_ms && ELAPSED(ms, watch_hotend[e].next_ms)) { // Time to check this extruder? if (watch_hotend[e].next_ms && ELAPSED(ms, watch_hotend[e].next_ms)) { // Time to check this extruder?
if (degHotend(e) < watch_hotend[e].target) // Failed to increase enough? if (degHotend(e) < watch_hotend[e].target) // Failed to increase enough?
_temp_error((heater_ind_t)e, PSTR(MSG_T_HEATING_FAILED), GET_TEXT(MSG_HEATING_FAILED_LCD)); _temp_error((heater_ind_t)e, str_t_heating_failed, GET_TEXT(MSG_HEATING_FAILED_LCD));
else // Start again if the target is still far off else // Start again if the target is still far off
start_watching_hotend(e); start_watching_hotend(e);
} }
@ -1081,7 +1084,7 @@ void Temperature::manage_heater() {
#if ENABLED(TEMP_SENSOR_1_AS_REDUNDANT) #if ENABLED(TEMP_SENSOR_1_AS_REDUNDANT)
// Make sure measured temperatures are close together // Make sure measured temperatures are close together
if (ABS(temp_hotend[0].celsius - redundant_temperature) > MAX_REDUNDANT_TEMP_SENSOR_DIFF) if (ABS(temp_hotend[0].celsius - redundant_temperature) > MAX_REDUNDANT_TEMP_SENSOR_DIFF)
_temp_error(H_E0, PSTR(MSG_REDUNDANCY), GET_TEXT(MSG_ERR_REDUNDANT_TEMP)); _temp_error(H_E0, PSTR(STR_REDUNDANCY), GET_TEXT(MSG_ERR_REDUNDANT_TEMP));
#endif #endif
} // HOTEND_LOOP } // HOTEND_LOOP
@ -1107,14 +1110,14 @@ void Temperature::manage_heater() {
#if ENABLED(THERMAL_PROTECTION_BED) #if ENABLED(THERMAL_PROTECTION_BED)
if (degBed() > BED_MAXTEMP) if (degBed() > BED_MAXTEMP)
_temp_error(H_BED, PSTR(MSG_T_THERMAL_RUNAWAY), GET_TEXT(MSG_THERMAL_RUNAWAY)); _temp_error(H_BED, str_t_thermal_runaway, GET_TEXT(MSG_THERMAL_RUNAWAY));
#endif #endif
#if WATCH_BED #if WATCH_BED
// Make sure temperature is increasing // Make sure temperature is increasing
if (watch_bed.elapsed(ms)) { // Time to check the bed? if (watch_bed.elapsed(ms)) { // Time to check the bed?
if (degBed() < watch_bed.target) // Failed to increase enough? if (degBed() < watch_bed.target) // Failed to increase enough?
_temp_error(H_BED, PSTR(MSG_T_HEATING_FAILED), GET_TEXT(MSG_HEATING_FAILED_LCD)); _temp_error(H_BED, str_t_heating_failed, GET_TEXT(MSG_HEATING_FAILED_LCD));
else // Start again if the target is still far off else // Start again if the target is still far off
start_watching_bed(); start_watching_bed();
} }
@ -1185,14 +1188,14 @@ void Temperature::manage_heater() {
#if ENABLED(THERMAL_PROTECTION_CHAMBER) #if ENABLED(THERMAL_PROTECTION_CHAMBER)
if (degChamber() > CHAMBER_MAXTEMP) if (degChamber() > CHAMBER_MAXTEMP)
_temp_error(H_CHAMBER, PSTR(MSG_T_THERMAL_RUNAWAY), GET_TEXT(MSG_THERMAL_RUNAWAY)); _temp_error(H_CHAMBER, str_t_thermal_runaway, GET_TEXT(MSG_THERMAL_RUNAWAY));
#endif #endif
#if WATCH_CHAMBER #if WATCH_CHAMBER
// Make sure temperature is increasing // Make sure temperature is increasing
if (watch_chamber.elapsed(ms)) { // Time to check the chamber? if (watch_chamber.elapsed(ms)) { // Time to check the chamber?
if (degChamber() < watch_chamber.target) // Failed to increase enough? if (degChamber() < watch_chamber.target) // Failed to increase enough?
_temp_error(H_CHAMBER, PSTR(MSG_T_HEATING_FAILED), GET_TEXT(MSG_HEATING_FAILED_LCD)); _temp_error(H_CHAMBER, str_t_heating_failed, GET_TEXT(MSG_HEATING_FAILED_LCD));
else else
start_watching_chamber(); // Start again if the target is still far off start_watching_chamber(); // Start again if the target is still far off
} }
@ -1404,7 +1407,7 @@ void Temperature::manage_heater() {
{ {
SERIAL_ERROR_START(); SERIAL_ERROR_START();
SERIAL_ECHO((int)e); SERIAL_ECHO((int)e);
SERIAL_ECHOLNPGM(MSG_INVALID_EXTRUDER_NUM); SERIAL_ECHOLNPGM(STR_INVALID_EXTRUDER_NUM);
kill(); kill();
return 0; return 0;
} }
@ -2067,7 +2070,7 @@ void Temperature::init() {
sm.state = TRRunaway; sm.state = TRRunaway;
case TRRunaway: case TRRunaway:
_temp_error(heater_id, PSTR(MSG_T_THERMAL_RUNAWAY), GET_TEXT(MSG_THERMAL_RUNAWAY)); _temp_error(heater_id, str_t_thermal_runaway, GET_TEXT(MSG_THERMAL_RUNAWAY));
} }
} }

6
Marlin/src/module/tool_change.cpp

@ -700,7 +700,7 @@ inline void fast_line_to_current(const AxisEnum fr_axis) { _line_to_current(fr_a
inline void invalid_extruder_error(const uint8_t e) { inline void invalid_extruder_error(const uint8_t e) {
SERIAL_ECHO_START(); SERIAL_ECHO_START();
SERIAL_CHAR('T'); SERIAL_ECHO(int(e)); SERIAL_CHAR('T'); SERIAL_ECHO(int(e));
SERIAL_CHAR(' '); SERIAL_ECHOLNPGM(MSG_INVALID_EXTRUDER); SERIAL_CHAR(' '); SERIAL_ECHOLNPGM(STR_INVALID_EXTRUDER);
} }
#endif #endif
@ -843,7 +843,7 @@ void tool_change(const uint8_t new_tool, bool no_move/*=false*/) {
#endif #endif
if (should_swap) { if (should_swap) {
if (too_cold) { if (too_cold) {
SERIAL_ECHO_MSG(MSG_ERR_HOTEND_TOO_COLD); SERIAL_ECHO_MSG(STR_ERR_HOTEND_TOO_COLD);
#if ENABLED(SINGLENOZZLE) #if ENABLED(SINGLENOZZLE)
active_extruder = new_tool; active_extruder = new_tool;
return; return;
@ -1073,7 +1073,7 @@ void tool_change(const uint8_t new_tool, bool no_move/*=false*/) {
#endif #endif
SERIAL_ECHO_START(); SERIAL_ECHO_START();
SERIAL_ECHOLNPAIR(MSG_ACTIVE_EXTRUDER, int(active_extruder)); SERIAL_ECHOLNPAIR(STR_ACTIVE_EXTRUDER, int(active_extruder));
#endif // EXTRUDERS > 1 #endif // EXTRUDERS > 1
} }

38
Marlin/src/sd/cardreader.cpp

@ -248,7 +248,7 @@ void CardReader::printListing(SdFile parent, const char * const prepend/*=nullpt
SdFile child; SdFile child;
if (!child.open(&parent, dosFilename, O_READ)) { if (!child.open(&parent, dosFilename, O_READ)) {
SERIAL_ECHO_START(); SERIAL_ECHO_START();
SERIAL_ECHOLNPAIR(MSG_SD_CANT_OPEN_SUBDIR, dosFilename); SERIAL_ECHOLNPAIR(STR_SD_CANT_OPEN_SUBDIR, dosFilename);
} }
printListing(child, path); printListing(child, path);
// close() is done automatically by destructor of SdFile // close() is done automatically by destructor of SdFile
@ -318,7 +318,7 @@ void CardReader::ls() {
if (!dir.open(&diveDir, segment, O_READ)) { if (!dir.open(&diveDir, segment, O_READ)) {
SERIAL_EOL(); SERIAL_EOL();
SERIAL_ECHO_START(); SERIAL_ECHO_START();
SERIAL_ECHOPAIR(MSG_SD_CANT_OPEN_SUBDIR, segment); SERIAL_ECHOPAIR(STR_SD_CANT_OPEN_SUBDIR, segment);
break; break;
} }
@ -362,14 +362,14 @@ void CardReader::mount() {
#if defined(LCD_SDSS) && (LCD_SDSS != SDSS) #if defined(LCD_SDSS) && (LCD_SDSS != SDSS)
&& !sd2card.init(SPI_SPEED, LCD_SDSS) && !sd2card.init(SPI_SPEED, LCD_SDSS)
#endif #endif
) SERIAL_ECHO_MSG(MSG_SD_INIT_FAIL); ) SERIAL_ECHO_MSG(STR_SD_INIT_FAIL);
else if (!volume.init(&sd2card)) else if (!volume.init(&sd2card))
SERIAL_ERROR_MSG(MSG_SD_VOL_INIT_FAIL); SERIAL_ERROR_MSG(STR_SD_VOL_INIT_FAIL);
else if (!root.openRoot(&volume)) else if (!root.openRoot(&volume))
SERIAL_ERROR_MSG(MSG_SD_OPENROOT_FAIL); SERIAL_ERROR_MSG(STR_SD_OPENROOT_FAIL);
else { else {
flag.mounted = true; flag.mounted = true;
SERIAL_ECHO_MSG(MSG_SD_CARD_OK); SERIAL_ECHO_MSG(STR_SD_CARD_OK);
#if ENABLED(EEPROM_SETTINGS) && NONE(FLASH_EEPROM_EMULATION, SPI_EEPROM, I2C_EEPROM) #if ENABLED(EEPROM_SETTINGS) && NONE(FLASH_EEPROM_EMULATION, SPI_EEPROM, I2C_EEPROM)
settings.first_load(); settings.first_load();
#endif #endif
@ -446,7 +446,7 @@ void CardReader::getAbsFilename(char *dst) {
} }
void openFailed(const char * const fname) { void openFailed(const char * const fname) {
SERIAL_ECHOLNPAIR(MSG_SD_OPEN_FILE_FAIL, fname, "."); SERIAL_ECHOLNPAIR(STR_SD_OPEN_FILE_FAIL, fname, ".");
} }
void announceOpen(const uint8_t doing, const char * const path) { void announceOpen(const uint8_t doing, const char * const path) {
@ -511,8 +511,8 @@ void CardReader::openFileRead(char * const path, const uint8_t subcall_type/*=0*
if (file.open(curDir, fname, O_READ)) { if (file.open(curDir, fname, O_READ)) {
filesize = file.fileSize(); filesize = file.fileSize();
sdpos = 0; sdpos = 0;
SERIAL_ECHOLNPAIR(MSG_SD_FILE_OPENED, fname, MSG_SD_SIZE, filesize); SERIAL_ECHOLNPAIR(STR_SD_FILE_OPENED, fname, STR_SD_SIZE, filesize);
SERIAL_ECHOLNPGM(MSG_SD_FILE_SELECTED); SERIAL_ECHOLNPGM(STR_SD_FILE_SELECTED);
selectFileByName(fname); selectFileByName(fname);
ui.set_status(longFilename[0] ? longFilename : fname); ui.set_status(longFilename[0] ? longFilename : fname);
@ -521,6 +521,10 @@ void CardReader::openFileRead(char * const path, const uint8_t subcall_type/*=0*
openFailed(fname); openFailed(fname);
} }
inline void echo_write_to_file(char * const fname) {
SERIAL_ECHOLNPAIR(STR_SD_WRITE_TO_FILE, fname);
}
// //
// Open a file by DOS path for write // Open a file by DOS path for write
// //
@ -542,7 +546,7 @@ void CardReader::openFileWrite(char * const path) {
#if ENABLED(EMERGENCY_PARSER) #if ENABLED(EMERGENCY_PARSER)
emergency_parser.disable(); emergency_parser.disable();
#endif #endif
SERIAL_ECHOLNPAIR(MSG_SD_WRITE_TO_FILE, fname); echo_write_to_file(fname);
ui.set_status(fname); ui.set_status(fname);
} }
else else
@ -574,13 +578,13 @@ void CardReader::removeFile(const char * const name) {
void CardReader::report_status() { void CardReader::report_status() {
if (isPrinting()) { if (isPrinting()) {
SERIAL_ECHOPGM(MSG_SD_PRINTING_BYTE); SERIAL_ECHOPGM(STR_SD_PRINTING_BYTE);
SERIAL_ECHO(sdpos); SERIAL_ECHO(sdpos);
SERIAL_CHAR('/'); SERIAL_CHAR('/');
SERIAL_ECHOLN(filesize); SERIAL_ECHOLN(filesize);
} }
else else
SERIAL_ECHOLNPGM(MSG_SD_NOT_PRINTING); SERIAL_ECHOLNPGM(STR_SD_NOT_PRINTING);
} }
void CardReader::write_command(char * const buf) { void CardReader::write_command(char * const buf) {
@ -598,7 +602,7 @@ void CardReader::write_command(char * const buf) {
end[3] = '\0'; end[3] = '\0';
file.write(begin); file.write(begin);
if (file.writeError) SERIAL_ERROR_MSG(MSG_SD_ERR_WRITE_TO_FILE); if (file.writeError) SERIAL_ERROR_MSG(STR_SD_ERR_WRITE_TO_FILE);
} }
// //
@ -739,7 +743,7 @@ const char* CardReader::diveToFile(const bool update_cwd, SdFile*& curDir, const
// Open curDir // Open curDir
if (!sub->open(curDir, dosSubdirname, O_READ)) { if (!sub->open(curDir, dosSubdirname, O_READ)) {
SERIAL_ECHOLNPAIR(MSG_SD_OPEN_FILE_FAIL, dosSubdirname, "."); SERIAL_ECHOLNPAIR(STR_SD_OPEN_FILE_FAIL, dosSubdirname, ".");
return nullptr; return nullptr;
} }
@ -779,7 +783,7 @@ void CardReader::cd(const char * relpath) {
} }
else { else {
SERIAL_ECHO_START(); SERIAL_ECHO_START();
SERIAL_ECHOLNPAIR(MSG_SD_CANT_ENTER_SUBDIR, relpath); SERIAL_ECHOLNPAIR(STR_SD_CANT_ENTER_SUBDIR, relpath);
} }
} }
@ -1113,9 +1117,9 @@ void CardReader::fileHasFinished() {
if (!isMounted()) return; if (!isMounted()) return;
if (recovery.file.isOpen()) return; if (recovery.file.isOpen()) return;
if (!recovery.file.open(&root, recovery.filename, read ? O_READ : O_CREAT | O_WRITE | O_TRUNC | O_SYNC)) if (!recovery.file.open(&root, recovery.filename, read ? O_READ : O_CREAT | O_WRITE | O_TRUNC | O_SYNC))
SERIAL_ECHOLNPAIR(MSG_SD_OPEN_FILE_FAIL, recovery.filename, "."); SERIAL_ECHOLNPAIR(STR_SD_OPEN_FILE_FAIL, recovery.filename, ".");
else if (!read) else if (!read)
SERIAL_ECHOLNPAIR(MSG_SD_WRITE_TO_FILE, recovery.filename); echo_write_to_file(recovery.filename);
} }
// Removing the job recovery file currently requires closing // Removing the job recovery file currently requires closing

Loading…
Cancel
Save