Browse Source

🎨 Fewer serial macros

vanilla_fb_2.0.x
Scott Lahteine 3 years ago
committed by Scott Lahteine
parent
commit
b661795ae5
  1. 10
      Marlin/src/HAL/AVR/fastio.cpp
  2. 16
      Marlin/src/HAL/AVR/pinsDebug.h
  3. 34
      Marlin/src/HAL/DUE/eeprom_flash.cpp
  4. 2
      Marlin/src/HAL/DUE/pinsDebug.h
  5. 2
      Marlin/src/HAL/ESP32/wifi.cpp
  6. 8
      Marlin/src/HAL/LPC1768/eeprom_sdcard.cpp
  7. 2
      Marlin/src/HAL/SAMD51/pinsDebug.h
  8. 16
      Marlin/src/HAL/STM32/eeprom_flash.cpp
  9. 2
      Marlin/src/HAL/STM32/pinsDebug.h
  10. 6
      Marlin/src/HAL/STM32/usb_host.cpp
  11. 6
      Marlin/src/HAL/shared/Delay.cpp
  12. 4
      Marlin/src/MarlinCore.cpp
  13. 12
      Marlin/src/core/bug_on.h
  14. 22
      Marlin/src/core/debug_out.h
  15. 2
      Marlin/src/core/serial.cpp
  16. 36
      Marlin/src/core/serial.h
  17. 12
      Marlin/src/core/utility.cpp
  18. 4
      Marlin/src/feature/backlash.cpp
  19. 10
      Marlin/src/feature/bedlevel/abl/abl.cpp
  20. 2
      Marlin/src/feature/bedlevel/ubl/ubl.cpp
  21. 8
      Marlin/src/feature/bedlevel/ubl/ubl.h
  22. 60
      Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp
  23. 14
      Marlin/src/feature/binary_stream.h
  24. 8
      Marlin/src/feature/bltouch.cpp
  25. 8
      Marlin/src/feature/dac/stepper_dac.cpp
  26. 54
      Marlin/src/feature/encoder_i2c.cpp
  27. 12
      Marlin/src/feature/encoder_i2c.h
  28. 34
      Marlin/src/feature/fwretract.cpp
  29. 6
      Marlin/src/feature/joystick.cpp
  30. 2
      Marlin/src/feature/max7219.cpp
  31. 2
      Marlin/src/feature/meatpack.cpp
  32. 4
      Marlin/src/feature/mixing.cpp
  33. 2
      Marlin/src/feature/mixing.h
  34. 18
      Marlin/src/feature/mmu/mmu2.cpp
  35. 18
      Marlin/src/feature/pause.cpp
  36. 34
      Marlin/src/feature/powerloss.cpp
  37. 4
      Marlin/src/feature/probe_temp_comp.cpp
  38. 8
      Marlin/src/feature/repeat.cpp
  39. 2
      Marlin/src/feature/runout.cpp
  40. 6
      Marlin/src/feature/runout.h
  41. 4
      Marlin/src/feature/tmc_util.cpp
  42. 4
      Marlin/src/feature/tmc_util.h
  43. 2
      Marlin/src/feature/twibus.cpp
  44. 2
      Marlin/src/gcode/bedlevel/G26.cpp
  45. 14
      Marlin/src/gcode/bedlevel/G35.cpp
  46. 10
      Marlin/src/gcode/bedlevel/M420.cpp
  47. 18
      Marlin/src/gcode/bedlevel/abl/G29.cpp
  48. 6
      Marlin/src/gcode/bedlevel/mbl/G29.cpp
  49. 4
      Marlin/src/gcode/calibrate/G28.cpp
  50. 6
      Marlin/src/gcode/calibrate/G33.cpp
  51. 26
      Marlin/src/gcode/calibrate/G34_M422.cpp
  52. 74
      Marlin/src/gcode/calibrate/G425.cpp
  53. 10
      Marlin/src/gcode/calibrate/G76_M192_M871.cpp
  54. 36
      Marlin/src/gcode/calibrate/M100.cpp
  55. 6
      Marlin/src/gcode/calibrate/M425.cpp
  56. 8
      Marlin/src/gcode/calibrate/M48.cpp
  57. 4
      Marlin/src/gcode/calibrate/M665.cpp
  58. 18
      Marlin/src/gcode/calibrate/M666.cpp
  59. 18
      Marlin/src/gcode/config/M200-M205.cpp
  60. 20
      Marlin/src/gcode/config/M217.cpp
  61. 2
      Marlin/src/gcode/config/M218.cpp
  62. 2
      Marlin/src/gcode/config/M220.cpp
  63. 2
      Marlin/src/gcode/config/M221.cpp
  64. 2
      Marlin/src/gcode/config/M281.cpp
  65. 8
      Marlin/src/gcode/config/M301.cpp
  66. 2
      Marlin/src/gcode/config/M302.cpp
  67. 2
      Marlin/src/gcode/config/M309.cpp
  68. 12
      Marlin/src/gcode/config/M43.cpp
  69. 10
      Marlin/src/gcode/config/M92.cpp
  70. 8
      Marlin/src/gcode/control/M111.cpp
  71. 2
      Marlin/src/gcode/control/M211.cpp
  72. 30
      Marlin/src/gcode/control/M605.cpp
  73. 4
      Marlin/src/gcode/control/M993_M994.cpp
  74. 2
      Marlin/src/gcode/control/T.cpp
  75. 6
      Marlin/src/gcode/eeprom/M500-M504.cpp
  76. 2
      Marlin/src/gcode/feature/L6470/M122.cpp
  77. 12
      Marlin/src/gcode/feature/L6470/M906.cpp
  78. 28
      Marlin/src/gcode/feature/L6470/M916-918.cpp
  79. 10
      Marlin/src/gcode/feature/advance/M900.cpp
  80. 2
      Marlin/src/gcode/feature/controllerfan/M710.cpp
  81. 2
      Marlin/src/gcode/feature/digipot/M907-M910.cpp
  82. 4
      Marlin/src/gcode/feature/filwidth/M404-M407.cpp
  83. 6
      Marlin/src/gcode/feature/mixing/M166.cpp
  84. 2
      Marlin/src/gcode/feature/password/M510-M512.cpp
  85. 2
      Marlin/src/gcode/feature/pause/G60.cpp
  86. 4
      Marlin/src/gcode/feature/pause/G61.cpp
  87. 4
      Marlin/src/gcode/feature/pause/M603.cpp
  88. 2
      Marlin/src/gcode/feature/power_monitor/M430.cpp
  89. 2
      Marlin/src/gcode/feature/powerloss/M413.cpp
  90. 4
      Marlin/src/gcode/feature/runout/M412.cpp
  91. 38
      Marlin/src/gcode/feature/trinamic/M906.cpp
  92. 60
      Marlin/src/gcode/feature/trinamic/M911-M914.cpp
  93. 6
      Marlin/src/gcode/gcode.cpp
  94. 6
      Marlin/src/gcode/gcode_d.cpp
  95. 4
      Marlin/src/gcode/geometry/G53-G59.cpp
  96. 2
      Marlin/src/gcode/geometry/M206_M428.cpp
  97. 2
      Marlin/src/gcode/host/M114.cpp
  98. 2
      Marlin/src/gcode/host/M115.cpp
  99. 2
      Marlin/src/gcode/host/M360.cpp
  100. 2
      Marlin/src/gcode/lcd/M145.cpp

10
Marlin/src/HAL/AVR/fastio.cpp

@ -267,11 +267,11 @@ uint16_t set_pwm_frequency_hz(const_float_t hz, const float dca, const float dcb
SET_WGM(5, FAST_PWM_ICRn); // Fast PWM with ICR5 as TOP
//SERIAL_ECHOLNPGM("Timer 5 Settings:");
//SERIAL_ECHOLNPAIR(" Prescaler=", prescaler);
//SERIAL_ECHOLNPAIR(" TOP=", ICR5);
//SERIAL_ECHOLNPAIR(" OCR5A=", OCR5A);
//SERIAL_ECHOLNPAIR(" OCR5B=", OCR5B);
//SERIAL_ECHOLNPAIR(" OCR5C=", OCR5C);
//SERIAL_ECHOLNPGM(" Prescaler=", prescaler);
//SERIAL_ECHOLNPGM(" TOP=", ICR5);
//SERIAL_ECHOLNPGM(" OCR5A=", OCR5A);
//SERIAL_ECHOLNPGM(" OCR5B=", OCR5B);
//SERIAL_ECHOLNPGM(" OCR5C=", OCR5C);
}
else {
// Restore the default for Timer 5

16
Marlin/src/HAL/AVR/pinsDebug.h

@ -235,9 +235,9 @@ static void print_is_also_tied() { SERIAL_ECHOPGM(" is also tied to this pin");
inline void com_print(const uint8_t N, const uint8_t Z) {
const uint8_t *TCCRA = (uint8_t*)TCCR_A(N);
SERIAL_ECHOPAIR(" COM", AS_DIGIT(N));
SERIAL_ECHOPGM(" COM", AS_DIGIT(N));
SERIAL_CHAR(Z);
SERIAL_ECHOPAIR(": ", int((*TCCRA >> (6 - Z * 2)) & 0x03));
SERIAL_ECHOPGM(": ", int((*TCCRA >> (6 - Z * 2)) & 0x03));
}
void timer_prefix(uint8_t T, char L, uint8_t N) { // T - timer L - pwm N - WGM bit layout
@ -247,7 +247,7 @@ void timer_prefix(uint8_t T, char L, uint8_t N) { // T - timer L - pwm N -
uint8_t WGM = (((*TCCRB & _BV(WGM_2)) >> 1) | (*TCCRA & (_BV(WGM_0) | _BV(WGM_1))));
if (N == 4) WGM |= ((*TCCRB & _BV(WGM_3)) >> 1);
SERIAL_ECHOPAIR(" TIMER", AS_DIGIT(T));
SERIAL_ECHOPGM(" TIMER", AS_DIGIT(T));
SERIAL_CHAR(L);
SERIAL_ECHO_SP(3);
@ -259,14 +259,14 @@ void timer_prefix(uint8_t T, char L, uint8_t N) { // T - timer L - pwm N -
const uint16_t *OCRVAL16 = (uint16_t*)OCR_VAL(T, L - 'A');
PWM_PRINT(*OCRVAL16);
}
SERIAL_ECHOPAIR(" WGM: ", WGM);
SERIAL_ECHOPGM(" WGM: ", WGM);
com_print(T,L);
SERIAL_ECHOPAIR(" CS: ", (*TCCRB & (_BV(CS_0) | _BV(CS_1) | _BV(CS_2)) ));
SERIAL_ECHOPAIR(" TCCR", AS_DIGIT(T), "A: ", *TCCRA);
SERIAL_ECHOPAIR(" TCCR", AS_DIGIT(T), "B: ", *TCCRB);
SERIAL_ECHOPGM(" CS: ", (*TCCRB & (_BV(CS_0) | _BV(CS_1) | _BV(CS_2)) ));
SERIAL_ECHOPGM(" TCCR", AS_DIGIT(T), "A: ", *TCCRA);
SERIAL_ECHOPGM(" TCCR", AS_DIGIT(T), "B: ", *TCCRB);
const uint8_t *TMSK = (uint8_t*)TIMSK(T);
SERIAL_ECHOPAIR(" TIMSK", AS_DIGIT(T), ": ", *TMSK);
SERIAL_ECHOPGM(" TIMSK", AS_DIGIT(T), ": ", *TMSK);
const uint8_t OCIE = L - 'A' + 1;
if (N == 3) { if (WGM == 0 || WGM == 2 || WGM == 4 || WGM == 6) err_is_counter(); }

34
Marlin/src/HAL/DUE/eeprom_flash.cpp

@ -200,9 +200,9 @@ static bool ee_PageWrite(uint16_t page, const void *data) {
pageContents[i] = (((uint32_t*)data)[i]) | (~(pageContents[i] ^ ((uint32_t*)data)[i]));
DEBUG_ECHO_START();
DEBUG_ECHOLNPAIR("EEPROM PageWrite ", page);
DEBUG_ECHOLNPAIR(" in FLASH address ", (uint32_t)addrflash);
DEBUG_ECHOLNPAIR(" base address ", (uint32_t)getFlashStorage(0));
DEBUG_ECHOLNPGM("EEPROM PageWrite ", page);
DEBUG_ECHOLNPGM(" in FLASH address ", (uint32_t)addrflash);
DEBUG_ECHOLNPGM(" base address ", (uint32_t)getFlashStorage(0));
DEBUG_FLUSH();
// Get the page relative to the start of the EFC controller, and the EFC controller to use
@ -246,7 +246,7 @@ static bool ee_PageWrite(uint16_t page, const void *data) {
__enable_irq();
DEBUG_ECHO_START();
DEBUG_ECHOLNPAIR("EEPROM Unlock failure for page ", page);
DEBUG_ECHOLNPGM("EEPROM Unlock failure for page ", page);
return false;
}
@ -271,7 +271,7 @@ static bool ee_PageWrite(uint16_t page, const void *data) {
__enable_irq();
DEBUG_ECHO_START();
DEBUG_ECHOLNPAIR("EEPROM Write failure for page ", page);
DEBUG_ECHOLNPGM("EEPROM Write failure for page ", page);
return false;
}
@ -287,7 +287,7 @@ static bool ee_PageWrite(uint16_t page, const void *data) {
#ifdef EE_EMU_DEBUG
DEBUG_ECHO_START();
DEBUG_ECHOLNPAIR("EEPROM Verify Write failure for page ", page);
DEBUG_ECHOLNPGM("EEPROM Verify Write failure for page ", page);
ee_Dump( page, (uint32_t *)addrflash);
ee_Dump(-page, data);
@ -306,7 +306,7 @@ static bool ee_PageWrite(uint16_t page, const void *data) {
}
}
}
DEBUG_ECHOLNPAIR("--> Differing bits: ", count);
DEBUG_ECHOLNPGM("--> Differing bits: ", count);
#endif
return false;
@ -326,9 +326,9 @@ static bool ee_PageErase(uint16_t page) {
uint32_t addrflash = uint32_t(getFlashStorage(page));
DEBUG_ECHO_START();
DEBUG_ECHOLNPAIR("EEPROM PageErase ", page);
DEBUG_ECHOLNPAIR(" in FLASH address ", (uint32_t)addrflash);
DEBUG_ECHOLNPAIR(" base address ", (uint32_t)getFlashStorage(0));
DEBUG_ECHOLNPGM("EEPROM PageErase ", page);
DEBUG_ECHOLNPGM(" in FLASH address ", (uint32_t)addrflash);
DEBUG_ECHOLNPGM(" base address ", (uint32_t)getFlashStorage(0));
DEBUG_FLUSH();
// Get the page relative to the start of the EFC controller, and the EFC controller to use
@ -371,7 +371,7 @@ static bool ee_PageErase(uint16_t page) {
__enable_irq();
DEBUG_ECHO_START();
DEBUG_ECHOLNPAIR("EEPROM Unlock failure for page ",page);
DEBUG_ECHOLNPGM("EEPROM Unlock failure for page ",page);
return false;
}
@ -395,7 +395,7 @@ static bool ee_PageErase(uint16_t page) {
__enable_irq();
DEBUG_ECHO_START();
DEBUG_ECHOLNPAIR("EEPROM Erase failure for page ",page);
DEBUG_ECHOLNPGM("EEPROM Erase failure for page ",page);
return false;
}
@ -411,7 +411,7 @@ static bool ee_PageErase(uint16_t page) {
for (i = 0; i < PageSize >> 2; i++) {
if (*aligned_src++ != 0xFFFFFFFF) {
DEBUG_ECHO_START();
DEBUG_ECHOLNPAIR("EEPROM Verify Erase failure for page ",page);
DEBUG_ECHOLNPGM("EEPROM Verify Erase failure for page ",page);
ee_Dump(page, (uint32_t *)addrflash);
return false;
}
@ -922,7 +922,7 @@ static void ee_Init() {
if (curGroup >= GroupCount) curGroup = 0;
DEBUG_ECHO_START();
DEBUG_ECHOLNPAIR("EEPROM Current Group: ",curGroup);
DEBUG_ECHOLNPGM("EEPROM Current Group: ",curGroup);
DEBUG_FLUSH();
// Now, validate that all the other group pages are empty
@ -932,7 +932,7 @@ static void ee_Init() {
for (int page = 0; page < PagesPerGroup; page++) {
if (!ee_IsPageClean(grp * PagesPerGroup + page)) {
DEBUG_ECHO_START();
DEBUG_ECHOLNPAIR("EEPROM Page ", page, " not clean on group ", grp);
DEBUG_ECHOLNPGM("EEPROM Page ", page, " not clean on group ", grp);
DEBUG_FLUSH();
ee_PageErase(grp * PagesPerGroup + page);
}
@ -949,14 +949,14 @@ static void ee_Init() {
}
DEBUG_ECHO_START();
DEBUG_ECHOLNPAIR("EEPROM Active page: ", curPage);
DEBUG_ECHOLNPGM("EEPROM Active page: ", curPage);
DEBUG_FLUSH();
// Make sure the pages following the first clean one are also clean
for (int page = curPage + 1; page < PagesPerGroup; page++) {
if (!ee_IsPageClean(curGroup * PagesPerGroup + page)) {
DEBUG_ECHO_START();
DEBUG_ECHOLNPAIR("EEPROM Page ", page, " not clean on active group ", curGroup);
DEBUG_ECHOLNPGM("EEPROM Page ", page, " not clean on active group ", curGroup);
DEBUG_FLUSH();
ee_Dump(curGroup * PagesPerGroup + page, getFlashStorage(curGroup * PagesPerGroup + page));
ee_PageErase(curGroup * PagesPerGroup + page);

2
Marlin/src/HAL/DUE/pinsDebug.h

@ -87,7 +87,7 @@ bool GET_PINMODE(int8_t pin) { // 1: output, 0: input
void pwm_details(int32_t pin) {
if (pwm_status(pin)) {
uint32_t chan = g_APinDescription[pin].ulPWMChannel;
SERIAL_ECHOPAIR("PWM = ", PWM_INTERFACE->PWM_CH_NUM[chan].PWM_CDTY);
SERIAL_ECHOPGM("PWM = ", PWM_INTERFACE->PWM_CH_NUM[chan].PWM_CDTY);
}
}

2
Marlin/src/HAL/ESP32/wifi.cpp

@ -59,7 +59,7 @@ void wifi_init() {
MDNS.addService("http", "tcp", 80);
SERIAL_ECHOLNPAIR("Successfully connected to WiFi with SSID '" WIFI_SSID "', hostname: '" WIFI_HOSTNAME "', IP address: ", WiFi.localIP().toString().c_str());
SERIAL_ECHOLNPGM("Successfully connected to WiFi with SSID '" WIFI_SSID "', hostname: '" WIFI_HOSTNAME "', IP address: ", WiFi.localIP().toString().c_str());
}
#endif // WIFISUPPORT

8
Marlin/src/HAL/LPC1768/eeprom_sdcard.cpp

@ -84,15 +84,15 @@ static void debug_rw(const bool write, int &pos, const uint8_t *value, const siz
PGM_P const rw_str = write ? PSTR("write") : PSTR("read");
SERIAL_CHAR(' ');
SERIAL_ECHOPGM_P(rw_str);
SERIAL_ECHOLNPAIR("_data(", pos, ",", value, ",", size, ", ...)");
SERIAL_ECHOLNPGM("_data(", pos, ",", value, ",", size, ", ...)");
if (total) {
SERIAL_ECHOPGM(" f_");
SERIAL_ECHOPGM_P(rw_str);
SERIAL_ECHOPAIR("()=", s, "\n size=", size, "\n bytes_");
SERIAL_ECHOLNPAIR_P(write ? PSTR("written=") : PSTR("read="), total);
SERIAL_ECHOPGM("()=", s, "\n size=", size, "\n bytes_");
SERIAL_ECHOLNPGM_P(write ? PSTR("written=") : PSTR("read="), total);
}
else
SERIAL_ECHOLNPAIR(" f_lseek()=", s);
SERIAL_ECHOLNPGM(" f_lseek()=", s);
}
// File function return codes for type FRESULT. This goes away soon, but

2
Marlin/src/HAL/SAMD51/pinsDebug.h

@ -48,7 +48,7 @@ bool GET_PINMODE(int8_t pin) { // 1: output, 0: input
void pwm_details(int32_t pin) {
if (pwm_status(pin)) {
//uint32_t chan = g_APinDescription[pin].ulPWMChannel TODO when fast pwm is operative;
//SERIAL_ECHOPAIR("PWM = ", duty);
//SERIAL_ECHOPGM("PWM = ", duty);
}
}

16
Marlin/src/HAL/STM32/eeprom_flash.cpp

@ -133,7 +133,7 @@ bool PersistentStore::access_start() {
// load current settings
uint8_t *eeprom_data = (uint8_t *)SLOT_ADDRESS(current_slot);
for (int i = 0; i < MARLIN_EEPROM_SIZE; i++) ram_eeprom[i] = eeprom_data[i];
DEBUG_ECHOLNPAIR("EEPROM loaded from slot ", current_slot, ".");
DEBUG_ECHOLNPGM("EEPROM loaded from slot ", current_slot, ".");
}
eeprom_data_written = false;
}
@ -179,9 +179,9 @@ bool PersistentStore::access_finish() {
ENABLE_ISRS();
TERN_(HAS_PAUSE_SERVO_OUTPUT, RESUME_SERVO_OUTPUT());
if (status != HAL_OK) {
DEBUG_ECHOLNPAIR("HAL_FLASHEx_Erase=", status);
DEBUG_ECHOLNPAIR("GetError=", HAL_FLASH_GetError());
DEBUG_ECHOLNPAIR("SectorError=", SectorError);
DEBUG_ECHOLNPGM("HAL_FLASHEx_Erase=", status);
DEBUG_ECHOLNPGM("GetError=", HAL_FLASH_GetError());
DEBUG_ECHOLNPGM("SectorError=", SectorError);
LOCK_FLASH();
return false;
}
@ -204,9 +204,9 @@ bool PersistentStore::access_finish() {
offset += sizeof(uint32_t);
}
else {
DEBUG_ECHOLNPAIR("HAL_FLASH_Program=", status);
DEBUG_ECHOLNPAIR("GetError=", HAL_FLASH_GetError());
DEBUG_ECHOLNPAIR("address=", address);
DEBUG_ECHOLNPGM("HAL_FLASH_Program=", status);
DEBUG_ECHOLNPGM("GetError=", HAL_FLASH_GetError());
DEBUG_ECHOLNPGM("address=", address);
success = false;
break;
}
@ -216,7 +216,7 @@ bool PersistentStore::access_finish() {
if (success) {
eeprom_data_written = false;
DEBUG_ECHOLNPAIR("EEPROM saved to slot ", current_slot, ".");
DEBUG_ECHOLNPGM("EEPROM saved to slot ", current_slot, ".");
}
return success;

2
Marlin/src/HAL/STM32/pinsDebug.h

@ -237,7 +237,7 @@ void pwm_details(const pin_t Ard_num) {
if (over_7) pin_number -= 8;
uint8_t alt_func = (alt_all >> (4 * pin_number)) & 0x0F;
SERIAL_ECHOPAIR("Alt Function: ", alt_func);
SERIAL_ECHOPGM("Alt Function: ", alt_func);
if (alt_func < 10) SERIAL_CHAR(' ');
SERIAL_ECHOPGM(" - ");
switch (alt_func) {

6
Marlin/src/HAL/STM32/usb_host.cpp

@ -88,9 +88,9 @@ void USBHost::setUsbTaskState(uint8_t state) {
capacity = info.capacity.block_nbr / 2000;
block_size = info.capacity.block_size;
block_count = info.capacity.block_nbr;
// SERIAL_ECHOLNPAIR("info.capacity.block_nbr : %ld\n", info.capacity.block_nbr);
// SERIAL_ECHOLNPAIR("info.capacity.block_size: %d\n", info.capacity.block_size);
// SERIAL_ECHOLNPAIR("capacity : %d MB\n", capacity);
//SERIAL_ECHOLNPGM("info.capacity.block_nbr : %ld\n", info.capacity.block_nbr);
//SERIAL_ECHOLNPGM("info.capacity.block_size: %d\n", info.capacity.block_size);
//SERIAL_ECHOLNPGM("capacity : %d MB\n", capacity);
}
};

6
Marlin/src/HAL/shared/Delay.cpp

@ -110,16 +110,16 @@
auto report_call_time = [](PGM_P const name, PGM_P const unit, const uint32_t cycles, const uint32_t total, const bool do_flush=true) {
SERIAL_ECHOPGM("Calling ");
SERIAL_ECHOPGM_P(name);
SERIAL_ECHOLNPAIR(" for ", cycles);
SERIAL_ECHOLNPGM(" for ", cycles);
SERIAL_ECHOPGM_P(unit);
SERIAL_ECHOLNPAIR(" took: ", total);
SERIAL_ECHOLNPGM(" took: ", total);
SERIAL_ECHOPGM_P(unit);
if (do_flush) SERIAL_FLUSHTX();
};
uint32_t s, e;
SERIAL_ECHOLNPAIR("Computed delay calibration value: ", ASM_CYCLES_PER_ITERATION);
SERIAL_ECHOLNPGM("Computed delay calibration value: ", ASM_CYCLES_PER_ITERATION);
SERIAL_FLUSH();
// Display the results of the calibration above
constexpr uint32_t testValues[] = { 1, 5, 10, 20, 50, 100, 150, 200, 350, 500, 750, 1000 };

4
Marlin/src/MarlinCore.cpp

@ -798,7 +798,7 @@ inline void manage_inactivity(const bool no_stepper_sleep=false) {
void idle(bool no_stepper_sleep/*=false*/) {
#if ENABLED(MARLIN_DEV_MODE)
static uint16_t idle_depth = 0;
if (++idle_depth > 5) SERIAL_ECHOLNPAIR("idle() call depth: ", idle_depth);
if (++idle_depth > 5) SERIAL_ECHOLNPGM("idle() call depth: ", idle_depth);
#endif
// Core Marlin activities
@ -1623,7 +1623,7 @@ void setup() {
#if BOTH(HAS_WIRED_LCD, SHOW_BOOTSCREEN)
const millis_t elapsed = millis() - bootscreen_ms;
#if ENABLED(MARLIN_DEV_MODE)
SERIAL_ECHOLNPAIR("elapsed=", elapsed);
SERIAL_ECHOLNPGM("elapsed=", elapsed);
#endif
SETUP_RUN(ui.bootscreen_completion(elapsed));
#endif

12
Marlin/src/core/bug_on.h

@ -20,19 +20,19 @@
*/
#pragma once
// We need SERIAL_ECHOPAIR and macros.h
// We need SERIAL_ECHOPGM and macros.h
#include "serial.h"
#if ENABLED(POSTMORTEM_DEBUGGING)
// Useful macro for stopping the CPU on an unexpected condition
// This is used like SERIAL_ECHOPAIR, that is: a key-value call of the local variables you want
// This is used like SERIAL_ECHOPGM, that is: a key-value call of the local variables you want
// to dump to the serial port before stopping the CPU.
// \/ Don't replace by SERIAL_ECHOPAIR since ONLY_FILENAME cannot be transformed to a PGM string on Arduino and it breaks building
#define BUG_ON(V...) do { SERIAL_ECHO(ONLY_FILENAME); SERIAL_ECHO(__LINE__); SERIAL_ECHOLNPGM(": "); SERIAL_ECHOLNPAIR(V); SERIAL_FLUSHTX(); *(char*)0 = 42; } while(0)
// \/ Don't replace by SERIAL_ECHOPGM since ONLY_FILENAME cannot be transformed to a PGM string on Arduino and it breaks building
#define BUG_ON(V...) do { SERIAL_ECHO(ONLY_FILENAME); SERIAL_ECHO(__LINE__); SERIAL_ECHOLNPGM(": "); SERIAL_ECHOLNPGM(V); SERIAL_FLUSHTX(); *(char*)0 = 42; } while(0)
#elif ENABLED(MARLIN_DEV_MODE)
// Don't stop the CPU here, but at least dump the bug on the serial port
// \/ Don't replace by SERIAL_ECHOPAIR since ONLY_FILENAME cannot be transformed to a PGM string on Arduino and it breaks building
#define BUG_ON(V...) do { SERIAL_ECHO(ONLY_FILENAME); SERIAL_ECHO(__LINE__); SERIAL_ECHOLNPGM(": BUG!"); SERIAL_ECHOLNPAIR(V); SERIAL_FLUSHTX(); } while(0)
// \/ Don't replace by SERIAL_ECHOPGM since ONLY_FILENAME cannot be transformed to a PGM string on Arduino and it breaks building
#define BUG_ON(V...) do { SERIAL_ECHO(ONLY_FILENAME); SERIAL_ECHO(__LINE__); SERIAL_ECHOLNPGM(": BUG!"); SERIAL_ECHOLNPGM(V); SERIAL_FLUSHTX(); } while(0)
#else
// Release mode, let's ignore the bug
#define BUG_ON(V...) NOOP

22
Marlin/src/core/debug_out.h

@ -27,7 +27,6 @@
//
#undef DEBUG_SECTION
#undef DEBUG_ECHOPGM_P
#undef DEBUG_ECHO_START
#undef DEBUG_ERROR_START
#undef DEBUG_CHAR
@ -37,12 +36,10 @@
#undef DEBUG_ECHOLN
#undef DEBUG_ECHOPGM
#undef DEBUG_ECHOLNPGM
#undef DEBUG_ECHOPAIR
#undef DEBUG_ECHOPAIR_P
#undef DEBUG_ECHOPGM_P
#undef DEBUG_ECHOLNPGM_P
#undef DEBUG_ECHOPAIR_F
#undef DEBUG_ECHOPAIR_F_P
#undef DEBUG_ECHOLNPAIR
#undef DEBUG_ECHOLNPAIR_P
#undef DEBUG_ECHOLNPAIR_F
#undef DEBUG_ECHOLNPAIR_F_P
#undef DEBUG_ECHO_MSG
@ -69,12 +66,12 @@
#define DEBUG_ECHOLN SERIAL_ECHOLN
#define DEBUG_ECHOPGM SERIAL_ECHOPGM
#define DEBUG_ECHOLNPGM SERIAL_ECHOLNPGM
#define DEBUG_ECHOPAIR SERIAL_ECHOPAIR
#define DEBUG_ECHOPAIR_P SERIAL_ECHOPAIR_P
#define DEBUG_ECHOPGM SERIAL_ECHOPGM
#define DEBUG_ECHOPGM_P SERIAL_ECHOPGM_P
#define DEBUG_ECHOPAIR_F SERIAL_ECHOPAIR_F
#define DEBUG_ECHOPAIR_F_P SERIAL_ECHOPAIR_F_P
#define DEBUG_ECHOLNPAIR SERIAL_ECHOLNPAIR
#define DEBUG_ECHOLNPAIR_P SERIAL_ECHOLNPAIR_P
#define DEBUG_ECHOLNPGM SERIAL_ECHOLNPGM
#define DEBUG_ECHOLNPGM_P SERIAL_ECHOLNPGM_P
#define DEBUG_ECHOLNPAIR_F SERIAL_ECHOLNPAIR_F
#define DEBUG_ECHOLNPAIR_F_P SERIAL_ECHOLNPAIR_F_P
#define DEBUG_ECHO_MSG SERIAL_ECHO_MSG
@ -89,7 +86,6 @@
#else
#define DEBUG_SECTION(...) NOOP
#define DEBUG_ECHOPGM_P(P) NOOP
#define DEBUG_ECHO_START() NOOP
#define DEBUG_ERROR_START() NOOP
#define DEBUG_CHAR(...) NOOP
@ -99,12 +95,10 @@
#define DEBUG_ECHOLN(...) NOOP
#define DEBUG_ECHOPGM(...) NOOP
#define DEBUG_ECHOLNPGM(...) NOOP
#define DEBUG_ECHOPAIR(...) NOOP
#define DEBUG_ECHOPAIR_P(...) NOOP
#define DEBUG_ECHOPGM_P(...) NOOP
#define DEBUG_ECHOLNPGM_P(...) NOOP
#define DEBUG_ECHOPAIR_F(...) NOOP
#define DEBUG_ECHOPAIR_F_P(...) NOOP
#define DEBUG_ECHOLNPAIR(...) NOOP
#define DEBUG_ECHOLNPAIR_P(...) NOOP
#define DEBUG_ECHOLNPAIR_F(...) NOOP
#define DEBUG_ECHOLNPAIR_F_P(...) NOOP
#define DEBUG_ECHO_MSG(...) NOOP

2
Marlin/src/core/serial.cpp

@ -96,7 +96,7 @@ void print_bin(uint16_t val) {
void print_pos(LINEAR_AXIS_ARGS(const_float_t), PGM_P const prefix/*=nullptr*/, PGM_P const suffix/*=nullptr*/) {
if (prefix) serialprintPGM(prefix);
SERIAL_ECHOPAIR_P(
SERIAL_ECHOPGM_P(
LIST_N(DOUBLE(LINEAR_AXES), SP_X_STR, x, SP_Y_STR, y, SP_Z_STR, z, SP_I_STR, i, SP_J_STR, j, SP_K_STR, k)
);
if (suffix) serialprintPGM(suffix); else SERIAL_EOL();

36
Marlin/src/core/serial.h

@ -188,44 +188,44 @@ inline void SERIAL_FLUSHTX() { SERIAL_IMPL.flushTX(); }
void serialprintPGM(PGM_P str);
//
// SERIAL_ECHOPAIR... macros are used to output string-value pairs.
// SERIAL_ECHOPGM... macros are used to output string-value pairs.
//
// Print up to 20 pairs of values. Odd elements must be literal strings.
#define __SEP_N(N,V...) _SEP_##N(V)
#define _SEP_N(N,V...) __SEP_N(N,V)
#define _SEP_N_REF() _SEP_N
#define _SEP_1(s) SERIAL_ECHOPGM(s);
#define _SEP_1(s) serialprintPGM(PSTR(s));
#define _SEP_2(s,v) serial_echopair_PGM(PSTR(s),v);
#define _SEP_3(s,v,V...) _SEP_2(s,v); DEFER2(_SEP_N_REF)()(TWO_ARGS(V),V);
#define SERIAL_ECHOPAIR(V...) do{ EVAL(_SEP_N(TWO_ARGS(V),V)); }while(0)
#define SERIAL_ECHOPGM(V...) do{ EVAL(_SEP_N(TWO_ARGS(V),V)); }while(0)
// Print up to 20 pairs of values followed by newline. Odd elements must be literal strings.
#define __SELP_N(N,V...) _SELP_##N(V)
#define _SELP_N(N,V...) __SELP_N(N,V)
#define _SELP_N_REF() _SELP_N
#define _SELP_1(s) SERIAL_ECHOLNPGM(s);
#define _SELP_1(s) serialprintPGM(PSTR(s "\n"));
#define _SELP_2(s,v) serial_echopair_PGM(PSTR(s),v); SERIAL_EOL();
#define _SELP_3(s,v,V...) _SEP_2(s,v); DEFER2(_SELP_N_REF)()(TWO_ARGS(V),V);
#define SERIAL_ECHOLNPAIR(V...) do{ EVAL(_SELP_N(TWO_ARGS(V),V)); }while(0)
#define SERIAL_ECHOLNPGM(V...) do{ EVAL(_SELP_N(TWO_ARGS(V),V)); }while(0)
// Print up to 20 pairs of values. Odd elements must be PSTR pointers.
#define __SEP_N_P(N,V...) _SEP_##N##_P(V)
#define _SEP_N_P(N,V...) __SEP_N_P(N,V)
#define _SEP_N_P_REF() _SEP_N_P
#define _SEP_1_P(s) serialprintPGM(s);
#define _SEP_2_P(s,v) serial_echopair_PGM(s,v);
#define _SEP_3_P(s,v,V...) _SEP_2_P(s,v); DEFER2(_SEP_N_P_REF)()(TWO_ARGS(V),V);
#define SERIAL_ECHOPAIR_P(V...) do{ EVAL(_SEP_N_P(TWO_ARGS(V),V)); }while(0)
#define _SEP_1_P(p) serialprintPGM(p);
#define _SEP_2_P(p,v) serial_echopair_PGM(p,v);
#define _SEP_3_P(p,v,V...) _SEP_2_P(p,v); DEFER2(_SEP_N_P_REF)()(TWO_ARGS(V),V);
#define SERIAL_ECHOPGM_P(V...) do{ EVAL(_SEP_N_P(TWO_ARGS(V),V)); }while(0)
// Print up to 20 pairs of values followed by newline. Odd elements must be PSTR pointers.
#define __SELP_N_P(N,V...) _SELP_##N##_P(V)
#define _SELP_N_P(N,V...) __SELP_N_P(N,V)
#define _SELP_N_P_REF() _SELP_N_P
#define _SELP_1_P(s) { serialprintPGM(s); SERIAL_EOL(); }
#define _SELP_2_P(s,v) { serial_echopair_PGM(s,v); SERIAL_EOL(); }
#define _SELP_3_P(s,v,V...) { _SEP_2_P(s,v); DEFER2(_SELP_N_P_REF)()(TWO_ARGS(V),V); }
#define SERIAL_ECHOLNPAIR_P(V...) do{ EVAL(_SELP_N_P(TWO_ARGS(V),V)); }while(0)
#define _SELP_1_P(p) { serialprintPGM(p); SERIAL_EOL(); }
#define _SELP_2_P(p,v) { serial_echopair_PGM(p,v); SERIAL_EOL(); }
#define _SELP_3_P(p,v,V...) { _SEP_2_P(p,v); DEFER2(_SELP_N_P_REF)()(TWO_ARGS(V),V); }
#define SERIAL_ECHOLNPGM_P(V...) do{ EVAL(_SELP_N_P(TWO_ARGS(V),V)); }while(0)
#ifdef AllowDifferentTypeInList
@ -261,12 +261,6 @@ void serialprintPGM(PGM_P str);
#endif
#define SERIAL_ECHOPGM_P(P) (serialprintPGM(P))
#define SERIAL_ECHOLNPGM_P(P) do{ serialprintPGM(P); SERIAL_EOL(); }while(0)
#define SERIAL_ECHOPGM(S) (serialprintPGM(PSTR(S)))
#define SERIAL_ECHOLNPGM(S) (serialprintPGM(PSTR(S "\n")))
#define SERIAL_ECHOPAIR_F_P(P,V...) do{ serialprintPGM(P); SERIAL_ECHO_F(V); }while(0)
#define SERIAL_ECHOLNPAIR_F_P(V...) do{ SERIAL_ECHOPAIR_F_P(V); SERIAL_EOL(); }while(0)
@ -277,8 +271,8 @@ void serialprintPGM(PGM_P str);
#define SERIAL_ERROR_START() serial_error_start()
#define SERIAL_EOL() SERIAL_CHAR('\n')
#define SERIAL_ECHO_MSG(V...) do{ SERIAL_ECHO_START(); SERIAL_ECHOLNPAIR(V); }while(0)
#define SERIAL_ERROR_MSG(V...) do{ SERIAL_ERROR_START(); SERIAL_ECHOLNPAIR(V); }while(0)
#define SERIAL_ECHO_MSG(V...) do{ SERIAL_ECHO_START(); SERIAL_ECHOLNPGM(V); }while(0)
#define SERIAL_ERROR_MSG(V...) do{ SERIAL_ERROR_START(); SERIAL_ECHOLNPGM(V); }while(0)
#define SERIAL_ECHO_SP(C) serial_spaces(C)

12
Marlin/src/core/utility.cpp

@ -79,9 +79,9 @@ void safe_delay(millis_t ms) {
#if HAS_BED_PROBE
#if !HAS_PROBE_XY_OFFSET
SERIAL_ECHOPAIR("Probe Offset X0 Y0 Z", probe.offset.z, " (");
SERIAL_ECHOPGM("Probe Offset X0 Y0 Z", probe.offset.z, " (");
#else
SERIAL_ECHOPAIR_P(PSTR("Probe Offset X"), probe.offset_xy.x, SP_Y_STR, probe.offset_xy.y, SP_Z_STR, probe.offset.z);
SERIAL_ECHOPGM_P(PSTR("Probe Offset X"), probe.offset_xy.x, SP_Y_STR, probe.offset_xy.y, SP_Z_STR, probe.offset.z);
if (probe.offset_xy.x > 0)
SERIAL_ECHOPGM(" (Right");
else if (probe.offset_xy.x < 0)
@ -119,7 +119,7 @@ void safe_delay(millis_t ms) {
SERIAL_ECHOLNPGM(" (enabled)");
#if ENABLED(ENABLE_LEVELING_FADE_HEIGHT)
if (planner.z_fade_height)
SERIAL_ECHOLNPAIR("Z Fade: ", planner.z_fade_height);
SERIAL_ECHOLNPGM("Z Fade: ", planner.z_fade_height);
#endif
#if ABL_PLANAR
SERIAL_ECHOPGM("ABL Adjustment");
@ -140,7 +140,7 @@ void safe_delay(millis_t ms) {
SERIAL_ECHO(ftostr43sign(rz, '+'));
#if ENABLED(ENABLE_LEVELING_FADE_HEIGHT)
if (planner.z_fade_height) {
SERIAL_ECHOPAIR(" (", ftostr43sign(rz * planner.fade_scaling_factor_for_z(current_position.z), '+'));
SERIAL_ECHOPGM(" (", ftostr43sign(rz * planner.fade_scaling_factor_for_z(current_position.z), '+'));
SERIAL_CHAR(')');
}
#endif
@ -156,10 +156,10 @@ void safe_delay(millis_t ms) {
SERIAL_ECHOPGM("Mesh Bed Leveling");
if (planner.leveling_active) {
SERIAL_ECHOLNPGM(" (enabled)");
SERIAL_ECHOPAIR("MBL Adjustment Z", ftostr43sign(mbl.get_z(current_position), '+'));
SERIAL_ECHOPGM("MBL Adjustment Z", ftostr43sign(mbl.get_z(current_position), '+'));
#if ENABLED(ENABLE_LEVELING_FADE_HEIGHT)
if (planner.z_fade_height) {
SERIAL_ECHOPAIR(" (", ftostr43sign(
SERIAL_ECHOPGM(" (", ftostr43sign(
mbl.get_z(current_position, planner.fade_scaling_factor_for_z(current_position.z)), '+'
));
SERIAL_CHAR(')');

4
Marlin/src/feature/backlash.cpp

@ -134,12 +134,12 @@ void Backlash::add_correction_steps(const int32_t &da, const int32_t &db, const
switch (axis) {
case CORE_AXIS_1:
//block->steps[CORE_AXIS_2] += influence_distance_mm[axis] * planner.settings.axis_steps_per_mm[CORE_AXIS_2];
//SERIAL_ECHOLNPAIR("CORE_AXIS_1 dir change. distance=", distance_mm[axis], " r.err=", residual_error[axis],
//SERIAL_ECHOLNPGM("CORE_AXIS_1 dir change. distance=", distance_mm[axis], " r.err=", residual_error[axis],
// " da=", da, " db=", db, " block->steps[axis]=", block->steps[axis], " err_corr=", error_correction);
break;
case CORE_AXIS_2:
//block->steps[CORE_AXIS_1] += influence_distance_mm[axis] * planner.settings.axis_steps_per_mm[CORE_AXIS_1];;
//SERIAL_ECHOLNPAIR("CORE_AXIS_2 dir change. distance=", distance_mm[axis], " r.err=", residual_error[axis],
//SERIAL_ECHOLNPGM("CORE_AXIS_2 dir change. distance=", distance_mm[axis], " r.err=", residual_error[axis],
// " da=", da, " db=", db, " block->steps[axis]=", block->steps[axis], " err_corr=", error_correction);
break;
case NORMAL_AXIS: break;

10
Marlin/src/feature/bedlevel/abl/abl.cpp

@ -336,11 +336,11 @@ float bilinear_z_offset(const xy_pos_t &raw) {
/*
static float last_offset = 0;
if (ABS(last_offset - offset) > 0.2) {
SERIAL_ECHOLNPAIR("Sudden Shift at x=", rel.x, " / ", bilinear_grid_spacing.x, " -> thisg.x=", thisg.x);
SERIAL_ECHOLNPAIR(" y=", rel.y, " / ", bilinear_grid_spacing.y, " -> thisg.y=", thisg.y);
SERIAL_ECHOLNPAIR(" ratio.x=", ratio.x, " ratio.y=", ratio.y);
SERIAL_ECHOLNPAIR(" z1=", z1, " z2=", z2, " z3=", z3, " z4=", z4);
SERIAL_ECHOLNPAIR(" L=", L, " R=", R, " offset=", offset);
SERIAL_ECHOLNPGM("Sudden Shift at x=", rel.x, " / ", bilinear_grid_spacing.x, " -> thisg.x=", thisg.x);
SERIAL_ECHOLNPGM(" y=", rel.y, " / ", bilinear_grid_spacing.y, " -> thisg.y=", thisg.y);
SERIAL_ECHOLNPGM(" ratio.x=", ratio.x, " ratio.y=", ratio.y);
SERIAL_ECHOLNPGM(" z1=", z1, " z2=", z2, " z3=", z3, " z4=", z4);
SERIAL_ECHOLNPGM(" L=", L, " R=", R, " offset=", offset);
}
last_offset = offset;
//*/

2
Marlin/src/feature/bedlevel/ubl/ubl.cpp

@ -51,7 +51,7 @@ void unified_bed_leveling::report_current_mesh() {
GRID_LOOP(x, y)
if (!isnan(z_values[x][y])) {
SERIAL_ECHO_START();
SERIAL_ECHOPAIR(" M421 I", x, " J", y);
SERIAL_ECHOPGM(" M421 I", x, " J", y);
SERIAL_ECHOLNPAIR_F_P(SP_Z_STR, z_values[x][y], 4);
serial_delay(75); // Prevent Printrun from exploding
}

8
Marlin/src/feature/bedlevel/ubl/ubl.h

@ -208,7 +208,7 @@ public:
if (DEBUGGING(LEVELING)) {
if (WITHIN(x1_i, 0, (GRID_MAX_POINTS_X) - 1)) DEBUG_ECHOPGM("yi"); else DEBUG_ECHOPGM("x1_i");
DEBUG_ECHOLNPAIR(" out of bounds in z_correction_for_x_on_horizontal_mesh_line(rx0=", rx0, ",x1_i=", x1_i, ",yi=", yi, ")");
DEBUG_ECHOLNPGM(" out of bounds in z_correction_for_x_on_horizontal_mesh_line(rx0=", rx0, ",x1_i=", x1_i, ",yi=", yi, ")");
}
// The requested location is off the mesh. Return UBL_Z_RAISE_WHEN_OFF_MESH or NAN.
@ -231,7 +231,7 @@ public:
if (DEBUGGING(LEVELING)) {
if (WITHIN(xi, 0, (GRID_MAX_POINTS_X) - 1)) DEBUG_ECHOPGM("y1_i"); else DEBUG_ECHOPGM("xi");
DEBUG_ECHOLNPAIR(" out of bounds in z_correction_for_y_on_vertical_mesh_line(ry0=", ry0, ", xi=", xi, ", y1_i=", y1_i, ")");
DEBUG_ECHOLNPGM(" out of bounds in z_correction_for_y_on_vertical_mesh_line(ry0=", ry0, ", xi=", xi, ", y1_i=", y1_i, ")");
}
// The requested location is off the mesh. Return UBL_Z_RAISE_WHEN_OFF_MESH or NAN.
@ -275,11 +275,11 @@ public:
// because part of the Mesh is undefined and we don't have the
// information we need to complete the height correction.
if (DEBUGGING(MESH_ADJUST)) DEBUG_ECHOLNPAIR("??? Yikes! NAN in ");
if (DEBUGGING(MESH_ADJUST)) DEBUG_ECHOLNPGM("??? Yikes! NAN in ");
}
if (DEBUGGING(MESH_ADJUST)) {
DEBUG_ECHOPAIR("get_z_correction(", rx0, ", ", ry0);
DEBUG_ECHOPGM("get_z_correction(", rx0, ", ", ry0);
DEBUG_ECHOLNPAIR_F(") => ", z0, 6);
}

60
Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp

@ -428,7 +428,7 @@ void unified_bed_leveling::G29() {
SERIAL_ECHOLNPGM("Mesh invalidated. Probing mesh.");
}
if (param.V_verbosity > 1) {
SERIAL_ECHOPAIR("Probing around (", param.XY_pos.x);
SERIAL_ECHOPGM("Probing around (", param.XY_pos.x);
SERIAL_CHAR(',');
SERIAL_DECIMAL(param.XY_pos.y);
SERIAL_ECHOLNPGM(").\n");
@ -602,7 +602,7 @@ void unified_bed_leveling::G29() {
}
if (!WITHIN(param.KLS_storage_slot, 0, a - 1)) {
SERIAL_ECHOLNPAIR("?Invalid storage slot.\n?Use 0 to ", a - 1);
SERIAL_ECHOLNPGM("?Invalid storage slot.\n?Use 0 to ", a - 1);
return;
}
@ -630,7 +630,7 @@ void unified_bed_leveling::G29() {
}
if (!WITHIN(param.KLS_storage_slot, 0, a - 1)) {
SERIAL_ECHOLNPAIR("?Invalid storage slot.\n?Use 0 to ", a - 1);
SERIAL_ECHOLNPGM("?Invalid storage slot.\n?Use 0 to ", a - 1);
goto LEAVE;
}
@ -653,7 +653,7 @@ void unified_bed_leveling::G29() {
#endif
#ifdef Z_PROBE_END_SCRIPT
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("Z Probe End Script: ", Z_PROBE_END_SCRIPT);
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Z Probe End Script: ", Z_PROBE_END_SCRIPT);
if (probe_deployed) {
planner.synchronize();
gcode.process_subcommands_now_P(PSTR(Z_PROBE_END_SCRIPT));
@ -690,7 +690,7 @@ void unified_bed_leveling::adjust_mesh_to_mean(const bool cflag, const_float_t o
if (!isnan(z_values[x][y]))
sum_of_diff_squared += sq(z_values[x][y] - mean);
SERIAL_ECHOLNPAIR("# of samples: ", n);
SERIAL_ECHOLNPGM("# of samples: ", n);
SERIAL_ECHOLNPAIR_F("Mean Mesh Height: ", mean, 6);
const float sigma = SQRT(sum_of_diff_squared / (n + 1));
@ -735,7 +735,7 @@ void unified_bed_leveling::shift_mesh_height() {
if (do_ubl_mesh_map) display_map(param.T_map_type);
const uint8_t point_num = (GRID_MAX_POINTS - count) + 1;
SERIAL_ECHOLNPAIR("Probing mesh point ", point_num, "/", GRID_MAX_POINTS, ".");
SERIAL_ECHOLNPGM("Probing mesh point ", point_num, "/", GRID_MAX_POINTS, ".");
TERN_(HAS_STATUS_MESSAGE, ui.status_printf_P(0, PSTR(S_FMT " %i/%i"), GET_TEXT(MSG_PROBING_POINT), point_num, int(GRID_MAX_POINTS)));
#if HAS_LCD_MENU
@ -1450,7 +1450,7 @@ void unified_bed_leveling::smart_fill_mesh() {
#endif
if (param.V_verbosity > 3) {
serial_spaces(16);
SERIAL_ECHOLNPAIR("Corrected_Z=", measured_z);
SERIAL_ECHOLNPGM("Corrected_Z=", measured_z);
}
incremental_LSF(&lsf_results, points[0], measured_z);
}
@ -1469,7 +1469,7 @@ void unified_bed_leveling::smart_fill_mesh() {
measured_z -= get_z_correction(points[1]);
if (param.V_verbosity > 3) {
serial_spaces(16);
SERIAL_ECHOLNPAIR("Corrected_Z=", measured_z);
SERIAL_ECHOLNPGM("Corrected_Z=", measured_z);
}
incremental_LSF(&lsf_results, points[1], measured_z);
}
@ -1489,7 +1489,7 @@ void unified_bed_leveling::smart_fill_mesh() {
measured_z -= get_z_correction(points[2]);
if (param.V_verbosity > 3) {
serial_spaces(16);
SERIAL_ECHOLNPAIR("Corrected_Z=", measured_z);
SERIAL_ECHOLNPGM("Corrected_Z=", measured_z);
}
incremental_LSF(&lsf_results, points[2], measured_z);
}
@ -1517,7 +1517,7 @@ void unified_bed_leveling::smart_fill_mesh() {
rpos.y = y_min + dy * (zig_zag ? param.J_grid_size - 1 - iy : iy);
if (!abort_flag) {
SERIAL_ECHOLNPAIR("Tilting mesh point ", point_num, "/", total_points, "\n");
SERIAL_ECHOLNPGM("Tilting mesh point ", point_num, "/", total_points, "\n");
TERN_(HAS_STATUS_MESSAGE, ui.status_printf_P(0, PSTR(S_FMT " %i/%i"), GET_TEXT(MSG_LCD_TILTING_MESH), point_num, total_points));
measured_z = probe.probe_at_point(rpos, parser.seen_test('E') ? PROBE_PT_STOW : PROBE_PT_RAISE, param.V_verbosity); // TODO: Needs error handling
@ -1545,7 +1545,7 @@ void unified_bed_leveling::smart_fill_mesh() {
if (param.V_verbosity > 3) {
serial_spaces(16);
SERIAL_ECHOLNPAIR("Corrected_Z=", measured_z);
SERIAL_ECHOLNPGM("Corrected_Z=", measured_z);
}
incremental_LSF(&lsf_results, rpos, measured_z);
}
@ -1648,7 +1648,7 @@ void unified_bed_leveling::smart_fill_mesh() {
DEBUG_ECHOLNPAIR_F("0 : ", normed(safe_homing_xy, 0), 6);
d_from(); DEBUG_ECHOPGM("safe home with Z=");
DEBUG_ECHOLNPAIR_F("mesh value ", normed(safe_homing_xy, get_z_correction(safe_homing_xy)), 6);
DEBUG_ECHOPAIR(" Z error = (", Z_SAFE_HOMING_X_POINT, ",", Z_SAFE_HOMING_Y_POINT);
DEBUG_ECHOPGM(" Z error = (", Z_SAFE_HOMING_X_POINT, ",", Z_SAFE_HOMING_Y_POINT);
DEBUG_ECHOLNPAIR_F(") = ", get_z_correction(safe_homing_xy), 6);
#endif
} // DEBUGGING(LEVELING)
@ -1722,7 +1722,7 @@ void unified_bed_leveling::smart_fill_mesh() {
if (storage_slot == -1)
SERIAL_ECHOPGM("No Mesh Loaded.");
else
SERIAL_ECHOPAIR("Mesh ", storage_slot, " Loaded.");
SERIAL_ECHOPGM("Mesh ", storage_slot, " Loaded.");
SERIAL_EOL();
serial_delay(50);
@ -1736,14 +1736,14 @@ void unified_bed_leveling::smart_fill_mesh() {
SERIAL_ECHOLNPAIR_F("Probe Offset M851 Z", probe.offset.z, 7);
#endif
SERIAL_ECHOLNPAIR("MESH_MIN_X " STRINGIFY(MESH_MIN_X) "=", MESH_MIN_X); serial_delay(50);
SERIAL_ECHOLNPAIR("MESH_MIN_Y " STRINGIFY(MESH_MIN_Y) "=", MESH_MIN_Y); serial_delay(50);
SERIAL_ECHOLNPAIR("MESH_MAX_X " STRINGIFY(MESH_MAX_X) "=", MESH_MAX_X); serial_delay(50);
SERIAL_ECHOLNPAIR("MESH_MAX_Y " STRINGIFY(MESH_MAX_Y) "=", MESH_MAX_Y); serial_delay(50);
SERIAL_ECHOLNPAIR("GRID_MAX_POINTS_X ", GRID_MAX_POINTS_X); serial_delay(50);
SERIAL_ECHOLNPAIR("GRID_MAX_POINTS_Y ", GRID_MAX_POINTS_Y); serial_delay(50);
SERIAL_ECHOLNPAIR("MESH_X_DIST ", MESH_X_DIST);
SERIAL_ECHOLNPAIR("MESH_Y_DIST ", MESH_Y_DIST); serial_delay(50);
SERIAL_ECHOLNPGM("MESH_MIN_X " STRINGIFY(MESH_MIN_X) "=", MESH_MIN_X); serial_delay(50);
SERIAL_ECHOLNPGM("MESH_MIN_Y " STRINGIFY(MESH_MIN_Y) "=", MESH_MIN_Y); serial_delay(50);
SERIAL_ECHOLNPGM("MESH_MAX_X " STRINGIFY(MESH_MAX_X) "=", MESH_MAX_X); serial_delay(50);
SERIAL_ECHOLNPGM("MESH_MAX_Y " STRINGIFY(MESH_MAX_Y) "=", MESH_MAX_Y); serial_delay(50);
SERIAL_ECHOLNPGM("GRID_MAX_POINTS_X ", GRID_MAX_POINTS_X); serial_delay(50);
SERIAL_ECHOLNPGM("GRID_MAX_POINTS_Y ", GRID_MAX_POINTS_Y); serial_delay(50);
SERIAL_ECHOLNPGM("MESH_X_DIST ", MESH_X_DIST);
SERIAL_ECHOLNPGM("MESH_Y_DIST ", MESH_Y_DIST); serial_delay(50);
SERIAL_ECHOPGM("X-Axis Mesh Points at: ");
LOOP_L_N(i, GRID_MAX_POINTS_X) {
@ -1762,27 +1762,27 @@ void unified_bed_leveling::smart_fill_mesh() {
SERIAL_EOL();
#if HAS_KILL
SERIAL_ECHOLNPAIR("Kill pin on :", KILL_PIN, " state:", kill_state());
SERIAL_ECHOLNPGM("Kill pin on :", KILL_PIN, " state:", kill_state());
#endif
SERIAL_EOL();
serial_delay(50);
#if ENABLED(UBL_DEVEL_DEBUGGING)
SERIAL_ECHOLNPAIR("ubl_state_at_invocation :", ubl_state_at_invocation, "\nubl_state_recursion_chk :", ubl_state_recursion_chk);
SERIAL_ECHOLNPGM("ubl_state_at_invocation :", ubl_state_at_invocation, "\nubl_state_recursion_chk :", ubl_state_recursion_chk);
serial_delay(50);
SERIAL_ECHOLNPAIR("Meshes go from ", hex_address((void*)settings.meshes_start_index()), " to ", hex_address((void*)settings.meshes_end_index()));
SERIAL_ECHOLNPGM("Meshes go from ", hex_address((void*)settings.meshes_start_index()), " to ", hex_address((void*)settings.meshes_end_index()));
serial_delay(50);
SERIAL_ECHOLNPAIR("sizeof(ubl) : ", sizeof(ubl)); SERIAL_EOL();
SERIAL_ECHOLNPAIR("z_value[][] size: ", sizeof(z_values)); SERIAL_EOL();
SERIAL_ECHOLNPGM("sizeof(ubl) : ", sizeof(ubl)); SERIAL_EOL();
SERIAL_ECHOLNPGM("z_value[][] size: ", sizeof(z_values)); SERIAL_EOL();
serial_delay(25);
SERIAL_ECHOLNPAIR("EEPROM free for UBL: ", hex_address((void*)(settings.meshes_end_index() - settings.meshes_start_index())));
SERIAL_ECHOLNPGM("EEPROM free for UBL: ", hex_address((void*)(settings.meshes_end_index() - settings.meshes_start_index())));
serial_delay(50);
SERIAL_ECHOLNPAIR("EEPROM can hold ", settings.calc_num_meshes(), " meshes.\n");
SERIAL_ECHOLNPGM("EEPROM can hold ", settings.calc_num_meshes(), " meshes.\n");
serial_delay(25);
#endif // UBL_DEVEL_DEBUGGING
@ -1829,7 +1829,7 @@ void unified_bed_leveling::smart_fill_mesh() {
}
if (!parser.has_value() || !WITHIN(parser.value_int(), 0, a - 1)) {
SERIAL_ECHOLNPAIR("?Invalid storage slot.\n?Use 0 to ", a - 1);
SERIAL_ECHOLNPGM("?Invalid storage slot.\n?Use 0 to ", a - 1);
return;
}
@ -1838,7 +1838,7 @@ void unified_bed_leveling::smart_fill_mesh() {
float tmp_z_values[GRID_MAX_POINTS_X][GRID_MAX_POINTS_Y];
settings.load_mesh(param.KLS_storage_slot, &tmp_z_values);
SERIAL_ECHOLNPAIR("Subtracting mesh in slot ", param.KLS_storage_slot, " from current mesh.");
SERIAL_ECHOLNPGM("Subtracting mesh in slot ", param.KLS_storage_slot, " from current mesh.");
GRID_LOOP(x, y) {
z_values[x][y] -= tmp_z_values[x][y];

14
Marlin/src/feature/binary_stream.h

@ -146,9 +146,9 @@ public:
transfer_timeout = millis() + TIMEOUT;
switch (static_cast<FileTransfer>(packet_type)) {
case FileTransfer::QUERY:
SERIAL_ECHOPAIR("PFT:version:", VERSION_MAJOR, ".", VERSION_MINOR, ".", VERSION_PATCH);
SERIAL_ECHOPGM("PFT:version:", VERSION_MAJOR, ".", VERSION_MINOR, ".", VERSION_PATCH);
#if ENABLED(BINARY_STREAM_COMPRESSION)
SERIAL_ECHOLNPAIR(":compression:heatshrink,", HEATSHRINK_STATIC_WINDOW_BITS, ",", HEATSHRINK_STATIC_LOOKAHEAD_BITS);
SERIAL_ECHOLNPGM(":compression:heatshrink,", HEATSHRINK_STATIC_WINDOW_BITS, ",", HEATSHRINK_STATIC_LOOKAHEAD_BITS);
#else
SERIAL_ECHOLNPGM(":compression:none");
#endif
@ -322,7 +322,7 @@ public:
if (packet.header.checksum == packet.header_checksum) {
// The SYNC control packet is a special case in that it doesn't require the stream sync to be correct
if (static_cast<Protocol>(packet.header.protocol()) == Protocol::CONTROL && static_cast<ProtocolControl>(packet.header.type()) == ProtocolControl::SYNC) {
SERIAL_ECHOLNPAIR("ss", sync, ",", buffer_size, ",", VERSION_MAJOR, ".", VERSION_MINOR, ".", VERSION_PATCH);
SERIAL_ECHOLNPGM("ss", sync, ",", buffer_size, ",", VERSION_MAJOR, ".", VERSION_MINOR, ".", VERSION_PATCH);
stream_state = StreamState::PACKET_RESET;
break;
}
@ -337,7 +337,7 @@ public:
stream_state = StreamState::PACKET_PROCESS;
}
else if (packet.header.sync == sync - 1) { // ok response must have been lost
SERIAL_ECHOLNPAIR("ok", packet.header.sync); // transmit valid packet received and drop the payload
SERIAL_ECHOLNPGM("ok", packet.header.sync); // transmit valid packet received and drop the payload
stream_state = StreamState::PACKET_RESET;
}
else if (packet_retries) {
@ -393,7 +393,7 @@ public:
packet_retries = 0;
bytes_received += packet.header.size;
SERIAL_ECHOLNPAIR("ok", packet.header.sync); // transmit valid packet received
SERIAL_ECHOLNPGM("ok", packet.header.sync); // transmit valid packet received
dispatch();
stream_state = StreamState::PACKET_RESET;
break;
@ -402,7 +402,7 @@ public:
packet_retries++;
stream_state = StreamState::PACKET_RESET;
SERIAL_ECHO_MSG("Resend request ", packet_retries);
SERIAL_ECHOLNPAIR("rs", sync);
SERIAL_ECHOLNPGM("rs", sync);
}
else
stream_state = StreamState::PACKET_ERROR;
@ -412,7 +412,7 @@ public:
stream_state = StreamState::PACKET_RESEND;
break;
case StreamState::PACKET_ERROR:
SERIAL_ECHOLNPAIR("fe", packet.header.sync);
SERIAL_ECHOLNPGM("fe", packet.header.sync);
reset(); // reset everything, resync required
stream_state = StreamState::PACKET_RESET;
break;

8
Marlin/src/feature/bltouch.cpp

@ -39,7 +39,7 @@ void stop();
#include "../core/debug_out.h"
bool BLTouch::command(const BLTCommand cmd, const millis_t &ms) {
if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPAIR("BLTouch Command :", cmd);
if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("BLTouch Command :", cmd);
MOVE_SERVO(Z_PROBE_SERVO_NR, cmd);
safe_delay(_MAX(ms, (uint32_t)BLTOUCH_DELAY)); // BLTOUCH_DELAY is also the *minimum* delay
return triggered();
@ -64,7 +64,7 @@ void BLTouch::init(const bool set_voltage/*=false*/) {
#else
if (DEBUGGING(LEVELING)) {
DEBUG_ECHOLNPAIR("last_written_mode - ", last_written_mode);
DEBUG_ECHOLNPGM("last_written_mode - ", last_written_mode);
DEBUG_ECHOLNPGM("config mode - "
#if ENABLED(BLTOUCH_SET_5V_MODE)
"BLTOUCH_SET_5V_MODE"
@ -175,7 +175,7 @@ bool BLTouch::status_proc() {
_set_SW_mode(); // Incidentally, _set_SW_mode() will also RESET any active alarm
const bool tr = triggered(); // If triggered in SW mode, the pin is up, it is STOWED
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("BLTouch is ", tr);
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("BLTouch is ", tr);
if (tr) _stow(); else _deploy(); // Turn off SW mode, reset any trigger, honor pin state
return !tr;
@ -187,7 +187,7 @@ void BLTouch::mode_conv_proc(const bool M5V) {
* BLTOUCH V3.0: This will set the mode (twice) and sadly, a STOW is needed at the end, because of the deploy
* BLTOUCH V3.1: This will set the mode and store it in the eeprom. The STOW is not needed but does not hurt
*/
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("BLTouch Set Mode - ", M5V);
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("BLTouch Set Mode - ", M5V);
_deploy();
if (M5V) _set_5V_mode(); else _set_OD_mode();
_mode_store();

8
Marlin/src/feature/dac/stepper_dac.cpp

@ -85,15 +85,15 @@ void StepperDAC::print_values() {
if (!dac_present) return;
SERIAL_ECHO_MSG("Stepper current values in % (Amps):");
SERIAL_ECHO_START();
SERIAL_ECHOPAIR_P(SP_X_LBL, dac_perc(X_AXIS), PSTR(" ("), dac_amps(X_AXIS), PSTR(")"));
SERIAL_ECHOPGM_P(SP_X_LBL, dac_perc(X_AXIS), PSTR(" ("), dac_amps(X_AXIS), PSTR(")"));
#if HAS_Y_AXIS
SERIAL_ECHOPAIR_P(SP_Y_LBL, dac_perc(Y_AXIS), PSTR(" ("), dac_amps(Y_AXIS), PSTR(")"));
SERIAL_ECHOPGM_P(SP_Y_LBL, dac_perc(Y_AXIS), PSTR(" ("), dac_amps(Y_AXIS), PSTR(")"));
#endif
#if HAS_Z_AXIS
SERIAL_ECHOPAIR_P(SP_Z_LBL, dac_perc(Z_AXIS), PSTR(" ("), dac_amps(Z_AXIS), PSTR(")"));
SERIAL_ECHOPGM_P(SP_Z_LBL, dac_perc(Z_AXIS), PSTR(" ("), dac_amps(Z_AXIS), PSTR(")"));
#endif
#if HAS_EXTRUDERS
SERIAL_ECHOLNPAIR_P(SP_E_LBL, dac_perc(E_AXIS), PSTR(" ("), dac_amps(E_AXIS), PSTR(")"));
SERIAL_ECHOLNPGM_P(SP_E_LBL, dac_perc(E_AXIS), PSTR(" ("), dac_amps(E_AXIS), PSTR(")"));
#endif
}

54
Marlin/src/feature/encoder_i2c.cpp

@ -49,7 +49,7 @@ void I2CPositionEncoder::init(const uint8_t address, const AxisEnum axis) {
initialized = true;
SERIAL_ECHOLNPAIR("Setting up encoder on ", AS_CHAR(axis_codes[encoderAxis]), " axis, addr = ", address);
SERIAL_ECHOLNPGM("Setting up encoder on ", AS_CHAR(axis_codes[encoderAxis]), " axis, addr = ", address);
position = get_position();
}
@ -67,7 +67,7 @@ void I2CPositionEncoder::update() {
/*
if (trusted) { //commented out as part of the note below
trusted = false;
SERIAL_ECHOLNPAIR("Fault detected on ", AS_CHAR(axis_codes[encoderAxis]), " axis encoder. Disengaging error correction until module is trusted again.");
SERIAL_ECHOLNPGM("Fault detected on ", AS_CHAR(axis_codes[encoderAxis]), " axis encoder. Disengaging error correction until module is trusted again.");
}
*/
return;
@ -92,7 +92,7 @@ void I2CPositionEncoder::update() {
if (millis() - lastErrorTime > I2CPE_TIME_TRUSTED) {
trusted = true;
SERIAL_ECHOLNPAIR("Untrusted encoder module on ", AS_CHAR(axis_codes[encoderAxis]), " axis has been fault-free for set duration, reinstating error correction.");
SERIAL_ECHOLNPGM("Untrusted encoder module on ", AS_CHAR(axis_codes[encoderAxis]), " axis has been fault-free for set duration, reinstating error correction.");
//the encoder likely lost its place when the error occurred, so we'll reset and use the printer's
//idea of where it the axis is to re-initialize
@ -103,10 +103,10 @@ void I2CPositionEncoder::update() {
zeroOffset -= (positionInTicks - get_position());
#ifdef I2CPE_DEBUG
SERIAL_ECHOLNPAIR("Current position is ", pos);
SERIAL_ECHOLNPAIR("Position in encoder ticks is ", positionInTicks);
SERIAL_ECHOLNPAIR("New zero-offset of ", zeroOffset);
SERIAL_ECHOPAIR("New position reads as ", get_position());
SERIAL_ECHOLNPGM("Current position is ", pos);
SERIAL_ECHOLNPGM("Position in encoder ticks is ", positionInTicks);
SERIAL_ECHOLNPGM("New zero-offset of ", zeroOffset);
SERIAL_ECHOPGM("New position reads as ", get_position());
SERIAL_CHAR('(');
SERIAL_DECIMAL(mm_from_count(get_position()));
SERIAL_ECHOLNPGM(")");
@ -149,12 +149,12 @@ void I2CPositionEncoder::update() {
const int32_t error = get_axis_error_steps(false);
#endif
//SERIAL_ECHOLNPAIR("Axis error steps: ", error);
//SERIAL_ECHOLNPGM("Axis error steps: ", error);
#ifdef I2CPE_ERR_THRESH_ABORT
if (ABS(error) > I2CPE_ERR_THRESH_ABORT * planner.settings.axis_steps_per_mm[encoderAxis]) {
//kill(PSTR("Significant Error"));
SERIAL_ECHOLNPAIR("Axis error over threshold, aborting!", error);
SERIAL_ECHOLNPGM("Axis error over threshold, aborting!", error);
safe_delay(5000);
}
#endif
@ -173,7 +173,7 @@ void I2CPositionEncoder::update() {
LOOP_L_N(i, I2CPE_ERR_PRST_ARRAY_SIZE) sumP += errPrst[i];
const int32_t errorP = int32_t(sumP * RECIPROCAL(I2CPE_ERR_PRST_ARRAY_SIZE));
SERIAL_CHAR(axis_codes[encoderAxis]);
SERIAL_ECHOLNPAIR(" : CORRECT ERR ", errorP * planner.steps_to_mm[encoderAxis], "mm");
SERIAL_ECHOLNPGM(" : CORRECT ERR ", errorP * planner.steps_to_mm[encoderAxis], "mm");
babystep.add_steps(encoderAxis, -LROUND(errorP));
errPrstIdx = 0;
}
@ -193,7 +193,7 @@ void I2CPositionEncoder::update() {
const millis_t ms = millis();
if (ELAPSED(ms, nextErrorCountTime)) {
SERIAL_CHAR(axis_codes[encoderAxis]);
SERIAL_ECHOLNPAIR(" : LARGE ERR ", error, "; diffSum=", diffSum);
SERIAL_ECHOLNPGM(" : LARGE ERR ", error, "; diffSum=", diffSum);
errorCount++;
nextErrorCountTime = ms + I2CPE_ERR_CNT_DEBOUNCE_MS;
}
@ -213,7 +213,7 @@ void I2CPositionEncoder::set_homed() {
#ifdef I2CPE_DEBUG
SERIAL_CHAR(axis_codes[encoderAxis]);
SERIAL_ECHOLNPAIR(" axis encoder homed, offset of ", zeroOffset, " ticks.");
SERIAL_ECHOLNPGM(" axis encoder homed, offset of ", zeroOffset, " ticks.");
#endif
}
}
@ -253,7 +253,7 @@ float I2CPositionEncoder::get_axis_error_mm(const bool report) {
if (report) {
SERIAL_CHAR(axis_codes[encoderAxis]);
SERIAL_ECHOLNPAIR(" axis target=", target, "mm; actual=", actual, "mm; err=", error, "mm");
SERIAL_ECHOLNPGM(" axis target=", target, "mm; actual=", actual, "mm; err=", error, "mm");
}
return error;
@ -288,7 +288,7 @@ int32_t I2CPositionEncoder::get_axis_error_steps(const bool report) {
if (report) {
SERIAL_CHAR(axis_codes[encoderAxis]);
SERIAL_ECHOLNPAIR(" axis target=", target, "; actual=", encoderCountInStepperTicksScaled, "; err=", error);
SERIAL_ECHOLNPGM(" axis target=", target, "; actual=", encoderCountInStepperTicksScaled, "; err=", error);
}
if (suppressOutput) {
@ -424,15 +424,15 @@ void I2CPositionEncoder::calibrate_steps_mm(const uint8_t iter) {
travelledDistance = mm_from_count(ABS(stopCount - startCount));
SERIAL_ECHOLNPAIR("Attempted travel: ", travelDistance, "mm");
SERIAL_ECHOLNPAIR(" Actual travel: ", travelledDistance, "mm");
SERIAL_ECHOLNPGM("Attempted travel: ", travelDistance, "mm");
SERIAL_ECHOLNPGM(" Actual travel: ", travelledDistance, "mm");
//Calculate new axis steps per unit
old_steps_mm = planner.settings.axis_steps_per_mm[encoderAxis];
new_steps_mm = (old_steps_mm * travelDistance) / travelledDistance;
SERIAL_ECHOLNPAIR("Old steps/mm: ", old_steps_mm);
SERIAL_ECHOLNPAIR("New steps/mm: ", new_steps_mm);
SERIAL_ECHOLNPGM("Old steps/mm: ", old_steps_mm);
SERIAL_ECHOLNPGM("New steps/mm: ", new_steps_mm);
//Save new value
planner.settings.axis_steps_per_mm[encoderAxis] = new_steps_mm;
@ -449,7 +449,7 @@ void I2CPositionEncoder::calibrate_steps_mm(const uint8_t iter) {
if (iter > 1) {
total /= (float)iter;
SERIAL_ECHOLNPAIR("Average steps/mm: ", total);
SERIAL_ECHOLNPGM("Average steps/mm: ", total);
}
ec = oldec;
@ -675,18 +675,18 @@ void I2CPositionEncodersMgr::change_module_address(const uint8_t oldaddr, const
// First check 'new' address is not in use
Wire.beginTransmission(I2C_ADDRESS(newaddr));
if (!Wire.endTransmission()) {
SERIAL_ECHOLNPAIR("?There is already a device with that address on the I2C bus! (", newaddr, ")");
SERIAL_ECHOLNPGM("?There is already a device with that address on the I2C bus! (", newaddr, ")");
return;
}
// Now check that we can find the module on the oldaddr address
Wire.beginTransmission(I2C_ADDRESS(oldaddr));
if (Wire.endTransmission()) {
SERIAL_ECHOLNPAIR("?No module detected at this address! (", oldaddr, ")");
SERIAL_ECHOLNPGM("?No module detected at this address! (", oldaddr, ")");
return;
}
SERIAL_ECHOLNPAIR("Module found at ", oldaddr, ", changing address to ", newaddr);
SERIAL_ECHOLNPGM("Module found at ", oldaddr, ", changing address to ", newaddr);
// Change the modules address
Wire.beginTransmission(I2C_ADDRESS(oldaddr));
@ -722,11 +722,11 @@ void I2CPositionEncodersMgr::report_module_firmware(const uint8_t address) {
// First check there is a module
Wire.beginTransmission(I2C_ADDRESS(address));
if (Wire.endTransmission()) {
SERIAL_ECHOLNPAIR("?No module detected at this address! (", address, ")");
SERIAL_ECHOLNPGM("?No module detected at this address! (", address, ")");
return;
}
SERIAL_ECHOLNPAIR("Requesting version info from module at address ", address, ":");
SERIAL_ECHOLNPGM("Requesting version info from module at address ", address, ":");
Wire.beginTransmission(I2C_ADDRESS(address));
Wire.write(I2CPE_SET_REPORT_MODE);
@ -773,13 +773,13 @@ int8_t I2CPositionEncodersMgr::parse() {
else if (parser.seenval('I')) {
if (!parser.has_value()) {
SERIAL_ECHOLNPAIR("?I seen, but no index specified! [0-", I2CPE_ENCODER_CNT - 1, "]");
SERIAL_ECHOLNPGM("?I seen, but no index specified! [0-", I2CPE_ENCODER_CNT - 1, "]");
return I2CPE_PARSE_ERR;
};
I2CPE_idx = parser.value_byte();
if (I2CPE_idx >= I2CPE_ENCODER_CNT) {
SERIAL_ECHOLNPAIR("?Index out of range. [0-", I2CPE_ENCODER_CNT - 1, "]");
SERIAL_ECHOLNPGM("?Index out of range. [0-", I2CPE_ENCODER_CNT - 1, "]");
return I2CPE_PARSE_ERR;
}
@ -954,7 +954,7 @@ void I2CPositionEncodersMgr::M864() {
else return;
}
SERIAL_ECHOLNPAIR("Changing module at address ", I2CPE_addr, " to address ", newAddress);
SERIAL_ECHOLNPGM("Changing module at address ", I2CPE_addr, " to address ", newAddress);
change_module_address(I2CPE_addr, newAddress);
}

12
Marlin/src/feature/encoder_i2c.h

@ -236,7 +236,7 @@ class I2CPositionEncodersMgr {
static void report_status(const int8_t idx) {
CHECK_IDX();
SERIAL_ECHOLNPAIR("Encoder ", idx, ": ");
SERIAL_ECHOLNPGM("Encoder ", idx, ": ");
encoders[idx].get_raw_count();
encoders[idx].passes_test(true);
}
@ -261,32 +261,32 @@ class I2CPositionEncodersMgr {
static void report_error_count(const int8_t idx, const AxisEnum axis) {
CHECK_IDX();
SERIAL_ECHOLNPAIR("Error count on ", AS_CHAR(axis_codes[axis]), " axis is ", encoders[idx].get_error_count());
SERIAL_ECHOLNPGM("Error count on ", AS_CHAR(axis_codes[axis]), " axis is ", encoders[idx].get_error_count());
}
static void reset_error_count(const int8_t idx, const AxisEnum axis) {
CHECK_IDX();
encoders[idx].set_error_count(0);
SERIAL_ECHOLNPAIR("Error count on ", AS_CHAR(axis_codes[axis]), " axis has been reset.");
SERIAL_ECHOLNPGM("Error count on ", AS_CHAR(axis_codes[axis]), " axis has been reset.");
}
static void enable_ec(const int8_t idx, const bool enabled, const AxisEnum axis) {
CHECK_IDX();
encoders[idx].set_ec_enabled(enabled);
SERIAL_ECHOPAIR("Error correction on ", AS_CHAR(axis_codes[axis]));
SERIAL_ECHOPGM("Error correction on ", AS_CHAR(axis_codes[axis]));
SERIAL_ECHO_TERNARY(encoders[idx].get_ec_enabled(), " axis is ", "en", "dis", "abled.\n");
}
static void set_ec_threshold(const int8_t idx, const float newThreshold, const AxisEnum axis) {
CHECK_IDX();
encoders[idx].set_ec_threshold(newThreshold);
SERIAL_ECHOLNPAIR("Error correct threshold for ", AS_CHAR(axis_codes[axis]), " axis set to ", newThreshold, "mm.");
SERIAL_ECHOLNPGM("Error correct threshold for ", AS_CHAR(axis_codes[axis]), " axis set to ", newThreshold, "mm.");
}
static void get_ec_threshold(const int8_t idx, const AxisEnum axis) {
CHECK_IDX();
const float threshold = encoders[idx].get_ec_threshold();
SERIAL_ECHOLNPAIR("Error correct threshold for ", AS_CHAR(axis_codes[axis]), " axis is ", threshold, "mm.");
SERIAL_ECHOLNPGM("Error correct threshold for ", AS_CHAR(axis_codes[axis]), " axis is ", threshold, "mm.");
}
static int8_t idx_from_axis(const AxisEnum axis) {

34
Marlin/src/feature/fwretract.cpp

@ -106,20 +106,20 @@ void FWRetract::retract(const bool retracting OPTARG(HAS_MULTI_EXTRUDER, bool sw
#endif
/* // debugging
SERIAL_ECHOLNPAIR(
SERIAL_ECHOLNPGM(
"retracting ", AS_DIGIT(retracting),
" swapping ", swapping,
" active extruder ", active_extruder
);
LOOP_L_N(i, EXTRUDERS) {
SERIAL_ECHOLNPAIR("retracted[", i, "] ", AS_DIGIT(retracted[i]));
SERIAL_ECHOLNPGM("retracted[", i, "] ", AS_DIGIT(retracted[i]));
#if HAS_MULTI_EXTRUDER
SERIAL_ECHOLNPAIR("retracted_swap[", i, "] ", AS_DIGIT(retracted_swap[i]));
SERIAL_ECHOLNPGM("retracted_swap[", i, "] ", AS_DIGIT(retracted_swap[i]));
#endif
}
SERIAL_ECHOLNPAIR("current_position.z ", current_position.z);
SERIAL_ECHOLNPAIR("current_position.e ", current_position.e);
SERIAL_ECHOLNPAIR("current_hop ", current_hop);
SERIAL_ECHOLNPGM("current_position.z ", current_position.z);
SERIAL_ECHOLNPGM("current_position.e ", current_position.e);
SERIAL_ECHOLNPGM("current_hop ", current_hop);
//*/
const float base_retract = TERN1(RETRACT_SYNC_MIXING, (MIXING_STEPPERS))
@ -181,18 +181,18 @@ void FWRetract::retract(const bool retracting OPTARG(HAS_MULTI_EXTRUDER, bool sw
#endif
/* // debugging
SERIAL_ECHOLNPAIR("retracting ", AS_DIGIT(retracting));
SERIAL_ECHOLNPAIR("swapping ", AS_DIGIT(swapping));
SERIAL_ECHOLNPAIR("active_extruder ", active_extruder);
SERIAL_ECHOLNPGM("retracting ", AS_DIGIT(retracting));
SERIAL_ECHOLNPGM("swapping ", AS_DIGIT(swapping));
SERIAL_ECHOLNPGM("active_extruder ", active_extruder);
LOOP_L_N(i, EXTRUDERS) {
SERIAL_ECHOLNPAIR("retracted[", i, "] ", AS_DIGIT(retracted[i]));
SERIAL_ECHOLNPGM("retracted[", i, "] ", AS_DIGIT(retracted[i]));
#if HAS_MULTI_EXTRUDER
SERIAL_ECHOLNPAIR("retracted_swap[", i, "] ", AS_DIGIT(retracted_swap[i]));
SERIAL_ECHOLNPGM("retracted_swap[", i, "] ", AS_DIGIT(retracted_swap[i]));
#endif
}
SERIAL_ECHOLNPAIR("current_position.z ", current_position.z);
SERIAL_ECHOLNPAIR("current_position.e ", current_position.e);
SERIAL_ECHOLNPAIR("current_hop ", current_hop);
SERIAL_ECHOLNPGM("current_position.z ", current_position.z);
SERIAL_ECHOLNPGM("current_position.e ", current_position.e);
SERIAL_ECHOLNPGM("current_hop ", current_hop);
//*/
}
@ -215,7 +215,7 @@ void FWRetract::M207() {
}
void FWRetract::M207_report() {
SERIAL_ECHOLNPAIR_P(
SERIAL_ECHOLNPGM_P(
PSTR(" M207 S"), LINEAR_UNIT(settings.retract_length)
, PSTR(" W"), LINEAR_UNIT(settings.swap_retract_length)
, PSTR(" F"), LINEAR_UNIT(MMS_TO_MMM(settings.retract_feedrate_mm_s))
@ -240,7 +240,7 @@ void FWRetract::M208() {
}
void FWRetract::M208_report() {
SERIAL_ECHOLNPAIR(
SERIAL_ECHOLNPGM(
" M208 S", LINEAR_UNIT(settings.retract_recover_extra)
, " W", LINEAR_UNIT(settings.swap_retract_recover_extra)
, " F", LINEAR_UNIT(MMS_TO_MMM(settings.retract_recover_feedrate_mm_s))
@ -261,7 +261,7 @@ void FWRetract::M208_report() {
}
void FWRetract::M209_report() {
SERIAL_ECHOLNPAIR(" M209 S", AS_DIGIT(autoretract_enabled));
SERIAL_ECHOLNPGM(" M209 S", AS_DIGIT(autoretract_enabled));
}
#endif // FWRETRACT_AUTORETRACT

6
Marlin/src/feature/joystick.cpp

@ -68,13 +68,13 @@ Joystick joystick;
void Joystick::report() {
SERIAL_ECHOPGM("Joystick");
#if HAS_JOY_ADC_X
SERIAL_ECHOPAIR_P(SP_X_STR, JOY_X(x.raw));
SERIAL_ECHOPGM_P(SP_X_STR, JOY_X(x.raw));
#endif
#if HAS_JOY_ADC_Y
SERIAL_ECHOPAIR_P(SP_Y_STR, JOY_Y(y.raw));
SERIAL_ECHOPGM_P(SP_Y_STR, JOY_Y(y.raw));
#endif
#if HAS_JOY_ADC_Z
SERIAL_ECHOPAIR_P(SP_Z_STR, JOY_Z(z.raw));
SERIAL_ECHOPGM_P(SP_Z_STR, JOY_Z(z.raw));
#endif
#if HAS_JOY_ADC_EN
SERIAL_ECHO_TERNARY(READ(JOY_EN_PIN), " EN=", "HIGH (dis", "LOW (en", "abled)");

2
Marlin/src/feature/max7219.cpp

@ -130,7 +130,7 @@ void Max7219::error(const char * const func, const int32_t v1, const int32_t v2/
SERIAL_ECHOPGM_P(func);
SERIAL_CHAR('(');
SERIAL_ECHO(v1);
if (v2 > 0) SERIAL_ECHOPAIR(", ", v2);
if (v2 > 0) SERIAL_ECHOPGM(", ", v2);
SERIAL_CHAR(')');
SERIAL_EOL();
#else

2
Marlin/src/feature/meatpack.cpp

@ -140,7 +140,7 @@ void MeatPack::handle_output_char(const uint8_t c) {
#if ENABLED(MP_DEBUG)
if (chars_decoded < 1024) {
++chars_decoded;
DEBUG_ECHOLNPAIR("RB: ", AS_CHAR(c));
DEBUG_ECHOLNPGM("RB: ", AS_CHAR(c));
}
#endif
}

4
Marlin/src/feature/mixing.cpp

@ -154,11 +154,11 @@ void Mixer::refresh_collector(const float proportion/*=1.0*/, const uint8_t t/*=
cmax = _MAX(cmax, v);
csum += v;
}
//SERIAL_ECHOPAIR("Mixer::refresh_collector(", proportion, ", ", t, ") cmax=", cmax, " csum=", csum, " color");
//SERIAL_ECHOPGM("Mixer::refresh_collector(", proportion, ", ", t, ") cmax=", cmax, " csum=", csum, " color");
const float inv_prop = proportion / csum;
MIXER_STEPPER_LOOP(i) {
c[i] = color[t][i] * inv_prop;
//SERIAL_ECHOPAIR(" [", t, "][", i, "] = ", color[t][i], " (", c[i], ") ");
//SERIAL_ECHOPGM(" [", t, "][", i, "] = ", color[t][i], " (", c[i], ") ");
}
//SERIAL_EOL();
}

2
Marlin/src/feature/mixing.h

@ -152,7 +152,7 @@ class Mixer {
MIXER_STEPPER_LOOP(i) mix[i] = mixer_perc_t(100.0f * color[j][i] / ctot);
#ifdef MIXER_NORMALIZER_DEBUG
SERIAL_ECHOPAIR("V-tool ", j, " [ ");
SERIAL_ECHOPGM("V-tool ", j, " [ ");
SERIAL_ECHOLIST_N(MIXING_STEPPERS, color[j][0], color[j][1], color[j][2], color[j][3], color[j][4], color[j][5]);
SERIAL_ECHOPGM(" ] to Mix [ ");
SERIAL_ECHOLIST_N(MIXING_STEPPERS, mix[0], mix[1], mix[2], mix[3], mix[4], mix[5]);

18
Marlin/src/feature/mmu/mmu2.cpp

@ -169,7 +169,7 @@ void MMU2::mmu_loop() {
if (rx_ok()) {
sscanf(rx_buffer, "%huok\n", &version);
DEBUG_ECHOLNPAIR("MMU => ", version, "\nMMU <= 'S2'");
DEBUG_ECHOLNPGM("MMU => ", version, "\nMMU <= 'S2'");
MMU2_COMMAND("S2"); // Read Build Number
state = -3;
@ -180,7 +180,7 @@ void MMU2::mmu_loop() {
if (rx_ok()) {
sscanf(rx_buffer, "%huok\n", &buildnr);
DEBUG_ECHOLNPAIR("MMU => ", buildnr);
DEBUG_ECHOLNPGM("MMU => ", buildnr);
check_version();
@ -217,7 +217,7 @@ void MMU2::mmu_loop() {
if (rx_ok()) {
sscanf(rx_buffer, "%hhuok\n", &finda);
DEBUG_ECHOLNPAIR("MMU => ", finda, "\nMMU - ENABLED");
DEBUG_ECHOLNPGM("MMU => ", finda, "\nMMU - ENABLED");
_enabled = true;
state = 1;
@ -230,7 +230,7 @@ void MMU2::mmu_loop() {
if (WITHIN(cmd, MMU_CMD_T0, MMU_CMD_T0 + EXTRUDERS - 1)) {
// tool change
int filament = cmd - MMU_CMD_T0;
DEBUG_ECHOLNPAIR("MMU <= T", filament);
DEBUG_ECHOLNPGM("MMU <= T", filament);
tx_printf_P(PSTR("T%d\n"), filament);
TERN_(MMU_EXTRUDER_SENSOR, mmu_idl_sens = 1); // enable idler sensor, if any
state = 3; // wait for response
@ -238,7 +238,7 @@ void MMU2::mmu_loop() {
else if (WITHIN(cmd, MMU_CMD_L0, MMU_CMD_L0 + EXTRUDERS - 1)) {
// load
int filament = cmd - MMU_CMD_L0;
DEBUG_ECHOLNPAIR("MMU <= L", filament);
DEBUG_ECHOLNPGM("MMU <= L", filament);
tx_printf_P(PSTR("L%d\n"), filament);
state = 3; // wait for response
}
@ -258,7 +258,7 @@ void MMU2::mmu_loop() {
else if (WITHIN(cmd, MMU_CMD_E0, MMU_CMD_E0 + EXTRUDERS - 1)) {
// eject filament
int filament = cmd - MMU_CMD_E0;
DEBUG_ECHOLNPAIR("MMU <= E", filament);
DEBUG_ECHOLNPGM("MMU <= E", filament);
tx_printf_P(PSTR("E%d\n"), filament);
state = 3; // wait for response
}
@ -271,7 +271,7 @@ void MMU2::mmu_loop() {
else if (WITHIN(cmd, MMU_CMD_F0, MMU_CMD_F0 + EXTRUDERS - 1)) {
// filament type
int filament = cmd - MMU_CMD_F0;
DEBUG_ECHOLNPAIR("MMU <= F", filament, " ", cmd_arg);
DEBUG_ECHOLNPGM("MMU <= F", filament, " ", cmd_arg);
tx_printf_P(PSTR("F%d %d\n"), filament, cmd_arg);
state = 3; // wait for response
}
@ -647,7 +647,7 @@ static void mmu2_not_responding() {
void MMU2::mmu_continue_loading() {
for (uint8_t i = 0; i < MMU_LOADING_ATTEMPTS_NR; i++) {
DEBUG_ECHOLNPAIR("Additional load attempt #", i);
DEBUG_ECHOLNPGM("Additional load attempt #", i);
if (FILAMENT_PRESENT()) break;
command(MMU_CMD_C0);
manage_response(true, true);
@ -1025,7 +1025,7 @@ void MMU2::execute_extruder_sequence(const E_Step * sequence, int steps) {
const feedRate_t fr_mm_m = pgm_read_float(&(step->feedRate));
DEBUG_ECHO_START();
DEBUG_ECHOLNPAIR("E step ", es, "/", fr_mm_m);
DEBUG_ECHOLNPGM("E step ", es, "/", fr_mm_m);
current_position.e += es;
line_to_current_position(MMM_TO_MMS(fr_mm_m));

18
Marlin/src/feature/pause.cpp

@ -132,7 +132,7 @@ fil_change_settings_t fc_settings[EXTRUDERS];
*/
static bool ensure_safe_temperature(const bool wait=true, const PauseMode mode=PAUSE_MODE_SAME) {
DEBUG_SECTION(est, "ensure_safe_temperature", true);
DEBUG_ECHOLNPAIR("... wait:", wait, " mode:", mode);
DEBUG_ECHOLNPGM("... wait:", wait, " mode:", mode);
#if ENABLED(PREVENT_COLD_EXTRUSION)
if (!DEBUGGING(DRYRUN) && thermalManager.targetTooColdToExtrude(active_extruder))
@ -178,7 +178,7 @@ bool load_filament(const_float_t slow_load_length/*=0*/, const_float_t fast_load
DXC_ARGS
) {
DEBUG_SECTION(lf, "load_filament", true);
DEBUG_ECHOLNPAIR("... slowlen:", slow_load_length, " fastlen:", fast_load_length, " purgelen:", purge_length, " maxbeep:", max_beep_count, " showlcd:", show_lcd, " pauseforuser:", pause_for_user, " pausemode:", mode DXC_SAY);
DEBUG_ECHOLNPGM("... slowlen:", slow_load_length, " fastlen:", fast_load_length, " purgelen:", purge_length, " maxbeep:", max_beep_count, " showlcd:", show_lcd, " pauseforuser:", pause_for_user, " pausemode:", mode DXC_SAY);
if (!ensure_safe_temperature(false, mode)) {
if (show_lcd) ui.pause_show_message(PAUSE_MESSAGE_STATUS, mode);
@ -315,7 +315,7 @@ bool unload_filament(const_float_t unload_length, const bool show_lcd/*=false*/,
#endif
) {
DEBUG_SECTION(uf, "unload_filament", true);
DEBUG_ECHOLNPAIR("... unloadlen:", unload_length, " showlcd:", show_lcd, " mode:", mode
DEBUG_ECHOLNPGM("... unloadlen:", unload_length, " showlcd:", show_lcd, " mode:", mode
#if BOTH(FILAMENT_UNLOAD_ALL_EXTRUDERS, MIXING_EXTRUDER)
, " mixmult:", mix_multiplier
#endif
@ -379,7 +379,7 @@ uint8_t did_pause_print = 0;
bool pause_print(const_float_t retract, const xyz_pos_t &park_point, const bool show_lcd/*=false*/, const_float_t unload_length/*=0*/ DXC_ARGS) {
DEBUG_SECTION(pp, "pause_print", true);
DEBUG_ECHOLNPAIR("... park.x:", park_point.x, " y:", park_point.y, " z:", park_point.z, " unloadlen:", unload_length, " showlcd:", show_lcd DXC_SAY);
DEBUG_ECHOLNPGM("... park.x:", park_point.x, " y:", park_point.y, " z:", park_point.z, " unloadlen:", unload_length, " showlcd:", show_lcd DXC_SAY);
UNUSED(show_lcd);
@ -430,7 +430,7 @@ bool pause_print(const_float_t retract, const xyz_pos_t &park_point, const bool
// Initial retract before move to filament change position
if (retract && thermalManager.hotEnoughToExtrude(active_extruder)) {
DEBUG_ECHOLNPAIR("... retract:", retract);
DEBUG_ECHOLNPGM("... retract:", retract);
unscaled_e_move(retract, PAUSE_PARK_RETRACT_FEEDRATE);
}
@ -472,7 +472,7 @@ bool pause_print(const_float_t retract, const xyz_pos_t &park_point, const bool
void show_continue_prompt(const bool is_reload) {
DEBUG_SECTION(scp, "pause_print", true);
DEBUG_ECHOLNPAIR("... is_reload:", is_reload);
DEBUG_ECHOLNPGM("... is_reload:", is_reload);
ui.pause_show_message(is_reload ? PAUSE_MESSAGE_INSERT : PAUSE_MESSAGE_WAITING);
SERIAL_ECHO_START();
@ -481,7 +481,7 @@ void show_continue_prompt(const bool is_reload) {
void wait_for_confirmation(const bool is_reload/*=false*/, const int8_t max_beep_count/*=0*/ DXC_ARGS) {
DEBUG_SECTION(wfc, "wait_for_confirmation", true);
DEBUG_ECHOLNPAIR("... is_reload:", is_reload, " maxbeep:", max_beep_count DXC_SAY);
DEBUG_ECHOLNPGM("... is_reload:", is_reload, " maxbeep:", max_beep_count DXC_SAY);
bool nozzle_timed_out = false;
@ -584,10 +584,10 @@ void wait_for_confirmation(const bool is_reload/*=false*/, const int8_t max_beep
*/
void resume_print(const_float_t slow_load_length/*=0*/, const_float_t fast_load_length/*=0*/, const_float_t purge_length/*=ADVANCED_PAUSE_PURGE_LENGTH*/, const int8_t max_beep_count/*=0*/, const celsius_t targetTemp/*=0*/ DXC_ARGS) {
DEBUG_SECTION(rp, "resume_print", true);
DEBUG_ECHOLNPAIR("... slowlen:", slow_load_length, " fastlen:", fast_load_length, " purgelen:", purge_length, " maxbeep:", max_beep_count, " targetTemp:", targetTemp DXC_SAY);
DEBUG_ECHOLNPGM("... slowlen:", slow_load_length, " fastlen:", fast_load_length, " purgelen:", purge_length, " maxbeep:", max_beep_count, " targetTemp:", targetTemp DXC_SAY);
/*
SERIAL_ECHOLNPAIR(
SERIAL_ECHOLNPGM(
"start of resume_print()\ndual_x_carriage_mode:", dual_x_carriage_mode,
"\nextruder_duplication_enabled:", extruder_duplication_enabled,
"\nactive_extruder:", active_extruder,

34
Marlin/src/feature/powerloss.cpp

@ -577,7 +577,7 @@ void PrintJobRecovery::resume() {
void PrintJobRecovery::debug(PGM_P const prefix) {
DEBUG_ECHOPGM_P(prefix);
DEBUG_ECHOLNPAIR(" Job Recovery Info...\nvalid_head:", info.valid_head, " valid_foot:", info.valid_foot);
DEBUG_ECHOLNPGM(" Job Recovery Info...\nvalid_head:", info.valid_head, " valid_foot:", info.valid_foot);
if (info.valid_head) {
if (info.valid_head == info.valid_foot) {
DEBUG_ECHOPGM("current_position: ");
@ -587,14 +587,14 @@ void PrintJobRecovery::resume() {
}
DEBUG_EOL();
DEBUG_ECHOLNPAIR("feedrate: ", info.feedrate);
DEBUG_ECHOLNPGM("feedrate: ", info.feedrate);
DEBUG_ECHOLNPAIR("zraise: ", info.zraise, " ", info.flag.raised ? "(before)" : "");
DEBUG_ECHOLNPGM("zraise: ", info.zraise, " ", info.flag.raised ? "(before)" : "");
#if ENABLED(GCODE_REPEAT_MARKERS)
DEBUG_ECHOLNPAIR("repeat index: ", info.stored_repeat.index);
DEBUG_ECHOLNPGM("repeat index: ", info.stored_repeat.index);
LOOP_L_N(i, info.stored_repeat.index)
DEBUG_ECHOLNPAIR("..... sdpos: ", info.stored_repeat.marker.sdpos, " count: ", info.stored_repeat.marker.counter);
DEBUG_ECHOLNPGM("..... sdpos: ", info.stored_repeat.marker.sdpos, " count: ", info.stored_repeat.marker.counter);
#endif
#if HAS_HOME_OFFSET
@ -616,12 +616,12 @@ void PrintJobRecovery::resume() {
#endif
#if HAS_MULTI_EXTRUDER
DEBUG_ECHOLNPAIR("active_extruder: ", info.active_extruder);
DEBUG_ECHOLNPGM("active_extruder: ", info.active_extruder);
#endif
#if DISABLED(NO_VOLUMETRICS)
DEBUG_ECHOPGM("filament_size:");
LOOP_L_N(i, EXTRUDERS) DEBUG_ECHOLNPAIR(" ", info.filament_size[i]);
LOOP_L_N(i, EXTRUDERS) DEBUG_ECHOLNPGM(" ", info.filament_size[i]);
DEBUG_EOL();
#endif
@ -635,7 +635,7 @@ void PrintJobRecovery::resume() {
#endif
#if HAS_HEATED_BED
DEBUG_ECHOLNPAIR("target_temperature_bed: ", info.target_temperature_bed);
DEBUG_ECHOLNPGM("target_temperature_bed: ", info.target_temperature_bed);
#endif
#if HAS_FAN
@ -648,7 +648,7 @@ void PrintJobRecovery::resume() {
#endif
#if HAS_LEVELING
DEBUG_ECHOLNPAIR("leveling: ", info.flag.leveling ? "ON" : "OFF", " fade: ", info.fade);
DEBUG_ECHOLNPGM("leveling: ", info.flag.leveling ? "ON" : "OFF", " fade: ", info.fade);
#endif
#if ENABLED(FWRETRACT)
@ -658,17 +658,17 @@ void PrintJobRecovery::resume() {
if (e < EXTRUDERS - 1) DEBUG_CHAR(',');
}
DEBUG_EOL();
DEBUG_ECHOLNPAIR("retract_hop: ", info.retract_hop);
DEBUG_ECHOLNPGM("retract_hop: ", info.retract_hop);
#endif
// Mixing extruder and gradient
#if BOTH(MIXING_EXTRUDER, GRADIENT_MIX)
DEBUG_ECHOLNPAIR("gradient: ", info.gradient.enabled ? "ON" : "OFF");
DEBUG_ECHOLNPGM("gradient: ", info.gradient.enabled ? "ON" : "OFF");
#endif
DEBUG_ECHOLNPAIR("sd_filename: ", info.sd_filename);
DEBUG_ECHOLNPAIR("sdpos: ", info.sdpos);
DEBUG_ECHOLNPAIR("print_job_elapsed: ", info.print_job_elapsed);
DEBUG_ECHOLNPGM("sd_filename: ", info.sd_filename);
DEBUG_ECHOLNPGM("sdpos: ", info.sdpos);
DEBUG_ECHOLNPGM("print_job_elapsed: ", info.print_job_elapsed);
DEBUG_ECHOPGM("axis_relative:");
if (TEST(info.axis_relative, REL_X)) DEBUG_ECHOPGM(" REL_X");
@ -679,9 +679,9 @@ void PrintJobRecovery::resume() {
if (TEST(info.axis_relative, E_MODE_REL)) DEBUG_ECHOPGM(" E_MODE_REL");
DEBUG_EOL();
DEBUG_ECHOLNPAIR("flag.dryrun: ", AS_DIGIT(info.flag.dryrun));
DEBUG_ECHOLNPAIR("flag.allow_cold_extrusion: ", AS_DIGIT(info.flag.allow_cold_extrusion));
DEBUG_ECHOLNPAIR("flag.volumetric_enabled: ", AS_DIGIT(info.flag.volumetric_enabled));
DEBUG_ECHOLNPGM("flag.dryrun: ", AS_DIGIT(info.flag.dryrun));
DEBUG_ECHOLNPGM("flag.allow_cold_extrusion: ", AS_DIGIT(info.flag.allow_cold_extrusion));
DEBUG_ECHOLNPGM("flag.volumetric_enabled: ", AS_DIGIT(info.flag.volumetric_enabled));
}
else
DEBUG_ECHOLNPGM("INVALID DATA");

4
Marlin/src/feature/probe_temp_comp.cpp

@ -75,7 +75,7 @@ void ProbeTempComp::print_offsets() {
#endif
PSTR("Probe")
);
SERIAL_ECHOLNPAIR(
SERIAL_ECHOLNPGM(
" temp: ", temp,
"C; Offset: ", i < 0 ? 0.0f : sensor_z_offsets[s][i], " um"
);
@ -117,7 +117,7 @@ bool ProbeTempComp::finish_calibration(const TempSensorID tsi) {
// Extrapolate
float k, d;
if (calib_idx < measurements) {
SERIAL_ECHOLNPAIR("Got ", calib_idx, " measurements. ");
SERIAL_ECHOLNPGM("Got ", calib_idx, " measurements. ");
if (linear_regression(tsi, k, d)) {
SERIAL_ECHOPGM("Applying linear extrapolation");
calib_idx--;

8
Marlin/src/feature/repeat.cpp

@ -43,7 +43,7 @@ void Repeat::add_marker(const uint32_t sdpos, const uint16_t count) {
marker[index].sdpos = sdpos;
marker[index].counter = count ?: -1;
index++;
DEBUG_ECHOLNPAIR("Add Marker ", index, " at ", sdpos, " (", count, ")");
DEBUG_ECHOLNPGM("Add Marker ", index, " at ", sdpos, " (", count, ")");
}
}
@ -53,14 +53,14 @@ void Repeat::loop() {
else {
const uint8_t ind = index - 1; // Active marker's index
if (!marker[ind].counter) { // Did its counter run out?
DEBUG_ECHOLNPAIR("Pass Marker ", index);
DEBUG_ECHOLNPGM("Pass Marker ", index);
index--; // Carry on. Previous marker on the next 'M808'.
}
else {
card.setIndex(marker[ind].sdpos); // Loop back to the marker.
if (marker[ind].counter > 0) // Ignore a negative (or zero) counter.
--marker[ind].counter; // Decrement the counter. If zero this 'M808' will be skipped next time.
DEBUG_ECHOLNPAIR("Goto Marker ", index, " at ", marker[ind].sdpos, " (", marker[ind].counter, ")");
DEBUG_ECHOLNPGM("Goto Marker ", index, " at ", marker[ind].sdpos, " (", marker[ind].counter, ")");
}
}
}
@ -69,7 +69,7 @@ void Repeat::cancel() { LOOP_L_N(i, index) marker[i].counter = 0; }
void Repeat::early_parse_M808(char * const cmd) {
if (is_command_M808(cmd)) {
DEBUG_ECHOLNPAIR("Parsing \"", cmd, "\"");
DEBUG_ECHOLNPGM("Parsing \"", cmd, "\"");
parser.parse(cmd);
if (parser.seen('L'))
add_marker(card.getIndex(), parser.value_ushort());

2
Marlin/src/feature/runout.cpp

@ -132,7 +132,7 @@ void event_filament_runout(const uint8_t extruder) {
char script[strlen(FILAMENT_RUNOUT_SCRIPT) + 1];
sprintf_P(script, PSTR(FILAMENT_RUNOUT_SCRIPT), tool);
#if ENABLED(FILAMENT_RUNOUT_SENSOR_DEBUG)
SERIAL_ECHOLNPAIR("Runout Command: ", script);
SERIAL_ECHOLNPGM("Runout Command: ", script);
#endif
queue.inject(script);
#else

6
Marlin/src/feature/runout.h

@ -145,7 +145,7 @@ class TFilamentMonitor : public FilamentMonitorBase {
if (runout_flags) {
SERIAL_ECHOPGM("Runout Sensors: ");
LOOP_L_N(i, 8) SERIAL_ECHO('0' + TEST(runout_flags, i));
SERIAL_ECHOPAIR(" -> ", extruder);
SERIAL_ECHOPGM(" -> ", extruder);
if (ran_out) SERIAL_ECHOPGM(" RUN OUT");
SERIAL_EOL();
}
@ -317,7 +317,7 @@ class FilamentSensorBase {
static uint8_t was_out; // = 0
if (out != TEST(was_out, s)) {
TBI(was_out, s);
SERIAL_ECHOLNPAIR_P(PSTR("Filament Sensor "), '0' + s, out ? PSTR(" OUT") : PSTR(" IN"));
SERIAL_ECHOLNPGM_P(PSTR("Filament Sensor "), '0' + s, out ? PSTR(" OUT") : PSTR(" IN"));
}
#endif
}
@ -352,7 +352,7 @@ class FilamentSensorBase {
if (ELAPSED(ms, t)) {
t = millis() + 1000UL;
LOOP_L_N(i, NUM_RUNOUT_SENSORS)
SERIAL_ECHOPAIR_P(i ? PSTR(", ") : PSTR("Remaining mm: "), runout_mm_countdown[i]);
SERIAL_ECHOPGM_P(i ? PSTR(", ") : PSTR("Remaining mm: "), runout_mm_countdown[i]);
SERIAL_EOL();
}
#endif

4
Marlin/src/feature/tmc_util.cpp

@ -226,7 +226,7 @@
SERIAL_ECHO(timestamp);
SERIAL_ECHOPGM(": ");
st.printLabel();
SERIAL_ECHOLNPAIR(" driver overtemperature warning! (", st.getMilliamps(), "mA)");
SERIAL_ECHOLNPGM(" driver overtemperature warning! (", st.getMilliamps(), "mA)");
}
template<typename TMC>
@ -271,7 +271,7 @@
st.rms_current(I_rms);
#if ENABLED(REPORT_CURRENT_CHANGE)
st.printLabel();
SERIAL_ECHOLNPAIR(" current decreased to ", I_rms);
SERIAL_ECHOLNPGM(" current decreased to ", I_rms);
#endif
}
}

4
Marlin/src/feature/tmc_util.h

@ -300,7 +300,7 @@ class TMCMarlin<TMC2660Stepper, AXIS_LETTER, DRIVER_ID, AXIS_ID> : public TMC266
template<typename TMC>
void tmc_print_current(TMC &st) {
st.printLabel();
SERIAL_ECHOLNPAIR(" driver current: ", st.getMilliamps());
SERIAL_ECHOLNPGM(" driver current: ", st.getMilliamps());
}
#if ENABLED(MONITOR_DRIVER_STATUS)
@ -322,7 +322,7 @@ void tmc_print_current(TMC &st) {
template<typename TMC>
void tmc_print_pwmthrs(TMC &st) {
st.printLabel();
SERIAL_ECHOLNPAIR(" stealthChop max speed: ", st.get_pwm_thrs());
SERIAL_ECHOLNPGM(" stealthChop max speed: ", st.get_pwm_thrs());
}
#endif
#if USE_SENSORLESS

2
Marlin/src/feature/twibus.cpp

@ -84,7 +84,7 @@ void TWIBus::send() {
void TWIBus::echoprefix(uint8_t bytes, const char pref[], uint8_t adr) {
SERIAL_ECHO_START();
SERIAL_ECHOPGM_P(pref);
SERIAL_ECHOPAIR(": from:", adr, " bytes:", bytes, " data:");
SERIAL_ECHOPGM(": from:", adr, " bytes:", bytes, " data:");
}
// static

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

@ -539,7 +539,7 @@ void GcodeSuite::G26() {
if (bedtemp) {
if (!WITHIN(bedtemp, 40, BED_MAX_TARGET)) {
SERIAL_ECHOLNPAIR("?Specified bed temperature not plausible (40-", BED_MAX_TARGET, "C).");
SERIAL_ECHOLNPGM("?Specified bed temperature not plausible (40-", BED_MAX_TARGET, "C).");
return;
}
g26.bed_temp = bedtemp;

14
Marlin/src/gcode/bedlevel/G35.cpp

@ -106,19 +106,19 @@ void GcodeSuite::G35() {
const float z_probed_height = probe.probe_at_point(tramming_points[i], PROBE_PT_RAISE, 0, true);
if (isnan(z_probed_height)) {
SERIAL_ECHOPAIR("G35 failed at point ", i + 1, " (");
SERIAL_ECHOPGM("G35 failed at point ", i + 1, " (");
SERIAL_ECHOPGM_P((char *)pgm_read_ptr(&tramming_point_name[i]));
SERIAL_CHAR(')');
SERIAL_ECHOLNPAIR_P(SP_X_STR, tramming_points[i].x, SP_Y_STR, tramming_points[i].y);
SERIAL_ECHOLNPGM_P(SP_X_STR, tramming_points[i].x, SP_Y_STR, tramming_points[i].y);
err_break = true;
break;
}
if (DEBUGGING(LEVELING)) {
DEBUG_ECHOPAIR("Probing point ", i + 1, " (");
DEBUG_ECHOPGM("Probing point ", i + 1, " (");
DEBUG_ECHOPGM_P((char *)pgm_read_ptr(&tramming_point_name[i]));
DEBUG_CHAR(')');
DEBUG_ECHOLNPAIR_P(SP_X_STR, tramming_points[i].x, SP_Y_STR, tramming_points[i].y, SP_Z_STR, z_probed_height);
DEBUG_ECHOLNPGM_P(SP_X_STR, tramming_points[i].x, SP_Y_STR, tramming_points[i].y, SP_Z_STR, z_probed_height);
}
z_measured[i] = z_probed_height;
@ -138,9 +138,9 @@ void GcodeSuite::G35() {
SERIAL_ECHOPGM("Turn ");
SERIAL_ECHOPGM_P((char *)pgm_read_ptr(&tramming_point_name[i]));
SERIAL_ECHOPAIR(" ", (screw_thread & 1) == (adjust > 0) ? "CCW" : "CW", " by ", ABS(full_turns), " turns");
if (minutes) SERIAL_ECHOPAIR(" and ", ABS(minutes), " minutes");
if (ENABLED(REPORT_TRAMMING_MM)) SERIAL_ECHOPAIR(" (", -diff, "mm)");
SERIAL_ECHOPGM(" ", (screw_thread & 1) == (adjust > 0) ? "CCW" : "CW", " by ", ABS(full_turns), " turns");
if (minutes) SERIAL_ECHOPGM(" and ", ABS(minutes), " minutes");
if (ENABLED(REPORT_TRAMMING_MM)) SERIAL_ECHOPGM(" (", -diff, "mm)");
SERIAL_EOL();
}
}

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

@ -76,9 +76,9 @@ void GcodeSuite::M420() {
TERN_(EXTENSIBLE_UI, ExtUI::onMeshUpdate(x, y, Z_VALUES(x, y)));
}
SERIAL_ECHOPGM("Simulated " STRINGIFY(GRID_MAX_POINTS_X) "x" STRINGIFY(GRID_MAX_POINTS_Y) " mesh ");
SERIAL_ECHOPAIR(" (", x_min);
SERIAL_ECHOPGM(" (", x_min);
SERIAL_CHAR(','); SERIAL_ECHO(y_min);
SERIAL_ECHOPAIR(")-(", x_max);
SERIAL_ECHOPGM(")-(", x_max);
SERIAL_CHAR(','); SERIAL_ECHO(y_max);
SERIAL_ECHOLNPGM(")");
}
@ -108,7 +108,7 @@ void GcodeSuite::M420() {
if (!WITHIN(storage_slot, 0, a - 1)) {
SERIAL_ECHOLNPGM("?Invalid storage slot.");
SERIAL_ECHOLNPAIR("?Use 0 to ", a - 1);
SERIAL_ECHOLNPGM("?Use 0 to ", a - 1);
return;
}
@ -128,7 +128,7 @@ void GcodeSuite::M420() {
ubl.display_map(parser.byteval('T'));
SERIAL_ECHOPGM("Mesh is ");
if (!ubl.mesh_is_valid()) SERIAL_ECHOPGM("in");
SERIAL_ECHOLNPAIR("valid\nStorage slot: ", ubl.storage_slot);
SERIAL_ECHOLNPGM("valid\nStorage slot: ", ubl.storage_slot);
}
#endif // AUTO_BED_LEVELING_UBL
@ -246,7 +246,7 @@ void GcodeSuite::M420_report(const bool forReplay/*=true*/) {
report_heading_etc(forReplay, PSTR(
TERN(MESH_BED_LEVELING, "Mesh Bed Leveling", TERN(AUTO_BED_LEVELING_UBL, "Unified Bed Leveling", "Auto Bed Leveling"))
));
SERIAL_ECHOPAIR_P(
SERIAL_ECHOPGM_P(
PSTR(" M420 S"), planner.leveling_active
#if ENABLED(ENABLE_LEVELING_FADE_HEIGHT)
, SP_Z_STR, LINEAR_UNIT(planner.z_fade_height)

18
Marlin/src/gcode/bedlevel/abl/G29.cpp

@ -379,7 +379,7 @@ G29_TYPE GcodeSuite::G29() {
if (!probe.good_bounds(abl.probe_position_lf, abl.probe_position_rb)) {
if (DEBUGGING(LEVELING)) {
DEBUG_ECHOLNPAIR("G29 L", abl.probe_position_lf.x, " R", abl.probe_position_rb.x,
DEBUG_ECHOLNPGM("G29 L", abl.probe_position_lf.x, " R", abl.probe_position_rb.x,
" F", abl.probe_position_lf.y, " B", abl.probe_position_rb.y);
}
SERIAL_ECHOLNPGM("? (L,R,F,B) out of bounds.");
@ -470,7 +470,7 @@ G29_TYPE GcodeSuite::G29() {
if (abl.verbose_level || seenQ) {
SERIAL_ECHOPGM("Manual G29 ");
if (g29_in_progress)
SERIAL_ECHOLNPAIR("point ", _MIN(abl.abl_probe_index + 1, abl.abl_points), " of ", abl.abl_points);
SERIAL_ECHOLNPGM("point ", _MIN(abl.abl_probe_index + 1, abl.abl_points), " of ", abl.abl_points);
else
SERIAL_ECHOLNPGM("idle");
}
@ -513,7 +513,7 @@ G29_TYPE GcodeSuite::G29() {
z_values[abl.meshCount.x][abl.meshCount.y] = newz;
TERN_(EXTENSIBLE_UI, ExtUI::onMeshUpdate(abl.meshCount, newz));
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR_P(PSTR("Save X"), abl.meshCount.x, SP_Y_STR, abl.meshCount.y, SP_Z_STR, abl.measured_z + abl.Z_offset);
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM_P(PSTR("Save X"), abl.meshCount.x, SP_Y_STR, abl.meshCount.y, SP_Z_STR, abl.measured_z + abl.Z_offset);
#endif
}
@ -635,7 +635,7 @@ G29_TYPE GcodeSuite::G29() {
// Avoid probing outside the round or hexagonal area
if (TERN0(IS_KINEMATIC, !probe.can_reach(abl.probePos))) continue;
if (abl.verbose_level) SERIAL_ECHOLNPAIR("Probing mesh point ", pt_index, "/", abl.abl_points, ".");
if (abl.verbose_level) SERIAL_ECHOLNPGM("Probing mesh point ", pt_index, "/", abl.abl_points, ".");
TERN_(HAS_STATUS_MESSAGE, ui.status_printf_P(0, PSTR(S_FMT " %i/%i"), GET_TEXT(MSG_PROBING_POINT), int(pt_index), int(abl.abl_points)));
abl.measured_z = faux ? 0.001f * random(-100, 101) : probe.probe_at_point(abl.probePos, raise_after, abl.verbose_level);
@ -680,7 +680,7 @@ G29_TYPE GcodeSuite::G29() {
// Probe at 3 arbitrary points
LOOP_L_N(i, 3) {
if (abl.verbose_level) SERIAL_ECHOLNPAIR("Probing point ", i + 1, "/3.");
if (abl.verbose_level) SERIAL_ECHOLNPGM("Probing point ", i + 1, "/3.");
TERN_(HAS_STATUS_MESSAGE, ui.status_printf_P(0, PSTR(S_FMT " %i/3"), GET_TEXT(MSG_PROBING_POINT), int(i + 1)));
// Retain the last probe position
@ -842,7 +842,7 @@ G29_TYPE GcodeSuite::G29() {
&& NEAR(current_position.y, abl.probePos.y - probe.offset_xy.y)
) {
const float simple_z = current_position.z - abl.measured_z;
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("Probed Z", simple_z, " Matrix Z", converted.z, " Discrepancy ", simple_z - converted.z);
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Probed Z", simple_z, " Matrix Z", converted.z, " Discrepancy ", simple_z - converted.z);
converted.z = simple_z;
}
@ -855,14 +855,14 @@ G29_TYPE GcodeSuite::G29() {
#elif ENABLED(AUTO_BED_LEVELING_BILINEAR)
if (!abl.dryrun) {
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("G29 uncorrected Z:", current_position.z);
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("G29 uncorrected Z:", current_position.z);
// Unapply the offset because it is going to be immediately applied
// and cause compensation movement in Z
const float fade_scaling_factor = TERN(ENABLE_LEVELING_FADE_HEIGHT, planner.fade_scaling_factor_for_z(current_position.z), 1);
current_position.z -= fade_scaling_factor * bilinear_z_offset(current_position);
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR(" corrected Z:", current_position.z);
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM(" corrected Z:", current_position.z);
}
#endif // ABL_PLANAR
@ -880,7 +880,7 @@ G29_TYPE GcodeSuite::G29() {
TERN_(HAS_BED_PROBE, probe.move_z_after_probing());
#ifdef Z_PROBE_END_SCRIPT
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("Z Probe End Script: ", Z_PROBE_END_SCRIPT);
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Z Probe End Script: ", Z_PROBE_END_SCRIPT);
planner.synchronize();
process_subcommands_now_P(PSTR(Z_PROBE_END_SCRIPT));
#endif

6
Marlin/src/gcode/bedlevel/mbl/G29.cpp

@ -173,7 +173,7 @@ void GcodeSuite::G29() {
if (parser.seenval('I')) {
ix = parser.value_int();
if (!WITHIN(ix, 0, (GRID_MAX_POINTS_X) - 1)) {
SERIAL_ECHOLNPAIR("I out of range (0-", (GRID_MAX_POINTS_X) - 1, ")");
SERIAL_ECHOLNPGM("I out of range (0-", (GRID_MAX_POINTS_X) - 1, ")");
return;
}
}
@ -183,7 +183,7 @@ void GcodeSuite::G29() {
if (parser.seenval('J')) {
iy = parser.value_int();
if (!WITHIN(iy, 0, (GRID_MAX_POINTS_Y) - 1)) {
SERIAL_ECHOLNPAIR("J out of range (0-", (GRID_MAX_POINTS_Y) - 1, ")");
SERIAL_ECHOLNPGM("J out of range (0-", (GRID_MAX_POINTS_Y) - 1, ")");
return;
}
}
@ -213,7 +213,7 @@ void GcodeSuite::G29() {
} // switch(state)
if (state == MeshNext) {
SERIAL_ECHOLNPAIR("MBL G29 point ", _MIN(mbl_probe_index, GRID_MAX_POINTS), " of ", GRID_MAX_POINTS);
SERIAL_ECHOLNPGM("MBL G29 point ", _MIN(mbl_probe_index, GRID_MAX_POINTS), " of ", GRID_MAX_POINTS);
if (mbl_probe_index > 0) TERN_(HAS_STATUS_MESSAGE, ui.status_printf_P(0, PSTR(S_FMT " %i/%i"), GET_TEXT(MSG_PROBING_POINT), _MIN(mbl_probe_index, GRID_MAX_POINTS), int(GRID_MAX_POINTS)));
}

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

@ -270,7 +270,7 @@ void GcodeSuite::G28() {
#if HAS_HOMING_CURRENT
auto debug_current = [](PGM_P const s, const int16_t a, const int16_t b) {
DEBUG_ECHOPGM_P(s); DEBUG_ECHOLNPAIR(" current: ", a, " -> ", b);
DEBUG_ECHOPGM_P(s); DEBUG_ECHOLNPGM(" current: ", a, " -> ", b);
};
#if HAS_CURRENT_HOME(X)
const int16_t tmc_save_current_X = stepperX.getMilliamps();
@ -371,7 +371,7 @@ void GcodeSuite::G28() {
if (z_homing_height && (LINEAR_AXIS_GANG(doX, || doY, || TERN0(Z_SAFE_HOMING, doZ), || doI, || doJ, || doK))) {
// Raise Z before homing any other axes and z is not already high enough (never lower z)
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("Raise Z (before homing) by ", z_homing_height);
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Raise Z (before homing) by ", z_homing_height);
do_z_clearance(z_homing_height);
TERN_(BLTOUCH, bltouch.init());
}

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

@ -107,14 +107,14 @@ void print_signed_float(PGM_P const prefix, const_float_t f) {
* - Print the delta settings
*/
static void print_calibration_settings(const bool end_stops, const bool tower_angles) {
SERIAL_ECHOPAIR(".Height:", delta_height);
SERIAL_ECHOPGM(".Height:", delta_height);
if (end_stops) {
print_signed_float(PSTR("Ex"), delta_endstop_adj.a);
print_signed_float(PSTR("Ey"), delta_endstop_adj.b);
print_signed_float(PSTR("Ez"), delta_endstop_adj.c);
}
if (end_stops && tower_angles) {
SERIAL_ECHOPAIR(" Radius:", delta_radius);
SERIAL_ECHOPGM(" Radius:", delta_radius);
SERIAL_EOL();
SERIAL_CHAR('.');
SERIAL_ECHO_SP(13);
@ -125,7 +125,7 @@ static void print_calibration_settings(const bool end_stops, const bool tower_an
print_signed_float(PSTR("Tz"), delta_tower_angle_trim.c);
}
if ((!end_stops && tower_angles) || (end_stops && !tower_angles)) { // XOR
SERIAL_ECHOPAIR(" Radius:", delta_radius);
SERIAL_ECHOPGM(" Radius:", delta_radius);
}
SERIAL_EOL();
}

26
Marlin/src/gcode/calibrate/G34_M422.cpp

@ -201,7 +201,7 @@ void GcodeSuite::G34() {
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("> probing all positions.");
const int iter = iteration + 1;
SERIAL_ECHOLNPAIR("\nG34 Iteration: ", iter);
SERIAL_ECHOLNPGM("\nG34 Iteration: ", iter);
#if HAS_STATUS_MESSAGE
char str[iter_str_len + 2 + 1];
sprintf_P(str, msg_iteration, iter);
@ -221,7 +221,7 @@ void GcodeSuite::G34() {
if ((iteration == 0 || i > 0) && z_probe > current_position.z) do_blocking_move_to_z(z_probe);
if (DEBUGGING(LEVELING))
DEBUG_ECHOLNPAIR_P(PSTR("Probing X"), z_stepper_align.xy[iprobe].x, SP_Y_STR, z_stepper_align.xy[iprobe].y);
DEBUG_ECHOLNPGM_P(PSTR("Probing X"), z_stepper_align.xy[iprobe].x, SP_Y_STR, z_stepper_align.xy[iprobe].y);
// Probe a Z height for each stepper.
// Probing sanity check is disabled, as it would trigger even in normal cases because
@ -238,7 +238,7 @@ void GcodeSuite::G34() {
// the next iteration of probing. This allows adjustments to be made away from the bed.
z_measured[iprobe] = z_probed_height + Z_CLEARANCE_BETWEEN_PROBES;
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("> Z", iprobe + 1, " measured position is ", z_measured[iprobe]);
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("> Z", iprobe + 1, " measured position is ", z_measured[iprobe]);
// Remember the minimum measurement to calculate the correction later on
z_measured_min = _MIN(z_measured_min, z_measured[iprobe]);
@ -267,7 +267,7 @@ void GcodeSuite::G34() {
linear_fit_data lfd;
incremental_LSF_reset(&lfd);
LOOP_L_N(i, NUM_Z_STEPPER_DRIVERS) {
SERIAL_ECHOLNPAIR("PROBEPT_", i, ": ", z_measured[i]);
SERIAL_ECHOLNPGM("PROBEPT_", i, ": ", z_measured[i]);
incremental_LSF(&lfd, z_stepper_align.xy[i], z_measured[i]);
}
finish_incremental_LSF(&lfd);
@ -278,7 +278,7 @@ void GcodeSuite::G34() {
z_measured_min = _MIN(z_measured_min, z_measured[i]);
}
SERIAL_ECHOLNPAIR(
SERIAL_ECHOLNPGM(
LIST_N(DOUBLE(NUM_Z_STEPPER_DRIVERS),
"Calculated Z1=", z_measured[0],
" Z2=", z_measured[1],
@ -288,7 +288,7 @@ void GcodeSuite::G34() {
);
#endif
SERIAL_ECHOLNPAIR("\n"
SERIAL_ECHOLNPGM("\n"
"Z2-Z1=", ABS(z_measured[1] - z_measured[0])
#if TRIPLE_Z
, " Z3-Z2=", ABS(z_measured[2] - z_measured[1])
@ -372,8 +372,8 @@ void GcodeSuite::G34() {
// Check for less accuracy compared to last move
if (decreasing_accuracy(last_z_align_move[zstepper], z_align_abs)) {
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("> Z", zstepper + 1, " last_z_align_move = ", last_z_align_move[zstepper]);
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("> Z", zstepper + 1, " z_align_abs = ", z_align_abs);
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("> Z", zstepper + 1, " last_z_align_move = ", last_z_align_move[zstepper]);
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("> Z", zstepper + 1, " z_align_abs = ", z_align_abs);
adjustment_reverse = !adjustment_reverse;
}
@ -385,7 +385,7 @@ void GcodeSuite::G34() {
// Stop early if all measured points achieve accuracy target
if (z_align_abs > z_auto_align_accuracy) success_break = false;
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("> Z", zstepper + 1, " corrected by ", z_align_move);
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("> Z", zstepper + 1, " corrected by ", z_align_move);
// Lock all steppers except one
stepper.set_all_z_lock(true, zstepper);
@ -395,7 +395,7 @@ void GcodeSuite::G34() {
// Will match reversed Z steppers on dual steppers. Triple will need more work to map.
if (adjustment_reverse) {
z_align_move = -z_align_move;
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("> Z", zstepper + 1, " correction reversed to ", z_align_move);
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("> Z", zstepper + 1, " correction reversed to ", z_align_move);
}
#endif
@ -421,7 +421,7 @@ void GcodeSuite::G34() {
if (err_break)
SERIAL_ECHOLNPGM("G34 aborted.");
else {
SERIAL_ECHOLNPAIR("Did ", iteration + (iteration != z_auto_align_iterations), " of ", z_auto_align_iterations);
SERIAL_ECHOLNPGM("Did ", iteration + (iteration != z_auto_align_iterations), " of ", z_auto_align_iterations);
SERIAL_ECHOLNPAIR_F("Accuracy: ", z_maxdiff);
}
@ -541,7 +541,7 @@ void GcodeSuite::M422_report(const bool forReplay/*=true*/) {
report_heading(forReplay, PSTR(STR_Z_AUTO_ALIGN));
LOOP_L_N(i, NUM_Z_STEPPER_DRIVERS) {
report_echo_start(forReplay);
SERIAL_ECHOLNPAIR_P(
SERIAL_ECHOLNPGM_P(
PSTR(" M422 S"), i + 1,
SP_X_STR, z_stepper_align.xy[i].x,
SP_Y_STR, z_stepper_align.xy[i].y
@ -550,7 +550,7 @@ void GcodeSuite::M422_report(const bool forReplay/*=true*/) {
#if ENABLED(Z_STEPPER_ALIGN_KNOWN_STEPPER_POSITIONS)
LOOP_L_N(i, NUM_Z_STEPPER_DRIVERS) {
report_echo_start(forReplay);
SERIAL_ECHOLNPAIR_P(
SERIAL_ECHOLNPGM_P(
PSTR(" M422 W"), i + 1,
SP_X_STR, z_stepper_align.stepper_xy[i].x,
SP_Y_STR, z_stepper_align.stepper_xy[i].y

74
Marlin/src/gcode/calibrate/G425.cpp

@ -354,44 +354,44 @@ inline void probe_sides(measurements_t &m, const float uncertainty) {
inline void report_measured_faces(const measurements_t &m) {
SERIAL_ECHOLNPGM("Sides:");
#if HAS_Z_AXIS && AXIS_CAN_CALIBRATE(Z)
SERIAL_ECHOLNPAIR(" Top: ", m.obj_side[TOP]);
SERIAL_ECHOLNPGM(" Top: ", m.obj_side[TOP]);
#endif
#if ENABLED(CALIBRATION_MEASURE_LEFT)
SERIAL_ECHOLNPAIR(" Left: ", m.obj_side[LEFT]);
SERIAL_ECHOLNPGM(" Left: ", m.obj_side[LEFT]);
#endif
#if ENABLED(CALIBRATION_MEASURE_RIGHT)
SERIAL_ECHOLNPAIR(" Right: ", m.obj_side[RIGHT]);
SERIAL_ECHOLNPGM(" Right: ", m.obj_side[RIGHT]);
#endif
#if HAS_Y_AXIS
#if ENABLED(CALIBRATION_MEASURE_FRONT)
SERIAL_ECHOLNPAIR(" Front: ", m.obj_side[FRONT]);
SERIAL_ECHOLNPGM(" Front: ", m.obj_side[FRONT]);
#endif
#if ENABLED(CALIBRATION_MEASURE_BACK)
SERIAL_ECHOLNPAIR(" Back: ", m.obj_side[BACK]);
SERIAL_ECHOLNPGM(" Back: ", m.obj_side[BACK]);
#endif
#endif
#if LINEAR_AXES >= 4
#if ENABLED(CALIBRATION_MEASURE_IMIN)
SERIAL_ECHOLNPAIR(" " STR_I_MIN ": ", m.obj_side[IMINIMUM]);
SERIAL_ECHOLNPGM(" " STR_I_MIN ": ", m.obj_side[IMINIMUM]);
#endif
#if ENABLED(CALIBRATION_MEASURE_IMAX)
SERIAL_ECHOLNPAIR(" " STR_I_MAX ": ", m.obj_side[IMAXIMUM]);
SERIAL_ECHOLNPGM(" " STR_I_MAX ": ", m.obj_side[IMAXIMUM]);
#endif
#endif
#if LINEAR_AXES >= 5
#if ENABLED(CALIBRATION_MEASURE_JMIN)
SERIAL_ECHOLNPAIR(" " STR_J_MIN ": ", m.obj_side[JMINIMUM]);
SERIAL_ECHOLNPGM(" " STR_J_MIN ": ", m.obj_side[JMINIMUM]);
#endif
#if ENABLED(CALIBRATION_MEASURE_JMAX)
SERIAL_ECHOLNPAIR(" " STR_J_MAX ": ", m.obj_side[JMAXIMUM]);
SERIAL_ECHOLNPGM(" " STR_J_MAX ": ", m.obj_side[JMAXIMUM]);
#endif
#endif
#if LINEAR_AXES >= 6
#if ENABLED(CALIBRATION_MEASURE_KMIN)
SERIAL_ECHOLNPAIR(" " STR_K_MIN ": ", m.obj_side[KMINIMUM]);
SERIAL_ECHOLNPGM(" " STR_K_MIN ": ", m.obj_side[KMINIMUM]);
#endif
#if ENABLED(CALIBRATION_MEASURE_KMAX)
SERIAL_ECHOLNPAIR(" " STR_K_MAX ": ", m.obj_side[KMAXIMUM]);
SERIAL_ECHOLNPGM(" " STR_K_MAX ": ", m.obj_side[KMAXIMUM]);
#endif
#endif
SERIAL_EOL();
@ -400,20 +400,20 @@ inline void probe_sides(measurements_t &m, const float uncertainty) {
inline void report_measured_center(const measurements_t &m) {
SERIAL_ECHOLNPGM("Center:");
#if HAS_X_CENTER
SERIAL_ECHOLNPAIR_P(SP_X_STR, m.obj_center.x);
SERIAL_ECHOLNPGM_P(SP_X_STR, m.obj_center.x);
#endif
#if HAS_Y_CENTER
SERIAL_ECHOLNPAIR_P(SP_Y_STR, m.obj_center.y);
SERIAL_ECHOLNPGM_P(SP_Y_STR, m.obj_center.y);
#endif
SERIAL_ECHOLNPAIR_P(SP_Z_STR, m.obj_center.z);
SERIAL_ECHOLNPGM_P(SP_Z_STR, m.obj_center.z);
#if HAS_I_CENTER
SERIAL_ECHOLNPAIR_P(SP_I_STR, m.obj_center.i);
SERIAL_ECHOLNPGM_P(SP_I_STR, m.obj_center.i);
#endif
#if HAS_J_CENTER
SERIAL_ECHOLNPAIR_P(SP_J_STR, m.obj_center.j);
SERIAL_ECHOLNPGM_P(SP_J_STR, m.obj_center.j);
#endif
#if HAS_K_CENTER
SERIAL_ECHOLNPAIR_P(SP_K_STR, m.obj_center.k);
SERIAL_ECHOLNPGM_P(SP_K_STR, m.obj_center.k);
#endif
SERIAL_EOL();
}
@ -422,45 +422,45 @@ inline void probe_sides(measurements_t &m, const float uncertainty) {
SERIAL_ECHOLNPGM("Backlash:");
#if AXIS_CAN_CALIBRATE(X)
#if ENABLED(CALIBRATION_MEASURE_LEFT)
SERIAL_ECHOLNPAIR(" Left: ", m.backlash[LEFT]);
SERIAL_ECHOLNPGM(" Left: ", m.backlash[LEFT]);
#endif
#if ENABLED(CALIBRATION_MEASURE_RIGHT)
SERIAL_ECHOLNPAIR(" Right: ", m.backlash[RIGHT]);
SERIAL_ECHOLNPGM(" Right: ", m.backlash[RIGHT]);
#endif
#endif
#if HAS_Y_AXIS && AXIS_CAN_CALIBRATE(Y)
#if ENABLED(CALIBRATION_MEASURE_FRONT)
SERIAL_ECHOLNPAIR(" Front: ", m.backlash[FRONT]);
SERIAL_ECHOLNPGM(" Front: ", m.backlash[FRONT]);
#endif
#if ENABLED(CALIBRATION_MEASURE_BACK)
SERIAL_ECHOLNPAIR(" Back: ", m.backlash[BACK]);
SERIAL_ECHOLNPGM(" Back: ", m.backlash[BACK]);
#endif
#endif
#if HAS_Z_AXIS && AXIS_CAN_CALIBRATE(Z)
SERIAL_ECHOLNPAIR(" Top: ", m.backlash[TOP]);
SERIAL_ECHOLNPGM(" Top: ", m.backlash[TOP]);
#endif
#if LINEAR_AXES >= 4 && AXIS_CAN_CALIBRATE(I)
#if ENABLED(CALIBRATION_MEASURE_IMIN)
SERIAL_ECHOLNPAIR(" " STR_I_MIN ": ", m.backlash[IMINIMUM]);
SERIAL_ECHOLNPGM(" " STR_I_MIN ": ", m.backlash[IMINIMUM]);
#endif
#if ENABLED(CALIBRATION_MEASURE_IMAX)
SERIAL_ECHOLNPAIR(" " STR_I_MAX ": ", m.backlash[IMAXIMUM]);
SERIAL_ECHOLNPGM(" " STR_I_MAX ": ", m.backlash[IMAXIMUM]);
#endif
#endif
#if LINEAR_AXES >= 5 && AXIS_CAN_CALIBRATE(J)
#if ENABLED(CALIBRATION_MEASURE_JMIN)
SERIAL_ECHOLNPAIR(" " STR_J_MIN ": ", m.backlash[JMINIMUM]);
SERIAL_ECHOLNPGM(" " STR_J_MIN ": ", m.backlash[JMINIMUM]);
#endif
#if ENABLED(CALIBRATION_MEASURE_JMAX)
SERIAL_ECHOLNPAIR(" " STR_J_MAX ": ", m.backlash[JMAXIMUM]);
SERIAL_ECHOLNPGM(" " STR_J_MAX ": ", m.backlash[JMAXIMUM]);
#endif
#endif
#if LINEAR_AXES >= 6 && AXIS_CAN_CALIBRATE(K)
#if ENABLED(CALIBRATION_MEASURE_KMIN)
SERIAL_ECHOLNPAIR(" " STR_K_MIN ": ", m.backlash[KMINIMUM]);
SERIAL_ECHOLNPGM(" " STR_K_MIN ": ", m.backlash[KMINIMUM]);
#endif
#if ENABLED(CALIBRATION_MEASURE_KMAX)
SERIAL_ECHOLNPAIR(" " STR_K_MAX ": ", m.backlash[KMAXIMUM]);
SERIAL_ECHOLNPGM(" " STR_K_MAX ": ", m.backlash[KMAXIMUM]);
#endif
#endif
SERIAL_EOL();
@ -471,22 +471,22 @@ inline void probe_sides(measurements_t &m, const float uncertainty) {
SERIAL_ECHO(active_extruder);
SERIAL_ECHOLNPGM(" Positional Error:");
#if HAS_X_CENTER && AXIS_CAN_CALIBRATE(X)
SERIAL_ECHOLNPAIR_P(SP_X_STR, m.pos_error.x);
SERIAL_ECHOLNPGM_P(SP_X_STR, m.pos_error.x);
#endif
#if HAS_Y_CENTER && AXIS_CAN_CALIBRATE(Y)
SERIAL_ECHOLNPAIR_P(SP_Y_STR, m.pos_error.y);
SERIAL_ECHOLNPGM_P(SP_Y_STR, m.pos_error.y);
#endif
#if HAS_Z_AXIS && AXIS_CAN_CALIBRATE(Z)
SERIAL_ECHOLNPAIR_P(SP_Z_STR, m.pos_error.z);
SERIAL_ECHOLNPGM_P(SP_Z_STR, m.pos_error.z);
#endif
#if HAS_I_CENTER && AXIS_CAN_CALIBRATE(I)
SERIAL_ECHOLNPAIR_P(SP_I_STR, m.pos_error.i);
SERIAL_ECHOLNPGM_P(SP_I_STR, m.pos_error.i);
#endif
#if HAS_J_CENTER && AXIS_CAN_CALIBRATE(J)
SERIAL_ECHOLNPAIR_P(SP_J_STR, m.pos_error.j);
SERIAL_ECHOLNPGM_P(SP_J_STR, m.pos_error.j);
#endif
#if HAS_K_CENTER && AXIS_CAN_CALIBRATE(K)
SERIAL_ECHOLNPAIR_P(SP_Z_STR, m.pos_error.z);
SERIAL_ECHOLNPGM_P(SP_Z_STR, m.pos_error.z);
#endif
SERIAL_EOL();
}
@ -494,10 +494,10 @@ inline void probe_sides(measurements_t &m, const float uncertainty) {
inline void report_measured_nozzle_dimensions(const measurements_t &m) {
SERIAL_ECHOLNPGM("Nozzle Tip Outer Dimensions:");
#if HAS_X_CENTER
SERIAL_ECHOLNPAIR_P(SP_X_STR, m.nozzle_outer_dimension.x);
SERIAL_ECHOLNPGM_P(SP_X_STR, m.nozzle_outer_dimension.x);
#endif
#if HAS_Y_CENTER
SERIAL_ECHOLNPAIR_P(SP_Y_STR, m.nozzle_outer_dimension.y);
SERIAL_ECHOLNPGM_P(SP_Y_STR, m.nozzle_outer_dimension.y);
#endif
SERIAL_EOL();
UNUSED(m);
@ -509,7 +509,7 @@ inline void probe_sides(measurements_t &m, const float uncertainty) {
//
inline void report_hotend_offsets() {
LOOP_S_L_N(e, 1, HOTENDS)
SERIAL_ECHOLNPAIR_P(PSTR("T"), e, PSTR(" Hotend Offset X"), hotend_offset[e].x, SP_Y_STR, hotend_offset[e].y, SP_Z_STR, hotend_offset[e].z);
SERIAL_ECHOLNPGM_P(PSTR("T"), e, PSTR(" Hotend Offset X"), hotend_offset[e].x, SP_Y_STR, hotend_offset[e].y, SP_Z_STR, hotend_offset[e].z);
}
#endif

10
Marlin/src/gcode/calibrate/G76_M192_M871.cpp

@ -171,7 +171,7 @@ void GcodeSuite::G76() {
millis_t next_temp_report = millis() + 1000;
auto report_targets = [&](const celsius_t tb, const celsius_t tp) {
SERIAL_ECHOLNPAIR("Target Bed:", tb, " Probe:", tp);
SERIAL_ECHOLNPGM("Target Bed:", tb, " Probe:", tp);
};
if (do_bed_cal) {
@ -211,7 +211,7 @@ void GcodeSuite::G76() {
if (isnan(measured_z) || target_bed > (BED_MAX_TARGET)) break;
}
SERIAL_ECHOLNPAIR("Retrieved measurements: ", temp_comp.get_index());
SERIAL_ECHOLNPGM("Retrieved measurements: ", temp_comp.get_index());
if (temp_comp.finish_calibration(TSI_BED)) {
say_successfully_calibrated();
SERIAL_ECHOLNPGM(" bed.");
@ -255,7 +255,7 @@ void GcodeSuite::G76() {
do_blocking_move_to(noz_pos_xyz);
say_waiting_for_probe_heating();
SERIAL_ECHOLNPAIR(" Bed:", target_bed, " Probe:", target_probe);
SERIAL_ECHOLNPGM(" Bed:", target_bed, " Probe:", target_probe);
const millis_t probe_timeout_ms = millis() + SEC_TO_MS(900UL);
while (thermalManager.degProbe() < target_probe) {
if (report_temps(next_temp_report, probe_timeout_ms)) {
@ -270,7 +270,7 @@ void GcodeSuite::G76() {
if (isnan(measured_z) || target_probe > cali_info_init[TSI_PROBE].end_temp) break;
}
SERIAL_ECHOLNPAIR("Retrieved measurements: ", temp_comp.get_index());
SERIAL_ECHOLNPGM("Retrieved measurements: ", temp_comp.get_index());
if (temp_comp.finish_calibration(TSI_PROBE))
say_successfully_calibrated();
else
@ -325,7 +325,7 @@ void GcodeSuite::M871() {
TSI_PROBE
);
if (idx > 0 && temp_comp.set_offset(mod, idx - 1, offset_val))
SERIAL_ECHOLNPAIR("Set value: ", offset_val);
SERIAL_ECHOLNPGM("Set value: ", offset_val);
else
SERIAL_ECHOLNPGM("!Invalid index. Failed to set value (note: value at index 0 is constant).");

36
Marlin/src/gcode/calibrate/M100.cpp

@ -202,7 +202,7 @@ inline int check_for_free_memory_corruption(PGM_P const title) {
char *start_free_memory = free_memory_start, *end_free_memory = free_memory_end;
int n = end_free_memory - start_free_memory;
SERIAL_ECHOLNPAIR("\nfmc() n=", n,
SERIAL_ECHOLNPGM("\nfmc() n=", n,
"\nfree_memory_start=", hex_address(free_memory_start),
" end=", hex_address(end_free_memory));
@ -227,15 +227,15 @@ inline int check_for_free_memory_corruption(PGM_P const title) {
if (start_free_memory[i] == TEST_BYTE) {
int32_t j = count_test_bytes(start_free_memory + i);
if (j > 8) {
//SERIAL_ECHOPAIR("Found ", j);
//SERIAL_ECHOLNPAIR(" bytes free at ", hex_address(start_free_memory + i));
//SERIAL_ECHOPGM("Found ", j);
//SERIAL_ECHOLNPGM(" bytes free at ", hex_address(start_free_memory + i));
i += j;
block_cnt++;
SERIAL_ECHOLNPAIR(" (", block_cnt, ") found=", j);
SERIAL_ECHOLNPGM(" (", block_cnt, ") found=", j);
}
}
}
SERIAL_ECHOPAIR(" block_found=", block_cnt);
SERIAL_ECHOPGM(" block_found=", block_cnt);
if (block_cnt != 1)
SERIAL_ECHOLNPGM("\nMemory Corruption detected in free memory area.");
@ -267,7 +267,7 @@ inline void free_memory_pool_report(char * const start_free_memory, const int32_
if (*addr == TEST_BYTE) {
const int32_t j = count_test_bytes(addr);
if (j > 8) {
SERIAL_ECHOLNPAIR("Found ", j, " bytes free at ", hex_address(addr));
SERIAL_ECHOLNPGM("Found ", j, " bytes free at ", hex_address(addr));
if (j > max_cnt) {
max_cnt = j;
max_addr = addr;
@ -277,11 +277,11 @@ inline void free_memory_pool_report(char * const start_free_memory, const int32_
}
}
}
if (block_cnt > 1) SERIAL_ECHOLNPAIR(
if (block_cnt > 1) SERIAL_ECHOLNPGM(
"\nMemory Corruption detected in free memory area."
"\nLargest free block is ", max_cnt, " bytes at ", hex_address(max_addr)
);
SERIAL_ECHOLNPAIR("check_for_free_memory_corruption() = ", check_for_free_memory_corruption(PSTR("M100 F ")));
SERIAL_ECHOLNPGM("check_for_free_memory_corruption() = ", check_for_free_memory_corruption(PSTR("M100 F ")));
}
#if ENABLED(M100_FREE_MEMORY_CORRUPTOR)
@ -299,7 +299,7 @@ inline void free_memory_pool_report(char * const start_free_memory, const int32_
for (uint32_t i = 1; i <= size; i++) {
char * const addr = start_free_memory + i * j;
*addr = i;
SERIAL_ECHOPAIR("\nCorrupting address: ", hex_address(addr));
SERIAL_ECHOPGM("\nCorrupting address: ", hex_address(addr));
}
SERIAL_EOL();
}
@ -327,8 +327,8 @@ inline void init_free_memory(char *start_free_memory, int32_t size) {
for (int32_t i = 0; i < size; i++) {
if (start_free_memory[i] != TEST_BYTE) {
SERIAL_ECHOPAIR("? address : ", hex_address(start_free_memory + i));
SERIAL_ECHOLNPAIR("=", hex_byte(start_free_memory[i]));
SERIAL_ECHOPGM("? address : ", hex_address(start_free_memory + i));
SERIAL_ECHOLNPGM("=", hex_byte(start_free_memory[i]));
SERIAL_EOL();
}
}
@ -340,14 +340,14 @@ inline void init_free_memory(char *start_free_memory, int32_t size) {
void GcodeSuite::M100() {
char *sp = top_of_stack();
if (!free_memory_end) free_memory_end = sp - MEMORY_END_CORRECTION;
SERIAL_ECHOPAIR("\nbss_end : ", hex_address(end_bss));
if (heaplimit) SERIAL_ECHOPAIR("\n__heaplimit : ", hex_address(heaplimit));
SERIAL_ECHOPAIR("\nfree_memory_start : ", hex_address(free_memory_start));
if (stacklimit) SERIAL_ECHOPAIR("\n__stacklimit : ", hex_address(stacklimit));
SERIAL_ECHOPAIR("\nfree_memory_end : ", hex_address(free_memory_end));
SERIAL_ECHOPGM("\nbss_end : ", hex_address(end_bss));
if (heaplimit) SERIAL_ECHOPGM("\n__heaplimit : ", hex_address(heaplimit));
SERIAL_ECHOPGM("\nfree_memory_start : ", hex_address(free_memory_start));
if (stacklimit) SERIAL_ECHOPGM("\n__stacklimit : ", hex_address(stacklimit));
SERIAL_ECHOPGM("\nfree_memory_end : ", hex_address(free_memory_end));
if (MEMORY_END_CORRECTION)
SERIAL_ECHOPAIR("\nMEMORY_END_CORRECTION : ", MEMORY_END_CORRECTION);
SERIAL_ECHOLNPAIR("\nStack Pointer : ", hex_address(sp));
SERIAL_ECHOPGM("\nMEMORY_END_CORRECTION : ", MEMORY_END_CORRECTION);
SERIAL_ECHOLNPGM("\nStack Pointer : ", hex_address(sp));
// Always init on the first invocation of M100
static bool m100_not_initialized = true;

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

@ -86,7 +86,7 @@ void GcodeSuite::M425() {
SERIAL_ECHOPGM("Backlash Correction ");
if (!backlash.correction) SERIAL_ECHOPGM("in");
SERIAL_ECHOLNPGM("active:");
SERIAL_ECHOLNPAIR(" Correction Amount/Fade-out: F", backlash.get_correction(), " (F1.0 = full, F0.0 = none)");
SERIAL_ECHOLNPGM(" Correction Amount/Fade-out: F", backlash.get_correction(), " (F1.0 = full, F0.0 = none)");
SERIAL_ECHOPGM(" Backlash Distance (mm): ");
LOOP_LINEAR_AXES(a) if (axis_can_calibrate(a)) {
SERIAL_CHAR(' ', AXIS_CHAR(a));
@ -95,7 +95,7 @@ void GcodeSuite::M425() {
}
#ifdef BACKLASH_SMOOTHING_MM
SERIAL_ECHOLNPAIR(" Smoothing (mm): S", backlash.smoothing_mm);
SERIAL_ECHOLNPGM(" Smoothing (mm): S", backlash.smoothing_mm);
#endif
#if ENABLED(MEASURE_BACKLASH_WHEN_PROBING)
@ -115,7 +115,7 @@ void GcodeSuite::M425() {
void GcodeSuite::M425_report(const bool forReplay/*=true*/) {
report_heading_etc(forReplay, PSTR(STR_BACKLASH_COMPENSATION));
SERIAL_ECHOLNPAIR_P(
SERIAL_ECHOLNPGM_P(
PSTR(" M425 F"), backlash.get_correction()
#ifdef BACKLASH_SMOOTHING_MM
, PSTR(" S"), LINEAR_UNIT(backlash.smoothing_mm)

8
Marlin/src/gcode/calibrate/M48.cpp

@ -162,7 +162,7 @@ void GcodeSuite::M48() {
#endif
);
if (verbose_level > 3) {
SERIAL_ECHOPAIR("Start radius:", radius, " angle:", angle, " dir:");
SERIAL_ECHOPGM("Start radius:", radius, " angle:", angle, " dir:");
if (dir > 0) SERIAL_CHAR('C');
SERIAL_ECHOLNPGM("CW");
}
@ -200,7 +200,7 @@ void GcodeSuite::M48() {
while (!probe.can_reach(next_pos)) {
next_pos *= 0.8f;
if (verbose_level > 3)
SERIAL_ECHOLNPAIR_P(PSTR("Moving inward: X"), next_pos.x, SP_Y_STR, next_pos.y);
SERIAL_ECHOLNPGM_P(PSTR("Moving inward: X"), next_pos.x, SP_Y_STR, next_pos.y);
}
#elif HAS_ENDSTOPS
// For a rectangular bed just keep the probe in bounds
@ -209,7 +209,7 @@ void GcodeSuite::M48() {
#endif
if (verbose_level > 3)
SERIAL_ECHOLNPAIR_P(PSTR("Going to: X"), next_pos.x, SP_Y_STR, next_pos.y);
SERIAL_ECHOLNPGM_P(PSTR("Going to: X"), next_pos.x, SP_Y_STR, next_pos.y);
do_blocking_move_to_xy(next_pos);
} // n_legs loop
@ -241,7 +241,7 @@ void GcodeSuite::M48() {
if (verbose_level > 1) {
SERIAL_ECHO(n + 1);
SERIAL_ECHOPAIR(" of ", n_samples);
SERIAL_ECHOPGM(" of ", n_samples);
SERIAL_ECHOPAIR_F(": z: ", pz, 3);
SERIAL_CHAR(' ');
dev_report(verbose_level > 2, mean, sigma, min, max);

4
Marlin/src/gcode/calibrate/M665.cpp

@ -63,7 +63,7 @@
void GcodeSuite::M665_report(const bool forReplay/*=true*/) {
report_heading_etc(forReplay, PSTR(STR_DELTA_SETTINGS));
SERIAL_ECHOLNPAIR_P(
SERIAL_ECHOLNPGM_P(
PSTR(" M665 L"), LINEAR_UNIT(delta_diagonal_rod)
, PSTR(" R"), LINEAR_UNIT(delta_radius)
, PSTR(" H"), LINEAR_UNIT(delta_height)
@ -133,7 +133,7 @@
void GcodeSuite::M665_report(const bool forReplay/*=true*/) {
report_heading_etc(forReplay, PSTR(STR_SCARA_SETTINGS " (" STR_SCARA_S TERN_(HAS_SCARA_OFFSET, " " STR_SCARA_P_T_Z) ")"));
SERIAL_ECHOLNPAIR_P(
SERIAL_ECHOLNPGM_P(
PSTR(" M665 S"), segments_per_second
#if HAS_SCARA_OFFSET
, SP_P_STR, scara_home_offset.a

18
Marlin/src/gcode/calibrate/M666.cpp

@ -52,17 +52,17 @@
is_err = true;
else {
delta_endstop_adj[i] = v;
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("delta_endstop_adj[", AS_CHAR(AXIS_CHAR(i)), "] = ", v);
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("delta_endstop_adj[", AS_CHAR(AXIS_CHAR(i)), "] = ", v);
}
}
}
if (is_err) SERIAL_ECHOLNPAIR("?M666 offsets must be <= 0");
if (is_err) SERIAL_ECHOLNPGM("?M666 offsets must be <= 0");
if (!is_set) M666_report();
}
void GcodeSuite::M666_report(const bool forReplay/*=true*/) {
report_heading_etc(forReplay, PSTR(STR_ENDSTOP_ADJUSTMENT));
SERIAL_ECHOLNPAIR_P(
SERIAL_ECHOLNPGM_P(
PSTR(" M666 X"), LINEAR_UNIT(delta_endstop_adj.a)
, SP_Y_STR, LINEAR_UNIT(delta_endstop_adj.b)
, SP_Z_STR, LINEAR_UNIT(delta_endstop_adj.c)
@ -108,22 +108,22 @@
report_heading_etc(forReplay, PSTR(STR_ENDSTOP_ADJUSTMENT));
SERIAL_ECHOPGM(" M666");
#if ENABLED(X_DUAL_ENDSTOPS)
SERIAL_ECHOLNPAIR_P(SP_X_STR, LINEAR_UNIT(endstops.x2_endstop_adj));
SERIAL_ECHOLNPGM_P(SP_X_STR, LINEAR_UNIT(endstops.x2_endstop_adj));
#endif
#if ENABLED(Y_DUAL_ENDSTOPS)
SERIAL_ECHOLNPAIR_P(SP_Y_STR, LINEAR_UNIT(endstops.y2_endstop_adj));
SERIAL_ECHOLNPGM_P(SP_Y_STR, LINEAR_UNIT(endstops.y2_endstop_adj));
#endif
#if ENABLED(Z_MULTI_ENDSTOPS)
#if NUM_Z_STEPPER_DRIVERS >= 3
SERIAL_ECHOPAIR(" S2 Z", LINEAR_UNIT(endstops.z3_endstop_adj));
SERIAL_ECHOPGM(" S2 Z", LINEAR_UNIT(endstops.z3_endstop_adj));
report_echo_start(forReplay);
SERIAL_ECHOPAIR(" M666 S3 Z", LINEAR_UNIT(endstops.z3_endstop_adj));
SERIAL_ECHOPGM(" M666 S3 Z", LINEAR_UNIT(endstops.z3_endstop_adj));
#if NUM_Z_STEPPER_DRIVERS >= 4
report_echo_start(forReplay);
SERIAL_ECHOPAIR(" M666 S4 Z", LINEAR_UNIT(endstops.z4_endstop_adj));
SERIAL_ECHOPGM(" M666 S4 Z", LINEAR_UNIT(endstops.z4_endstop_adj));
#endif
#else
SERIAL_ECHOLNPAIR_P(SP_Z_STR, LINEAR_UNIT(endstops.z2_endstop_adj));
SERIAL_ECHOLNPGM_P(SP_Z_STR, LINEAR_UNIT(endstops.z2_endstop_adj));
#endif
#endif
}

18
Marlin/src/gcode/config/M200-M205.cpp

@ -84,7 +84,7 @@
#if EXTRUDERS == 1
{
SERIAL_ECHOLNPAIR(
SERIAL_ECHOLNPGM(
" M200 S", parser.volumetric_enabled, " D", LINEAR_UNIT(planner.filament_size[0])
#if ENABLED(VOLUMETRIC_EXTRUDER_LIMIT)
, " L", LINEAR_UNIT(planner.volumetric_extruder_limit[0])
@ -92,10 +92,10 @@
);
}
#else
SERIAL_ECHOLNPAIR(" M200 S", parser.volumetric_enabled);
SERIAL_ECHOLNPGM(" M200 S", parser.volumetric_enabled);
LOOP_L_N(i, EXTRUDERS) {
report_echo_start(forReplay);
SERIAL_ECHOLNPAIR(
SERIAL_ECHOLNPGM(
" M200 T", i, " D", LINEAR_UNIT(planner.filament_size[i])
#if ENABLED(VOLUMETRIC_EXTRUDER_LIMIT)
, " L", LINEAR_UNIT(planner.volumetric_extruder_limit[i])
@ -134,7 +134,7 @@ void GcodeSuite::M201() {
void GcodeSuite::M201_report(const bool forReplay/*=true*/) {
report_heading_etc(forReplay, PSTR(STR_MAX_ACCELERATION));
SERIAL_ECHOLNPAIR_P(
SERIAL_ECHOLNPGM_P(
LIST_N(DOUBLE(LINEAR_AXES),
PSTR(" M201 X"), LINEAR_UNIT(planner.settings.max_acceleration_mm_per_s2[X_AXIS]),
SP_Y_STR, LINEAR_UNIT(planner.settings.max_acceleration_mm_per_s2[Y_AXIS]),
@ -150,7 +150,7 @@ void GcodeSuite::M201_report(const bool forReplay/*=true*/) {
#if ENABLED(DISTINCT_E_FACTORS)
LOOP_L_N(i, E_STEPPERS) {
report_echo_start(forReplay);
SERIAL_ECHOLNPAIR_P(
SERIAL_ECHOLNPGM_P(
PSTR(" M201 T"), i
, SP_E_STR, VOLUMETRIC_UNIT(planner.settings.max_acceleration_mm_per_s2[E_AXIS_N(i)])
);
@ -179,7 +179,7 @@ void GcodeSuite::M203() {
void GcodeSuite::M203_report(const bool forReplay/*=true*/) {
report_heading_etc(forReplay, PSTR(STR_MAX_FEEDRATES));
SERIAL_ECHOLNPAIR_P(
SERIAL_ECHOLNPGM_P(
LIST_N(DOUBLE(LINEAR_AXES),
PSTR(" M203 X"), LINEAR_UNIT(planner.settings.max_feedrate_mm_s[X_AXIS]),
SP_Y_STR, LINEAR_UNIT(planner.settings.max_feedrate_mm_s[Y_AXIS]),
@ -195,7 +195,7 @@ void GcodeSuite::M203_report(const bool forReplay/*=true*/) {
#if ENABLED(DISTINCT_E_FACTORS)
LOOP_L_N(i, E_STEPPERS) {
SERIAL_ECHO_START();
SERIAL_ECHOLNPAIR_P(
SERIAL_ECHOLNPGM_P(
PSTR(" M203 T"), i
, SP_E_STR, VOLUMETRIC_UNIT(planner.settings.max_feedrate_mm_s[E_AXIS_N(i)])
);
@ -225,7 +225,7 @@ void GcodeSuite::M204() {
void GcodeSuite::M204_report(const bool forReplay/*=true*/) {
report_heading_etc(forReplay, PSTR(STR_ACCELERATION_P_R_T));
SERIAL_ECHOLNPAIR_P(
SERIAL_ECHOLNPGM_P(
PSTR(" M204 P"), LINEAR_UNIT(planner.settings.acceleration)
, PSTR(" R"), LINEAR_UNIT(planner.settings.retract_acceleration)
, SP_T_STR, LINEAR_UNIT(planner.settings.travel_acceleration)
@ -292,7 +292,7 @@ void GcodeSuite::M205_report(const bool forReplay/*=true*/) {
TERN_(HAS_CLASSIC_E_JERK, " E<max_e_jerk>")
")"
));
SERIAL_ECHOLNPAIR_P(
SERIAL_ECHOLNPGM_P(
PSTR(" M205 B"), LINEAR_UNIT(planner.settings.min_segment_time_us)
, PSTR(" S"), LINEAR_UNIT(planner.settings.min_feedrate_mm_s)
, SP_T_STR, LINEAR_UNIT(planner.settings.min_travel_feedrate_mm_s)

20
Marlin/src/gcode/config/M217.cpp

@ -136,33 +136,33 @@ void GcodeSuite::M217_report(const bool forReplay/*=true*/) {
SERIAL_ECHOPGM(" M217");
#if ENABLED(TOOLCHANGE_FILAMENT_SWAP)
SERIAL_ECHOPAIR(" S", LINEAR_UNIT(toolchange_settings.swap_length));
SERIAL_ECHOPAIR_P(SP_B_STR, LINEAR_UNIT(toolchange_settings.extra_resume),
SERIAL_ECHOPGM(" S", LINEAR_UNIT(toolchange_settings.swap_length));
SERIAL_ECHOPGM_P(SP_B_STR, LINEAR_UNIT(toolchange_settings.extra_resume),
SP_E_STR, LINEAR_UNIT(toolchange_settings.extra_prime),
SP_P_STR, LINEAR_UNIT(toolchange_settings.prime_speed));
SERIAL_ECHOPAIR(" R", LINEAR_UNIT(toolchange_settings.retract_speed),
SERIAL_ECHOPGM(" R", LINEAR_UNIT(toolchange_settings.retract_speed),
" U", LINEAR_UNIT(toolchange_settings.unretract_speed),
" F", toolchange_settings.fan_speed,
" G", toolchange_settings.fan_time);
#if ENABLED(TOOLCHANGE_MIGRATION_FEATURE)
SERIAL_ECHOPAIR(" A", migration.automode);
SERIAL_ECHOPAIR(" L", LINEAR_UNIT(migration.last));
SERIAL_ECHOPGM(" A", migration.automode);
SERIAL_ECHOPGM(" L", LINEAR_UNIT(migration.last));
#endif
#if ENABLED(TOOLCHANGE_PARK)
SERIAL_ECHOPAIR(" W", LINEAR_UNIT(toolchange_settings.enable_park));
SERIAL_ECHOPAIR_P(SP_X_STR, LINEAR_UNIT(toolchange_settings.change_point.x));
SERIAL_ECHOPAIR_P(SP_Y_STR, LINEAR_UNIT(toolchange_settings.change_point.y));
SERIAL_ECHOPGM(" W", LINEAR_UNIT(toolchange_settings.enable_park));
SERIAL_ECHOPGM_P(SP_X_STR, LINEAR_UNIT(toolchange_settings.change_point.x));
SERIAL_ECHOPGM_P(SP_Y_STR, LINEAR_UNIT(toolchange_settings.change_point.y));
#endif
#if ENABLED(TOOLCHANGE_FS_PRIME_FIRST_USED)
SERIAL_ECHOPAIR(" V", LINEAR_UNIT(enable_first_prime));
SERIAL_ECHOPGM(" V", LINEAR_UNIT(enable_first_prime));
#endif
#endif
SERIAL_ECHOLNPAIR_P(SP_Z_STR, LINEAR_UNIT(toolchange_settings.z_raise));
SERIAL_ECHOLNPGM_P(SP_Z_STR, LINEAR_UNIT(toolchange_settings.z_raise));
}
#endif // HAS_MULTI_EXTRUDER

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

@ -60,7 +60,7 @@ void GcodeSuite::M218_report(const bool forReplay/*=true*/) {
report_heading_etc(forReplay, PSTR(STR_HOTEND_OFFSETS));
LOOP_S_L_N(e, 1, HOTENDS) {
report_echo_start(forReplay);
SERIAL_ECHOPAIR_P(
SERIAL_ECHOPGM_P(
PSTR(" M218 T"), e,
SP_X_STR, LINEAR_UNIT(hotend_offset[e].x),
SP_Y_STR, LINEAR_UNIT(hotend_offset[e].y)

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

@ -44,7 +44,7 @@ void GcodeSuite::M220() {
if (parser.seenval('S')) feedrate_percentage = parser.value_int();
if (!parser.seen_any()) {
SERIAL_ECHOPAIR("FR:", feedrate_percentage);
SERIAL_ECHOPGM("FR:", feedrate_percentage);
SERIAL_CHAR('%');
SERIAL_EOL();
}

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

@ -38,7 +38,7 @@ void GcodeSuite::M221() {
else {
SERIAL_ECHO_START();
SERIAL_CHAR('E', '0' + target_extruder);
SERIAL_ECHOPAIR(" Flow: ", planner.flow_percentage[target_extruder]);
SERIAL_ECHOPGM(" Flow: ", planner.flow_percentage[target_extruder]);
SERIAL_CHAR('%');
SERIAL_EOL();
}

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

@ -69,7 +69,7 @@ void GcodeSuite::M281_report(const bool forReplay/*=true*/) {
case Z_PROBE_SERVO_NR:
#endif
report_echo_start(forReplay);
SERIAL_ECHOLNPAIR(" M281 P", i, " L", servo_angles[i][0], " U", servo_angles[i][1]);
SERIAL_ECHOLNPGM(" M281 P", i, " L", servo_angles[i][0], " U", servo_angles[i][1]);
}
}
}

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

@ -83,7 +83,7 @@ void GcodeSuite::M301_report(const bool forReplay/*=true*/, const int8_t eindex/
HOTEND_LOOP() {
if (e == eindex || eindex == -1) {
report_echo_start(forReplay);
SERIAL_ECHOPAIR_P(
SERIAL_ECHOPGM_P(
#if ENABLED(PID_PARAMS_PER_HOTEND)
PSTR(" M301 E"), e, SP_P_STR
#else
@ -94,11 +94,11 @@ void GcodeSuite::M301_report(const bool forReplay/*=true*/, const int8_t eindex/
, PSTR(" D"), unscalePID_d(PID_PARAM(Kd, e))
);
#if ENABLED(PID_EXTRUSION_SCALING)
SERIAL_ECHOPAIR_P(SP_C_STR, PID_PARAM(Kc, e));
if (e == 0) SERIAL_ECHOPAIR(" L", thermalManager.lpq_len);
SERIAL_ECHOPGM_P(SP_C_STR, PID_PARAM(Kc, e));
if (e == 0) SERIAL_ECHOPGM(" L", thermalManager.lpq_len);
#endif
#if ENABLED(PID_FAN_SCALING)
SERIAL_ECHOPAIR(" F", PID_PARAM(Kf, e));
SERIAL_ECHOPGM(" F", PID_PARAM(Kf, e));
#endif
SERIAL_EOL();
}

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

@ -56,7 +56,7 @@ void GcodeSuite::M302() {
SERIAL_ECHO_START();
SERIAL_ECHOPGM("Cold extrudes are ");
SERIAL_ECHOPGM_P(thermalManager.allow_cold_extrude ? PSTR("en") : PSTR("dis"));
SERIAL_ECHOLNPAIR("abled (min temp ", thermalManager.extrude_min_temp, "C)");
SERIAL_ECHOLNPGM("abled (min temp ", thermalManager.extrude_min_temp, "C)");
}
}

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

@ -43,7 +43,7 @@ void GcodeSuite::M309() {
void GcodeSuite::M309_report(const bool forReplay/*=true*/) {
report_heading_etc(forReplay, PSTR(STR_CHAMBER_PID));
SERIAL_ECHOLNPAIR(
SERIAL_ECHOLNPGM(
" M309 P", thermalManager.temp_chamber.pid.Kp
, " I", unscalePID_i(thermalManager.temp_chamber.pid.Ki)
, " D", unscalePID_d(thermalManager.temp_chamber.pid.Kd)

12
Marlin/src/gcode/config/M43.cpp

@ -130,7 +130,7 @@ inline void servo_probe_test() {
const uint8_t probe_index = parser.byteval('P', Z_PROBE_SERVO_NR);
SERIAL_ECHOLNPAIR("Servo probe test\n"
SERIAL_ECHOLNPGM("Servo probe test\n"
". using index: ", probe_index,
", deploy angle: ", servo_angles[probe_index][0],
", stow angle: ", servo_angles[probe_index][1]
@ -143,7 +143,7 @@ inline void servo_probe_test() {
#define PROBE_TEST_PIN Z_MIN_PIN
constexpr bool probe_inverting = Z_MIN_ENDSTOP_INVERTING;
SERIAL_ECHOLNPAIR(". Probe Z_MIN_PIN: ", PROBE_TEST_PIN);
SERIAL_ECHOLNPGM(". Probe Z_MIN_PIN: ", PROBE_TEST_PIN);
SERIAL_ECHOPGM(". Z_MIN_ENDSTOP_INVERTING: ");
#else
@ -151,7 +151,7 @@ inline void servo_probe_test() {
#define PROBE_TEST_PIN Z_MIN_PROBE_PIN
constexpr bool probe_inverting = Z_MIN_PROBE_ENDSTOP_INVERTING;
SERIAL_ECHOLNPAIR(". Probe Z_MIN_PROBE_PIN: ", PROBE_TEST_PIN);
SERIAL_ECHOLNPGM(". Probe Z_MIN_PROBE_PIN: ", PROBE_TEST_PIN);
SERIAL_ECHOPGM( ". Z_MIN_PROBE_ENDSTOP_INVERTING: ");
#endif
@ -211,11 +211,11 @@ inline void servo_probe_test() {
if (deploy_state != stow_state) {
SERIAL_ECHOLNPGM("= Mechanical Switch detected");
if (deploy_state) {
SERIAL_ECHOLNPAIR(" DEPLOYED state: HIGH (logic 1)",
SERIAL_ECHOLNPGM(" DEPLOYED state: HIGH (logic 1)",
" STOWED (triggered) state: LOW (logic 0)");
}
else {
SERIAL_ECHOLNPAIR(" DEPLOYED state: LOW (logic 0)",
SERIAL_ECHOLNPGM(" DEPLOYED state: LOW (logic 0)",
" STOWED (triggered) state: HIGH (logic 1)");
}
#if ENABLED(BLTOUCH)
@ -244,7 +244,7 @@ inline void servo_probe_test() {
if (probe_counter == 15)
SERIAL_ECHOLNPGM(": 30ms or more");
else
SERIAL_ECHOLNPAIR(" (+/- 4ms): ", probe_counter * 2);
SERIAL_ECHOLNPGM(" (+/- 4ms): ", probe_counter * 2);
if (probe_counter >= 4) {
if (probe_counter == 15) {

10
Marlin/src/gcode/config/M92.cpp

@ -78,10 +78,10 @@ void GcodeSuite::M92() {
micro_steps = argH ?: Z_MICROSTEPS;
const float z_full_step_mm = micro_steps * planner.steps_to_mm[Z_AXIS];
SERIAL_ECHO_START();
SERIAL_ECHOPAIR("{ micro_steps:", micro_steps, ", z_full_step_mm:", z_full_step_mm);
SERIAL_ECHOPGM("{ micro_steps:", micro_steps, ", z_full_step_mm:", z_full_step_mm);
if (wanted) {
const float best = uint16_t(wanted / z_full_step_mm) * z_full_step_mm;
SERIAL_ECHOPAIR(", best:[", best);
SERIAL_ECHOPGM(", best:[", best);
if (best != wanted) { SERIAL_CHAR(','); SERIAL_DECIMAL(best + z_full_step_mm); }
SERIAL_CHAR(']');
}
@ -92,7 +92,7 @@ void GcodeSuite::M92() {
void GcodeSuite::M92_report(const bool forReplay/*=true*/, const int8_t e/*=-1*/) {
report_heading_etc(forReplay, PSTR(STR_STEPS_PER_UNIT));
SERIAL_ECHOPAIR_P(LIST_N(DOUBLE(LINEAR_AXES),
SERIAL_ECHOPGM_P(LIST_N(DOUBLE(LINEAR_AXES),
PSTR(" M92 X"), LINEAR_UNIT(planner.settings.axis_steps_per_mm[X_AXIS]),
SP_Y_STR, LINEAR_UNIT(planner.settings.axis_steps_per_mm[Y_AXIS]),
SP_Z_STR, LINEAR_UNIT(planner.settings.axis_steps_per_mm[Z_AXIS]),
@ -101,7 +101,7 @@ void GcodeSuite::M92_report(const bool forReplay/*=true*/, const int8_t e/*=-1*/
SP_K_STR, LINEAR_UNIT(planner.settings.axis_steps_per_mm[K_AXIS]))
);
#if HAS_EXTRUDERS && DISABLED(DISTINCT_E_FACTORS)
SERIAL_ECHOPAIR_P(SP_E_STR, VOLUMETRIC_UNIT(planner.settings.axis_steps_per_mm[E_AXIS]));
SERIAL_ECHOPGM_P(SP_E_STR, VOLUMETRIC_UNIT(planner.settings.axis_steps_per_mm[E_AXIS]));
#endif
SERIAL_EOL();
@ -109,7 +109,7 @@ void GcodeSuite::M92_report(const bool forReplay/*=true*/, const int8_t e/*=-1*/
LOOP_L_N(i, E_STEPPERS) {
if (e >= 0 && i != e) continue;
report_echo_start(forReplay);
SERIAL_ECHOLNPAIR_P(
SERIAL_ECHOLNPGM_P(
PSTR(" M92 T"), i,
SP_E_STR, VOLUMETRIC_UNIT(planner.settings.axis_steps_per_mm[E_AXIS_N(i)])
);

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

@ -57,19 +57,19 @@ void GcodeSuite::M111() {
SERIAL_ECHOPGM(STR_DEBUG_OFF);
#if !defined(__AVR__) || !defined(USBCON)
#if ENABLED(SERIAL_STATS_RX_BUFFER_OVERRUNS)
SERIAL_ECHOPAIR("\nBuffer Overruns: ", MYSERIAL1.buffer_overruns());
SERIAL_ECHOPGM("\nBuffer Overruns: ", MYSERIAL1.buffer_overruns());
#endif
#if ENABLED(SERIAL_STATS_RX_FRAMING_ERRORS)
SERIAL_ECHOPAIR("\nFraming Errors: ", MYSERIAL1.framing_errors());
SERIAL_ECHOPGM("\nFraming Errors: ", MYSERIAL1.framing_errors());
#endif
#if ENABLED(SERIAL_STATS_DROPPED_RX)
SERIAL_ECHOPAIR("\nDropped bytes: ", MYSERIAL1.dropped());
SERIAL_ECHOPGM("\nDropped bytes: ", MYSERIAL1.dropped());
#endif
#if ENABLED(SERIAL_STATS_MAX_RX_QUEUED)
SERIAL_ECHOPAIR("\nMax RX Queue Size: ", MYSERIAL1.rxMaxEnqueued());
SERIAL_ECHOPGM("\nMax RX Queue Size: ", MYSERIAL1.rxMaxEnqueued());
#endif
#endif // !__AVR__ || !USBCON
}

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

@ -41,7 +41,7 @@ void GcodeSuite::M211() {
void GcodeSuite::M211_report(const bool forReplay/*=true*/) {
report_heading_etc(forReplay, PSTR(STR_SOFT_ENDSTOPS));
SERIAL_ECHOPAIR(" M211 S", AS_DIGIT(soft_endstop._enabled), " ; ");
SERIAL_ECHOPGM(" M211 S", AS_DIGIT(soft_endstop._enabled), " ; ");
serialprintln_onoff(soft_endstop._enabled);
report_echo_start(forReplay);

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

@ -127,26 +127,26 @@
case DXC_DUPLICATION_MODE: DEBUG_ECHOPGM("DUPLICATION"); break;
case DXC_MIRRORED_MODE: DEBUG_ECHOPGM("MIRRORED"); break;
}
DEBUG_ECHOPAIR("\nActive Ext: ", active_extruder);
DEBUG_ECHOPGM("\nActive Ext: ", active_extruder);
if (!active_extruder_parked) DEBUG_ECHOPGM(" NOT ");
DEBUG_ECHOPGM(" parked.");
DEBUG_ECHOPAIR("\nactive_extruder_x_pos: ", current_position.x);
DEBUG_ECHOPAIR("\ninactive_extruder_x: ", inactive_extruder_x);
DEBUG_ECHOPAIR("\nextruder_duplication_enabled: ", extruder_duplication_enabled);
DEBUG_ECHOPAIR("\nduplicate_extruder_x_offset: ", duplicate_extruder_x_offset);
DEBUG_ECHOPAIR("\nduplicate_extruder_temp_offset: ", duplicate_extruder_temp_offset);
DEBUG_ECHOPAIR("\ndelayed_move_time: ", delayed_move_time);
DEBUG_ECHOPAIR("\nX1 Home X: ", x_home_pos(0), "\nX1_MIN_POS=", X1_MIN_POS, "\nX1_MAX_POS=", X1_MAX_POS);
DEBUG_ECHOPAIR("\nX2 Home X: ", x_home_pos(1), "\nX2_MIN_POS=", X2_MIN_POS, "\nX2_MAX_POS=", X2_MAX_POS);
DEBUG_ECHOPAIR("\nX2_HOME_DIR=", X2_HOME_DIR, "\nX2_HOME_POS=", X2_HOME_POS);
DEBUG_ECHOPAIR("\nDEFAULT_DUAL_X_CARRIAGE_MODE=", STRINGIFY(DEFAULT_DUAL_X_CARRIAGE_MODE));
DEBUG_ECHOPAIR("\toolchange_settings.z_raise=", toolchange_settings.z_raise);
DEBUG_ECHOPAIR("\nDEFAULT_DUPLICATION_X_OFFSET=", DEFAULT_DUPLICATION_X_OFFSET);
DEBUG_ECHOPGM("\nactive_extruder_x_pos: ", current_position.x);
DEBUG_ECHOPGM("\ninactive_extruder_x: ", inactive_extruder_x);
DEBUG_ECHOPGM("\nextruder_duplication_enabled: ", extruder_duplication_enabled);
DEBUG_ECHOPGM("\nduplicate_extruder_x_offset: ", duplicate_extruder_x_offset);
DEBUG_ECHOPGM("\nduplicate_extruder_temp_offset: ", duplicate_extruder_temp_offset);
DEBUG_ECHOPGM("\ndelayed_move_time: ", delayed_move_time);
DEBUG_ECHOPGM("\nX1 Home X: ", x_home_pos(0), "\nX1_MIN_POS=", X1_MIN_POS, "\nX1_MAX_POS=", X1_MAX_POS);
DEBUG_ECHOPGM("\nX2 Home X: ", x_home_pos(1), "\nX2_MIN_POS=", X2_MIN_POS, "\nX2_MAX_POS=", X2_MAX_POS);
DEBUG_ECHOPGM("\nX2_HOME_DIR=", X2_HOME_DIR, "\nX2_HOME_POS=", X2_HOME_POS);
DEBUG_ECHOPGM("\nDEFAULT_DUAL_X_CARRIAGE_MODE=", STRINGIFY(DEFAULT_DUAL_X_CARRIAGE_MODE));
DEBUG_ECHOPGM("\toolchange_settings.z_raise=", toolchange_settings.z_raise);
DEBUG_ECHOPGM("\nDEFAULT_DUPLICATION_X_OFFSET=", DEFAULT_DUPLICATION_X_OFFSET);
DEBUG_EOL();
HOTEND_LOOP() {
DEBUG_ECHOPAIR_P(SP_T_STR, e);
LOOP_LINEAR_AXES(a) DEBUG_ECHOPAIR(" hotend_offset[", e, "].", AS_CHAR(AXIS_CHAR(a) | 0x20), "=", hotend_offset[e][a]);
DEBUG_ECHOPGM_P(SP_T_STR, e);
LOOP_LINEAR_AXES(a) DEBUG_ECHOPGM(" hotend_offset[", e, "].", AS_CHAR(AXIS_CHAR(a) | 0x20), "=", hotend_offset[e][a]);
DEBUG_EOL();
}
DEBUG_EOL();

4
Marlin/src/gcode/control/M993_M994.cpp

@ -37,7 +37,7 @@ void GcodeSuite::M993() {
char fname[] = "spiflash.bin";
card.openFileWrite(fname);
if (!card.isFileOpen()) {
SERIAL_ECHOLNPAIR("Failed to open ", fname, " to write.");
SERIAL_ECHOLNPGM("Failed to open ", fname, " to write.");
return;
}
@ -65,7 +65,7 @@ void GcodeSuite::M994() {
char fname[] = "spiflash.bin";
card.openFileRead(fname);
if (!card.isFileOpen()) {
SERIAL_ECHOLNPAIR("Failed to open ", fname, " to read.");
SERIAL_ECHOLNPGM("Failed to open ", fname, " to read.");
return;
}

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

@ -49,7 +49,7 @@
void GcodeSuite::T(const int8_t tool_index) {
DEBUG_SECTION(log_T, "T", DEBUGGING(LEVELING));
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("...(", tool_index, ")");
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("...(", tool_index, ")");
// Count this command as movement / activity
reset_stepper_timeout();

6
Marlin/src/gcode/eeprom/M500-M504.cpp

@ -75,14 +75,14 @@ void GcodeSuite::M502() {
if (dowrite) {
val = parser.byteval('V');
persistentStore.write_data(addr, &val);
SERIAL_ECHOLNPAIR("Wrote address ", addr, " with ", val);
SERIAL_ECHOLNPGM("Wrote address ", addr, " with ", val);
}
else {
if (parser.seenval('T')) {
const int endaddr = parser.value_ushort();
while (addr <= endaddr) {
persistentStore.read_data(addr, &val);
SERIAL_ECHOLNPAIR("0x", hex_word(addr), ":", hex_byte(val));
SERIAL_ECHOLNPGM("0x", hex_word(addr), ":", hex_byte(val));
addr++;
safe_delay(10);
}
@ -90,7 +90,7 @@ void GcodeSuite::M502() {
}
else {
persistentStore.read_data(addr, &val);
SERIAL_ECHOLNPAIR("Read address ", addr, " and got ", val);
SERIAL_ECHOLNPGM("Read address ", addr, " and got ", val);
}
}
return;

2
Marlin/src/gcode/feature/L6470/M122.cpp

@ -68,7 +68,7 @@ inline void L6470_say_status(const L64XX_axis_t axis) {
if (!(sh.STATUS_AXIS & sh.STATUS_AXIS_WRONG_CMD)) SERIAL_ECHOPGM("IN");
SERIAL_ECHOPGM("VALID ");
SERIAL_ECHOPGM_P(sh.STATUS_AXIS & sh.STATUS_AXIS_NOTPERF_CMD ? PSTR("COMPLETED ") : PSTR("Not PERFORMED"));
SERIAL_ECHOPAIR("\n...THERMAL: ", !(sh.STATUS_AXIS & sh.STATUS_AXIS_TH_SD) ? "SHUTDOWN " : !(sh.STATUS_AXIS & sh.STATUS_AXIS_TH_WRN) ? "WARNING " : "OK ");
SERIAL_ECHOPGM("\n...THERMAL: ", !(sh.STATUS_AXIS & sh.STATUS_AXIS_TH_SD) ? "SHUTDOWN " : !(sh.STATUS_AXIS & sh.STATUS_AXIS_TH_WRN) ? "WARNING " : "OK ");
}
SERIAL_ECHOPGM(" OVERCURRENT:"); echo_yes_no((sh.STATUS_AXIS & sh.STATUS_AXIS_OCD) == 0);
if (sh.STATUS_AXIS_LAYOUT != L6474_STATUS_LAYOUT) {

12
Marlin/src/gcode/feature/L6470/M906.cpp

@ -63,7 +63,7 @@ void L64XX_report_current(L64XX &motor, const L64XX_axis_t axis) {
#if ENABLED(L6470_CHITCHAT)
char tmp[10];
sprintf_P(tmp, PSTR("%4x "), status);
DEBUG_ECHOPAIR(" status: ", tmp);
DEBUG_ECHOPGM(" status: ", tmp);
print_bin(status);
#else
UNUSED(status);
@ -104,13 +104,13 @@ void L64XX_report_current(L64XX &motor, const L64XX_axis_t axis) {
}
SERIAL_EOL();
SERIAL_ECHOPAIR("...MicroSteps: ", MicroSteps,
SERIAL_ECHOPGM("...MicroSteps: ", MicroSteps,
" ADC_OUT: ", L6470_ADC_out);
SERIAL_ECHOPGM(" Vs_compensation: ");
SERIAL_ECHOPGM_P((motor.GetParam(sh.L6470_AXIS_CONFIG) & CONFIG_EN_VSCOMP) ? PSTR("ENABLED ") : PSTR("DISABLED"));
SERIAL_ECHOLNPAIR(" Compensation coefficient: ~", comp_coef * 0.01f);
SERIAL_ECHOLNPGM(" Compensation coefficient: ~", comp_coef * 0.01f);
SERIAL_ECHOPAIR("...KVAL_HOLD: ", motor.GetParam(L6470_KVAL_HOLD),
SERIAL_ECHOPGM("...KVAL_HOLD: ", motor.GetParam(L6470_KVAL_HOLD),
" KVAL_RUN : ", motor.GetParam(L6470_KVAL_RUN),
" KVAL_ACC: ", motor.GetParam(L6470_KVAL_ACC),
" KVAL_DEC: ", motor.GetParam(L6470_KVAL_DEC),
@ -168,7 +168,7 @@ void L64XX_report_current(L64XX &motor, const L64XX_axis_t axis) {
SERIAL_ECHOLNPGM(" mA) Motor Status: NA");
const uint16_t MicroSteps = _BV(motor.GetParam(L6470_STEP_MODE) & 0x07); //NOMORE(MicroSteps, 16);
SERIAL_ECHOPAIR("...MicroSteps: ", MicroSteps,
SERIAL_ECHOPGM("...MicroSteps: ", MicroSteps,
" ADC_OUT: ", L6470_ADC_out);
SERIAL_ECHOLNPGM(" Vs_compensation: NA\n");
@ -185,7 +185,7 @@ void L64XX_report_current(L64XX &motor, const L64XX_axis_t axis) {
case 1: DEBUG_ECHOLNPGM("75V/uS") ; break;
case 2: DEBUG_ECHOLNPGM("110V/uS") ; break;
case 3: DEBUG_ECHOLNPGM("260V/uS") ; break;
default: DEBUG_ECHOLNPAIR("slew rate: ", (motor.GetParam(sh.L6470_AXIS_CONFIG) & CONFIG_POW_SR) >> CONFIG_POW_SR_BIT); break;
default: DEBUG_ECHOLNPGM("slew rate: ", (motor.GetParam(sh.L6470_AXIS_CONFIG) & CONFIG_POW_SR) >> CONFIG_POW_SR_BIT); break;
}
#endif
SERIAL_EOL();

28
Marlin/src/gcode/feature/L6470/M916-918.cpp

@ -96,7 +96,7 @@ void GcodeSuite::M916() {
if (L64xxManager.get_user_input(driver_count, axis_index, axis_mon, position_max, position_min, final_feedrate, kval_hold, over_current_flag, OCD_TH_val, STALL_TH_val, over_current_threshold))
return; // quit if invalid user input
DEBUG_ECHOLNPAIR("feedrate = ", final_feedrate);
DEBUG_ECHOLNPGM("feedrate = ", final_feedrate);
planner.synchronize(); // wait for all current movement commands to complete
@ -127,9 +127,9 @@ void GcodeSuite::M916() {
do {
if (sh.STATUS_AXIS_LAYOUT == L6474_STATUS_LAYOUT)
DEBUG_ECHOLNPAIR("TVAL current (mA) = ", (M91x_counter + 1) * sh.AXIS_STALL_CURRENT_CONSTANT_INV); // report TVAL current for this run
DEBUG_ECHOLNPGM("TVAL current (mA) = ", (M91x_counter + 1) * sh.AXIS_STALL_CURRENT_CONSTANT_INV); // report TVAL current for this run
else
DEBUG_ECHOLNPAIR("kval_hold = ", M91x_counter); // report KVAL_HOLD for this run
DEBUG_ECHOLNPGM("kval_hold = ", M91x_counter); // report KVAL_HOLD for this run
for (j = 0; j < driver_count; j++)
L64xxManager.set_param(axis_index[j], L6470_KVAL_HOLD, M91x_counter); //set KVAL_HOLD or TVAL (same register address)
@ -236,7 +236,7 @@ void GcodeSuite::M917() {
if (L64xxManager.get_user_input(driver_count, axis_index, axis_mon, position_max, position_min, final_feedrate, kval_hold, over_current_flag, OCD_TH_val, STALL_TH_val, over_current_threshold))
return; // quit if invalid user input
DEBUG_ECHOLNPAIR("feedrate = ", final_feedrate);
DEBUG_ECHOLNPGM("feedrate = ", final_feedrate);
planner.synchronize(); // wait for all current movement commands to complete
@ -252,18 +252,18 @@ void GcodeSuite::M917() {
// 2 - OCD finalized - decreasing STALL - exit when STALL warning happens
// 3 - OCD finalized - increasing STALL - exit when STALL warning stop
// 4 - all testing completed
DEBUG_ECHOPAIR(".\n.\n.\nover_current threshold : ", (OCD_TH_val + 1) * 375); // first status display
DEBUG_ECHOPAIR(" (OCD_TH: : ", OCD_TH_val);
DEBUG_ECHOPGM(".\n.\n.\nover_current threshold : ", (OCD_TH_val + 1) * 375); // first status display
DEBUG_ECHOPGM(" (OCD_TH: : ", OCD_TH_val);
if (sh.STATUS_AXIS_LAYOUT != L6474_STATUS_LAYOUT) {
DEBUG_ECHOPAIR(") Stall threshold: ", (STALL_TH_val + 1) * 31.25);
DEBUG_ECHOPAIR(" (STALL_TH: ", STALL_TH_val);
DEBUG_ECHOPGM(") Stall threshold: ", (STALL_TH_val + 1) * 31.25);
DEBUG_ECHOPGM(" (STALL_TH: ", STALL_TH_val);
}
DEBUG_ECHOLNPGM(")");
do {
if (sh.STATUS_AXIS_LAYOUT != L6474_STATUS_LAYOUT) DEBUG_ECHOPAIR("STALL threshold : ", (STALL_TH_val + 1) * 31.25);
DEBUG_ECHOLNPAIR(" OCD threshold : ", (OCD_TH_val + 1) * 375);
if (sh.STATUS_AXIS_LAYOUT != L6474_STATUS_LAYOUT) DEBUG_ECHOPGM("STALL threshold : ", (STALL_TH_val + 1) * 31.25);
DEBUG_ECHOLNPGM(" OCD threshold : ", (OCD_TH_val + 1) * 375);
sprintf_P(gcode_string, PSTR("G0 %s%03d F%03d"), temp_axis_string, uint16_t(position_min), uint16_t(final_feedrate));
gcode.process_subcommands_now_P(gcode_string);
@ -303,7 +303,7 @@ void GcodeSuite::M917() {
if (!(k % 4)) {
kval_hold *= 0.95;
DEBUG_EOL();
DEBUG_ECHOLNPAIR("Lowering KVAL_HOLD by about 5% to ", kval_hold);
DEBUG_ECHOLNPGM("Lowering KVAL_HOLD by about 5% to ", kval_hold);
for (j = 0; j < driver_count; j++)
L64xxManager.set_param(axis_index[j], L6470_KVAL_HOLD, kval_hold);
}
@ -590,8 +590,8 @@ void GcodeSuite::M918() {
}
m_steps = L64xxManager.get_param(axis_index[0], L6470_STEP_MODE) & 0x07; // get microsteps
DEBUG_ECHOLNPAIR("Microsteps = ", _BV(m_steps));
DEBUG_ECHOLNPAIR("target (maximum) feedrate = ", final_feedrate);
DEBUG_ECHOLNPGM("Microsteps = ", _BV(m_steps));
DEBUG_ECHOLNPGM("target (maximum) feedrate = ", final_feedrate);
const float feedrate_inc = final_feedrate / 10, // Start at 1/10 of max & go up by 1/10 per step
fr_limit = final_feedrate * 0.99f; // Rounding-safe comparison value
@ -612,7 +612,7 @@ void GcodeSuite::M918() {
do {
current_feedrate += feedrate_inc;
DEBUG_ECHOLNPAIR("...feedrate = ", current_feedrate);
DEBUG_ECHOLNPGM("...feedrate = ", current_feedrate);
sprintf_P(gcode_string, PSTR("G0 %s%03d F%03d"), temp_axis_string, uint16_t(position_min), uint16_t(current_feedrate));
gcode.process_subcommands_now_P(gcode_string);

10
Marlin/src/gcode/feature/advance/M900.cpp

@ -115,11 +115,11 @@ void GcodeSuite::M900() {
#if ENABLED(EXTRA_LIN_ADVANCE_K)
#if EXTRUDERS < 2
SERIAL_ECHOLNPAIR("Advance S", new_slot, " K", kref, "(S", !new_slot, " K", lref, ")");
SERIAL_ECHOLNPGM("Advance S", new_slot, " K", kref, "(S", !new_slot, " K", lref, ")");
#else
LOOP_L_N(i, EXTRUDERS) {
const bool slot = TEST(lin_adv_slot, i);
SERIAL_ECHOLNPAIR("Advance T", i, " S", slot, " K", planner.extruder_advance_K[i],
SERIAL_ECHOLNPGM("Advance T", i, " S", slot, " K", planner.extruder_advance_K[i],
"(S", !slot, " K", other_extruder_advance_K[i], ")");
SERIAL_EOL();
}
@ -129,7 +129,7 @@ void GcodeSuite::M900() {
SERIAL_ECHO_START();
#if EXTRUDERS < 2
SERIAL_ECHOLNPAIR("Advance K=", planner.extruder_advance_K[0]);
SERIAL_ECHOLNPGM("Advance K=", planner.extruder_advance_K[0]);
#else
SERIAL_ECHOPGM("Advance K");
LOOP_L_N(i, EXTRUDERS) {
@ -148,11 +148,11 @@ void GcodeSuite::M900_report(const bool forReplay/*=true*/) {
report_heading(forReplay, PSTR(STR_LINEAR_ADVANCE));
#if EXTRUDERS < 2
report_echo_start(forReplay);
SERIAL_ECHOLNPAIR(" M900 K", planner.extruder_advance_K[0]);
SERIAL_ECHOLNPGM(" M900 K", planner.extruder_advance_K[0]);
#else
LOOP_L_N(i, EXTRUDERS) {
report_echo_start(forReplay);
SERIAL_ECHOLNPAIR(" M900 T", i, " K", planner.extruder_advance_K[i]);
SERIAL_ECHOLNPGM(" M900 T", i, " K", planner.extruder_advance_K[i]);
}
#endif
}

2
Marlin/src/gcode/feature/controllerfan/M710.cpp

@ -68,7 +68,7 @@ void GcodeSuite::M710() {
void GcodeSuite::M710_report(const bool forReplay/*=true*/) {
report_heading_etc(forReplay, PSTR(STR_CONTROLLER_FAN));
SERIAL_ECHOLNPAIR(" M710"
SERIAL_ECHOLNPGM(" M710"
" S", int(controllerFan.settings.active_speed),
" I", int(controllerFan.settings.idle_speed),
" A", int(controllerFan.settings.auto_mode),

2
Marlin/src/gcode/feature/digipot/M907-M910.cpp

@ -102,7 +102,7 @@ void GcodeSuite::M907() {
void GcodeSuite::M907_report(const bool forReplay/*=true*/) {
report_heading_etc(forReplay, PSTR(STR_STEPPER_MOTOR_CURRENTS));
#if HAS_MOTOR_CURRENT_PWM
SERIAL_ECHOLNPAIR_P( // PWM-based has 3 values:
SERIAL_ECHOLNPGM_P( // PWM-based has 3 values:
PSTR(" M907 X"), stepper.motor_current_setting[0] // X and Y
, SP_Z_STR, stepper.motor_current_setting[1] // Z
, SP_E_STR, stepper.motor_current_setting[2] // E

4
Marlin/src/gcode/feature/filwidth/M404-M407.cpp

@ -38,7 +38,7 @@ void GcodeSuite::M404() {
planner.volumetric_area_nominal = CIRCLE_AREA(filwidth.nominal_mm * 0.5);
}
else
SERIAL_ECHOLNPAIR("Filament dia (nominal mm):", filwidth.nominal_mm);
SERIAL_ECHOLNPGM("Filament dia (nominal mm):", filwidth.nominal_mm);
}
/**
@ -65,7 +65,7 @@ void GcodeSuite::M406() {
* M407: Get measured filament diameter on serial output
*/
void GcodeSuite::M407() {
SERIAL_ECHOLNPAIR("Filament dia (measured mm):", filwidth.measured_mm);
SERIAL_ECHOLNPGM("Filament dia (measured mm):", filwidth.measured_mm);
}
#endif // FILAMENT_WIDTH_SENSOR

6
Marlin/src/gcode/feature/mixing/M166.cpp

@ -30,12 +30,12 @@
#include "../../../feature/mixing.h"
inline void echo_mix() {
SERIAL_ECHOPAIR(" (", mixer.mix[0], "%|", mixer.mix[1], "%)");
SERIAL_ECHOPGM(" (", mixer.mix[0], "%|", mixer.mix[1], "%)");
}
inline void echo_zt(const int t, const_float_t z) {
mixer.update_mix_from_vtool(t);
SERIAL_ECHOPAIR_P(SP_Z_STR, z, SP_T_STR, t);
SERIAL_ECHOPGM_P(SP_Z_STR, z, SP_T_STR, t);
echo_mix();
}
@ -74,7 +74,7 @@ void GcodeSuite::M166() {
#if ENABLED(GRADIENT_VTOOL)
if (mixer.gradient.vtool_index >= 0) {
SERIAL_ECHOPAIR(" (T", mixer.gradient.vtool_index);
SERIAL_ECHOPGM(" (T", mixer.gradient.vtool_index);
SERIAL_CHAR(')');
}
#endif

2
Marlin/src/gcode/feature/password/M510-M512.cpp

@ -66,7 +66,7 @@ void GcodeSuite::M510() {
if (password.value_entry < CAT(1e, PASSWORD_LENGTH)) {
password.is_set = true;
password.value = password.value_entry;
SERIAL_ECHOLNPAIR(STR_PASSWORD_SET, password.value); // TODO: Update password.string
SERIAL_ECHOLNPGM(STR_PASSWORD_SET, password.value); // TODO: Update password.string
}
else
SERIAL_ECHOLNPGM(STR_PASSWORD_TOO_LONG);

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

@ -47,7 +47,7 @@ void GcodeSuite::G60() {
SBI(saved_slots[slot >> 3], slot & 0x07);
#if ENABLED(SAVED_POSITIONS_DEBUG)
DEBUG_ECHOPAIR(STR_SAVED_POS " S", slot);
DEBUG_ECHOPGM(STR_SAVED_POS " S", slot);
const xyze_pos_t &pos = stored_position[slot];
DEBUG_ECHOLNPAIR_F_P(
LIST_N(DOUBLE(LOGICAL_AXES), SP_E_STR, pos.e,

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

@ -69,7 +69,7 @@ void GcodeSuite::G61(void) {
}
else {
if (parser.seen(LINEAR_AXIS_GANG("X", "Y", "Z", AXIS4_STR, AXIS5_STR, AXIS6_STR))) {
DEBUG_ECHOPAIR(STR_RESTORING_POS " S", slot);
DEBUG_ECHOPGM(STR_RESTORING_POS " S", slot);
LOOP_LINEAR_AXES(i) {
destination[i] = parser.seen(AXIS_CHAR(i))
? stored_position[slot][i] + parser.value_axis_units((AxisEnum)i)
@ -83,7 +83,7 @@ void GcodeSuite::G61(void) {
}
#if HAS_EXTRUDERS
if (parser.seen_test('E')) {
DEBUG_ECHOLNPAIR(STR_RESTORING_POS " S", slot, " E", current_position.e, "=>", stored_position[slot].e);
DEBUG_ECHOLNPGM(STR_RESTORING_POS " S", slot, " E", current_position.e, "=>", stored_position[slot].e);
SYNC_E(stored_position[slot].e);
}
#endif

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

@ -69,12 +69,12 @@ void GcodeSuite::M603_report(const bool forReplay/*=true*/) {
#if EXTRUDERS == 1
report_echo_start(forReplay);
SERIAL_ECHOPAIR(" M603 L", LINEAR_UNIT(fc_settings[0].load_length), " U", LINEAR_UNIT(fc_settings[0].unload_length), " ;");
SERIAL_ECHOPGM(" M603 L", LINEAR_UNIT(fc_settings[0].load_length), " U", LINEAR_UNIT(fc_settings[0].unload_length), " ;");
say_units();
#else
LOOP_L_N(e, EXTRUDERS) {
report_echo_start(forReplay);
SERIAL_ECHOPAIR(" M603 T", e, " L", LINEAR_UNIT(fc_settings[e].load_length), " U", LINEAR_UNIT(fc_settings[e].unload_length), " ;");
SERIAL_ECHOPGM(" M603 T", e, " L", LINEAR_UNIT(fc_settings[e].load_length), " U", LINEAR_UNIT(fc_settings[e].unload_length), " ;");
say_units();
}
#endif

2
Marlin/src/gcode/feature/power_monitor/M430.cpp

@ -50,7 +50,7 @@ void GcodeSuite::M430() {
#endif
#endif
if (do_report) {
SERIAL_ECHOLNPAIR(
SERIAL_ECHOLNPGM(
#if ENABLED(POWER_MONITOR_CURRENT)
"Current: ", power_monitor.getAmps(), "A"
#if ENABLED(POWER_MONITOR_VOLTAGE)

2
Marlin/src/gcode/feature/powerloss/M413.cpp

@ -58,7 +58,7 @@ void GcodeSuite::M413() {
void GcodeSuite::M413_report(const bool forReplay/*=true*/) {
report_heading_etc(forReplay, PSTR(STR_POWER_LOSS_RECOVERY));
SERIAL_ECHOPAIR(" M413 S", AS_DIGIT(recovery.enabled), " ; ");
SERIAL_ECHOPGM(" M413 S", AS_DIGIT(recovery.enabled), " ; ");
serialprintln_onoff(recovery.enabled);
}

4
Marlin/src/gcode/feature/runout/M412.cpp

@ -56,7 +56,7 @@ void GcodeSuite::M412() {
SERIAL_ECHOPGM("Filament runout ");
serialprint_onoff(runout.enabled);
#if HAS_FILAMENT_RUNOUT_DISTANCE
SERIAL_ECHOPAIR(" ; Distance ", runout.runout_distance(), "mm");
SERIAL_ECHOPGM(" ; Distance ", runout.runout_distance(), "mm");
#endif
#if ENABLED(HOST_ACTION_COMMANDS)
SERIAL_ECHOPGM(" ; Host handling ");
@ -68,7 +68,7 @@ void GcodeSuite::M412() {
void GcodeSuite::M412_report(const bool forReplay/*=true*/) {
report_heading_etc(forReplay, PSTR(STR_FILAMENT_RUNOUT_SENSOR));
SERIAL_ECHOLNPAIR(
SERIAL_ECHOLNPGM(
" M412 S", runout.enabled
#if HAS_FILAMENT_RUNOUT_DISTANCE
, " D", LINEAR_UNIT(runout.runout_distance())

38
Marlin/src/gcode/feature/trinamic/M906.cpp

@ -209,13 +209,13 @@ void GcodeSuite::M906_report(const bool forReplay/*=true*/) {
#if AXIS_IS_TMC(X) || AXIS_IS_TMC(Y) || AXIS_IS_TMC(Z)
say_M906(forReplay);
#if AXIS_IS_TMC(X)
SERIAL_ECHOPAIR_P(SP_X_STR, stepperX.getMilliamps());
SERIAL_ECHOPGM_P(SP_X_STR, stepperX.getMilliamps());
#endif
#if AXIS_IS_TMC(Y)
SERIAL_ECHOPAIR_P(SP_Y_STR, stepperY.getMilliamps());
SERIAL_ECHOPGM_P(SP_Y_STR, stepperY.getMilliamps());
#endif
#if AXIS_IS_TMC(Z)
SERIAL_ECHOPAIR_P(SP_Z_STR, stepperZ.getMilliamps());
SERIAL_ECHOPGM_P(SP_Z_STR, stepperZ.getMilliamps());
#endif
SERIAL_EOL();
#endif
@ -224,71 +224,71 @@ void GcodeSuite::M906_report(const bool forReplay/*=true*/) {
say_M906(forReplay);
SERIAL_ECHOPGM(" I1");
#if AXIS_IS_TMC(X2)
SERIAL_ECHOPAIR_P(SP_X_STR, stepperX2.getMilliamps());
SERIAL_ECHOPGM_P(SP_X_STR, stepperX2.getMilliamps());
#endif
#if AXIS_IS_TMC(Y2)
SERIAL_ECHOPAIR_P(SP_Y_STR, stepperY2.getMilliamps());
SERIAL_ECHOPGM_P(SP_Y_STR, stepperY2.getMilliamps());
#endif
#if AXIS_IS_TMC(Z2)
SERIAL_ECHOPAIR_P(SP_Z_STR, stepperZ2.getMilliamps());
SERIAL_ECHOPGM_P(SP_Z_STR, stepperZ2.getMilliamps());
#endif
SERIAL_EOL();
#endif
#if AXIS_IS_TMC(Z3)
say_M906(forReplay);
SERIAL_ECHOLNPAIR(" I2 Z", stepperZ3.getMilliamps());
SERIAL_ECHOLNPGM(" I2 Z", stepperZ3.getMilliamps());
#endif
#if AXIS_IS_TMC(Z4)
say_M906(forReplay);
SERIAL_ECHOLNPAIR(" I3 Z", stepperZ4.getMilliamps());
SERIAL_ECHOLNPGM(" I3 Z", stepperZ4.getMilliamps());
#endif
#if AXIS_IS_TMC(I)
say_M906(forReplay);
SERIAL_ECHOLNPAIR_P(SP_I_STR, stepperI.getMilliamps());
SERIAL_ECHOLNPGM_P(SP_I_STR, stepperI.getMilliamps());
#endif
#if AXIS_IS_TMC(J)
say_M906(forReplay);
SERIAL_ECHOLNPAIR_P(SP_J_STR, stepperJ.getMilliamps());
SERIAL_ECHOLNPGM_P(SP_J_STR, stepperJ.getMilliamps());
#endif
#if AXIS_IS_TMC(K)
say_M906(forReplay);
SERIAL_ECHOLNPAIR_P(SP_K_STR, stepperK.getMilliamps());
SERIAL_ECHOLNPGM_P(SP_K_STR, stepperK.getMilliamps());
#endif
#if AXIS_IS_TMC(E0)
say_M906(forReplay);
SERIAL_ECHOLNPAIR(" T0 E", stepperE0.getMilliamps());
SERIAL_ECHOLNPGM(" T0 E", stepperE0.getMilliamps());
#endif
#if AXIS_IS_TMC(E1)
say_M906(forReplay);
SERIAL_ECHOLNPAIR(" T1 E", stepperE1.getMilliamps());
SERIAL_ECHOLNPGM(" T1 E", stepperE1.getMilliamps());
#endif
#if AXIS_IS_TMC(E2)
say_M906(forReplay);
SERIAL_ECHOLNPAIR(" T2 E", stepperE2.getMilliamps());
SERIAL_ECHOLNPGM(" T2 E", stepperE2.getMilliamps());
#endif
#if AXIS_IS_TMC(E3)
say_M906(forReplay);
SERIAL_ECHOLNPAIR(" T3 E", stepperE3.getMilliamps());
SERIAL_ECHOLNPGM(" T3 E", stepperE3.getMilliamps());
#endif
#if AXIS_IS_TMC(E4)
say_M906(forReplay);
SERIAL_ECHOLNPAIR(" T4 E", stepperE4.getMilliamps());
SERIAL_ECHOLNPGM(" T4 E", stepperE4.getMilliamps());
#endif
#if AXIS_IS_TMC(E5)
say_M906(forReplay);
SERIAL_ECHOLNPAIR(" T5 E", stepperE5.getMilliamps());
SERIAL_ECHOLNPGM(" T5 E", stepperE5.getMilliamps());
#endif
#if AXIS_IS_TMC(E6)
say_M906(forReplay);
SERIAL_ECHOLNPAIR(" T6 E", stepperE6.getMilliamps());
SERIAL_ECHOLNPGM(" T6 E", stepperE6.getMilliamps());
#endif
#if AXIS_IS_TMC(E7)
say_M906(forReplay);
SERIAL_ECHOLNPAIR(" T7 E", stepperE7.getMilliamps());
SERIAL_ECHOLNPGM(" T7 E", stepperE7.getMilliamps());
#endif
SERIAL_EOL();
}

60
Marlin/src/gcode/feature/trinamic/M911-M914.cpp

@ -321,13 +321,13 @@
#if X_HAS_STEALTHCHOP || Y_HAS_STEALTHCHOP || Z_HAS_STEALTHCHOP
say_M913(forReplay);
#if X_HAS_STEALTHCHOP
SERIAL_ECHOPAIR_P(SP_X_STR, stepperX.get_pwm_thrs());
SERIAL_ECHOPGM_P(SP_X_STR, stepperX.get_pwm_thrs());
#endif
#if Y_HAS_STEALTHCHOP
SERIAL_ECHOPAIR_P(SP_Y_STR, stepperY.get_pwm_thrs());
SERIAL_ECHOPGM_P(SP_Y_STR, stepperY.get_pwm_thrs());
#endif
#if Z_HAS_STEALTHCHOP
SERIAL_ECHOPAIR_P(SP_Z_STR, stepperZ.get_pwm_thrs());
SERIAL_ECHOPGM_P(SP_Z_STR, stepperZ.get_pwm_thrs());
#endif
SERIAL_EOL();
#endif
@ -336,71 +336,71 @@
say_M913(forReplay);
SERIAL_ECHOPGM(" I1");
#if X2_HAS_STEALTHCHOP
SERIAL_ECHOPAIR_P(SP_X_STR, stepperX2.get_pwm_thrs());
SERIAL_ECHOPGM_P(SP_X_STR, stepperX2.get_pwm_thrs());
#endif
#if Y2_HAS_STEALTHCHOP
SERIAL_ECHOPAIR_P(SP_Y_STR, stepperY2.get_pwm_thrs());
SERIAL_ECHOPGM_P(SP_Y_STR, stepperY2.get_pwm_thrs());
#endif
#if Z2_HAS_STEALTHCHOP
SERIAL_ECHOPAIR_P(SP_Z_STR, stepperZ2.get_pwm_thrs());
SERIAL_ECHOPGM_P(SP_Z_STR, stepperZ2.get_pwm_thrs());
#endif
SERIAL_EOL();
#endif
#if Z3_HAS_STEALTHCHOP
say_M913(forReplay);
SERIAL_ECHOLNPAIR(" I2 Z", stepperZ3.get_pwm_thrs());
SERIAL_ECHOLNPGM(" I2 Z", stepperZ3.get_pwm_thrs());
#endif
#if Z4_HAS_STEALTHCHOP
say_M913(forReplay);
SERIAL_ECHOLNPAIR(" I3 Z", stepperZ4.get_pwm_thrs());
SERIAL_ECHOLNPGM(" I3 Z", stepperZ4.get_pwm_thrs());
#endif
#if I_HAS_STEALTHCHOP
say_M913(forReplay);
SERIAL_ECHOLNPAIR_P(SP_I_STR, stepperI.get_pwm_thrs());
SERIAL_ECHOLNPGM_P(SP_I_STR, stepperI.get_pwm_thrs());
#endif
#if J_HAS_STEALTHCHOP
say_M913(forReplay);
SERIAL_ECHOLNPAIR_P(SP_J_STR, stepperJ.get_pwm_thrs());
SERIAL_ECHOLNPGM_P(SP_J_STR, stepperJ.get_pwm_thrs());
#endif
#if K_HAS_STEALTHCHOP
say_M913(forReplay);
SERIAL_ECHOLNPAIR_P(SP_K_STR, stepperK.get_pwm_thrs());
SERIAL_ECHOLNPGM_P(SP_K_STR, stepperK.get_pwm_thrs());
#endif
#if E0_HAS_STEALTHCHOP
say_M913(forReplay);
SERIAL_ECHOLNPAIR(" T0 E", stepperE0.get_pwm_thrs());
SERIAL_ECHOLNPGM(" T0 E", stepperE0.get_pwm_thrs());
#endif
#if E1_HAS_STEALTHCHOP
say_M913(forReplay);
SERIAL_ECHOLNPAIR(" T1 E", stepperE1.get_pwm_thrs());
SERIAL_ECHOLNPGM(" T1 E", stepperE1.get_pwm_thrs());
#endif
#if E2_HAS_STEALTHCHOP
say_M913(forReplay);
SERIAL_ECHOLNPAIR(" T2 E", stepperE2.get_pwm_thrs());
SERIAL_ECHOLNPGM(" T2 E", stepperE2.get_pwm_thrs());
#endif
#if E3_HAS_STEALTHCHOP
say_M913(forReplay);
SERIAL_ECHOLNPAIR(" T3 E", stepperE3.get_pwm_thrs());
SERIAL_ECHOLNPGM(" T3 E", stepperE3.get_pwm_thrs());
#endif
#if E4_HAS_STEALTHCHOP
say_M913(forReplay);
SERIAL_ECHOLNPAIR(" T4 E", stepperE4.get_pwm_thrs());
SERIAL_ECHOLNPGM(" T4 E", stepperE4.get_pwm_thrs());
#endif
#if E5_HAS_STEALTHCHOP
say_M913(forReplay);
SERIAL_ECHOLNPAIR(" T5 E", stepperE5.get_pwm_thrs());
SERIAL_ECHOLNPGM(" T5 E", stepperE5.get_pwm_thrs());
#endif
#if E6_HAS_STEALTHCHOP
say_M913(forReplay);
SERIAL_ECHOLNPAIR(" T6 E", stepperE6.get_pwm_thrs());
SERIAL_ECHOLNPGM(" T6 E", stepperE6.get_pwm_thrs());
#endif
#if E7_HAS_STEALTHCHOP
say_M913(forReplay);
SERIAL_ECHOLNPAIR(" T7 E", stepperE7.get_pwm_thrs());
SERIAL_ECHOLNPGM(" T7 E", stepperE7.get_pwm_thrs());
#endif
SERIAL_EOL();
}
@ -522,13 +522,13 @@
#if X_SENSORLESS || Y_SENSORLESS || Z_SENSORLESS
say_M914(forReplay);
#if X_SENSORLESS
SERIAL_ECHOPAIR_P(SP_X_STR, stepperX.homing_threshold());
SERIAL_ECHOPGM_P(SP_X_STR, stepperX.homing_threshold());
#endif
#if Y_SENSORLESS
SERIAL_ECHOPAIR_P(SP_Y_STR, stepperY.homing_threshold());
SERIAL_ECHOPGM_P(SP_Y_STR, stepperY.homing_threshold());
#endif
#if Z_SENSORLESS
SERIAL_ECHOPAIR_P(SP_Z_STR, stepperZ.homing_threshold());
SERIAL_ECHOPGM_P(SP_Z_STR, stepperZ.homing_threshold());
#endif
SERIAL_EOL();
#endif
@ -537,38 +537,38 @@
say_M914(forReplay);
SERIAL_ECHOPGM(" I1");
#if X2_SENSORLESS
SERIAL_ECHOPAIR_P(SP_X_STR, stepperX2.homing_threshold());
SERIAL_ECHOPGM_P(SP_X_STR, stepperX2.homing_threshold());
#endif
#if Y2_SENSORLESS
SERIAL_ECHOPAIR_P(SP_Y_STR, stepperY2.homing_threshold());
SERIAL_ECHOPGM_P(SP_Y_STR, stepperY2.homing_threshold());
#endif
#if Z2_SENSORLESS
SERIAL_ECHOPAIR_P(SP_Z_STR, stepperZ2.homing_threshold());
SERIAL_ECHOPGM_P(SP_Z_STR, stepperZ2.homing_threshold());
#endif
SERIAL_EOL();
#endif
#if Z3_SENSORLESS
say_M914(forReplay);
SERIAL_ECHOLNPAIR(" I2 Z", stepperZ3.homing_threshold());
SERIAL_ECHOLNPGM(" I2 Z", stepperZ3.homing_threshold());
#endif
#if Z4_SENSORLESS
say_M914(forReplay);
SERIAL_ECHOLNPAIR(" I3 Z", stepperZ4.homing_threshold());
SERIAL_ECHOLNPGM(" I3 Z", stepperZ4.homing_threshold());
#endif
#if I_SENSORLESS
say_M914(forReplay);
SERIAL_ECHOLNPAIR_P(SP_I_STR, stepperI.homing_threshold());
SERIAL_ECHOLNPGM_P(SP_I_STR, stepperI.homing_threshold());
#endif
#if J_SENSORLESS
say_M914(forReplay);
SERIAL_ECHOLNPAIR_P(SP_J_STR, stepperJ.homing_threshold());
SERIAL_ECHOLNPGM_P(SP_J_STR, stepperJ.homing_threshold());
#endif
#if K_SENSORLESS
say_M914(forReplay);
SERIAL_ECHOLNPAIR_P(SP_K_STR, stepperK.homing_threshold());
SERIAL_ECHOLNPGM_P(SP_K_STR, stepperK.homing_threshold());
#endif
}

6
Marlin/src/gcode/gcode.cpp

@ -130,7 +130,7 @@ int8_t GcodeSuite::get_target_extruder_from_command() {
if (e < EXTRUDERS) return e;
SERIAL_ECHO_START();
SERIAL_CHAR('M'); SERIAL_ECHO(parser.codenum);
SERIAL_ECHOLNPAIR(" " STR_INVALID_EXTRUDER " ", e);
SERIAL_ECHOLNPGM(" " STR_INVALID_EXTRUDER " ", e);
return -1;
}
return active_extruder;
@ -149,7 +149,7 @@ int8_t GcodeSuite::get_target_e_stepper_from_command() {
if (e == -1)
SERIAL_ECHOLNPGM(" " STR_E_STEPPER_NOT_SPECIFIED);
else
SERIAL_ECHOLNPAIR(" " STR_INVALID_E_STEPPER " ", e);
SERIAL_ECHOLNPGM(" " STR_INVALID_E_STEPPER " ", e);
return -1;
}
@ -1082,7 +1082,7 @@ void GcodeSuite::process_next_command() {
SERIAL_ECHO_START();
SERIAL_ECHOLN(command.buffer);
#if ENABLED(M100_FREE_MEMORY_DUMPER)
SERIAL_ECHOPAIR("slot:", queue.ring_buffer.index_r);
SERIAL_ECHOPGM("slot:", queue.ring_buffer.index_r);
M100_dump_routine(PSTR(" Command Queue:"), (const char*)&queue.ring_buffer, sizeof(queue.ring_buffer));
#endif
}

6
Marlin/src/gcode/gcode_d.cpp

@ -179,7 +179,7 @@ void GcodeSuite::D(const int16_t dcode) {
break;
case 7: // D7 dump the current serial port type (hence configuration)
SERIAL_ECHOLNPAIR("Current serial configuration RX_BS:", RX_BUFFER_SIZE, ", TX_BS:", TX_BUFFER_SIZE);
SERIAL_ECHOLNPGM("Current serial configuration RX_BS:", RX_BUFFER_SIZE, ", TX_BS:", TX_BUFFER_SIZE);
SERIAL_ECHOLN(gtn(&SERIAL_IMPL));
break;
@ -202,7 +202,7 @@ void GcodeSuite::D(const int16_t dcode) {
case 101: { // D101 Test SD Write
card.openFileWrite("test.gco");
if (!card.isFileOpen()) {
SERIAL_ECHOLNPAIR("Failed to open test.gco to write.");
SERIAL_ECHOLNPGM("Failed to open test.gco to write.");
return;
}
__attribute__((aligned(sizeof(size_t)))) uint8_t buf[512];
@ -224,7 +224,7 @@ void GcodeSuite::D(const int16_t dcode) {
char testfile[] = "test.gco";
card.openFileRead(testfile);
if (!card.isFileOpen()) {
SERIAL_ECHOLNPAIR("Failed to open test.gco to read.");
SERIAL_ECHOLNPGM("Failed to open test.gco to read.");
return;
}
__attribute__((aligned(sizeof(size_t)))) uint8_t buf[512];

4
Marlin/src/gcode/geometry/G53-G59.cpp

@ -69,7 +69,7 @@ void GcodeSuite::G53() {
process_parsed_command(); // ...process the chained command
select_coordinate_system(old_system);
#ifdef DEBUG_M53
SERIAL_ECHOLNPAIR("Go back to workspace ", old_system);
SERIAL_ECHOLNPGM("Go back to workspace ", old_system);
report_current_position();
#endif
}
@ -87,7 +87,7 @@ void GcodeSuite::G53() {
void G54_59(uint8_t subcode=0) {
const int8_t _space = parser.codenum - 54 + subcode;
if (gcode.select_coordinate_system(_space)) {
SERIAL_ECHOLNPAIR("Select workspace ", _space);
SERIAL_ECHOLNPGM("Select workspace ", _space);
report_current_position();
}
}

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

@ -54,7 +54,7 @@ void GcodeSuite::M206() {
void GcodeSuite::M206_report(const bool forReplay/*=true*/) {
report_heading_etc(forReplay, PSTR(STR_HOME_OFFSET));
SERIAL_ECHOLNPAIR_P(
SERIAL_ECHOLNPGM_P(
#if IS_CARTESIAN
LIST_N(DOUBLE(LINEAR_AXES),
PSTR(" M206 X"), LINEAR_UNIT(home_offset.x),

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

@ -218,7 +218,7 @@ void GcodeSuite::M114() {
}
#if HAS_EXTRUDERS
if (parser.seen_test('E')) {
SERIAL_ECHOLNPAIR("Count E:", stepper.position(E_AXIS));
SERIAL_ECHOLNPGM("Count E:", stepper.position(E_AXIS));
return;
}
#endif

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

@ -175,7 +175,7 @@ void GcodeSuite::M115() {
apply_motion_limits(cmax);
const xyz_pos_t lmin = dmin.asLogical(), lmax = dmax.asLogical(),
wmin = cmin.asLogical(), wmax = cmax.asLogical();
SERIAL_ECHOLNPAIR(
SERIAL_ECHOLNPGM(
"area:{"
"full:{"
"min:{x:", lmin.x, ",y:", lmin.y, ",z:", lmin.z, "},"

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

@ -36,7 +36,7 @@ static void config_prefix(PGM_P const name, PGM_P const pref=nullptr, const int8
SERIAL_ECHOPGM("Config:");
if (pref) SERIAL_ECHOPGM_P(pref);
if (ind >= 0) { SERIAL_ECHO(ind); SERIAL_CHAR(':'); }
SERIAL_ECHOPAIR_P(name, AS_CHAR(':'));
SERIAL_ECHOPGM_P(name, AS_CHAR(':'));
}
static void config_line(PGM_P const name, const float val, PGM_P const pref=nullptr, const int8_t ind=-1) {
config_prefix(name, pref, ind);

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

@ -64,7 +64,7 @@ void GcodeSuite::M145_report(const bool forReplay/*=true*/) {
report_heading(forReplay, PSTR(STR_MATERIAL_HEATUP));
LOOP_L_N(i, PREHEAT_COUNT) {
report_echo_start(forReplay);
SERIAL_ECHOLNPAIR_P(
SERIAL_ECHOLNPGM_P(
PSTR(" M145 S"), i
#if HAS_HOTEND
, PSTR(" H"), parser.to_temp_units(ui.material_preset[i].hotend_temp)

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save