🎨 Fewer serial macros

This commit is contained in:
Scott Lahteine 2021-09-09 04:57:05 -05:00 committed by Scott Lahteine
parent 6d96c221bd
commit b661795ae5
159 changed files with 1002 additions and 1014 deletions

View File

@ -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 SET_WGM(5, FAST_PWM_ICRn); // Fast PWM with ICR5 as TOP
//SERIAL_ECHOLNPGM("Timer 5 Settings:"); //SERIAL_ECHOLNPGM("Timer 5 Settings:");
//SERIAL_ECHOLNPAIR(" Prescaler=", prescaler); //SERIAL_ECHOLNPGM(" Prescaler=", prescaler);
//SERIAL_ECHOLNPAIR(" TOP=", ICR5); //SERIAL_ECHOLNPGM(" TOP=", ICR5);
//SERIAL_ECHOLNPAIR(" OCR5A=", OCR5A); //SERIAL_ECHOLNPGM(" OCR5A=", OCR5A);
//SERIAL_ECHOLNPAIR(" OCR5B=", OCR5B); //SERIAL_ECHOLNPGM(" OCR5B=", OCR5B);
//SERIAL_ECHOLNPAIR(" OCR5C=", OCR5C); //SERIAL_ECHOLNPGM(" OCR5C=", OCR5C);
} }
else { else {
// Restore the default for Timer 5 // Restore the default for Timer 5

View File

@ -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) { inline void com_print(const uint8_t N, const uint8_t Z) {
const uint8_t *TCCRA = (uint8_t*)TCCR_A(N); 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_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 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)))); uint8_t WGM = (((*TCCRB & _BV(WGM_2)) >> 1) | (*TCCRA & (_BV(WGM_0) | _BV(WGM_1))));
if (N == 4) WGM |= ((*TCCRB & _BV(WGM_3)) >> 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_CHAR(L);
SERIAL_ECHO_SP(3); 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'); const uint16_t *OCRVAL16 = (uint16_t*)OCR_VAL(T, L - 'A');
PWM_PRINT(*OCRVAL16); PWM_PRINT(*OCRVAL16);
} }
SERIAL_ECHOPAIR(" WGM: ", WGM); SERIAL_ECHOPGM(" WGM: ", WGM);
com_print(T,L); com_print(T,L);
SERIAL_ECHOPAIR(" CS: ", (*TCCRB & (_BV(CS_0) | _BV(CS_1) | _BV(CS_2)) )); SERIAL_ECHOPGM(" CS: ", (*TCCRB & (_BV(CS_0) | _BV(CS_1) | _BV(CS_2)) ));
SERIAL_ECHOPAIR(" TCCR", AS_DIGIT(T), "A: ", *TCCRA); SERIAL_ECHOPGM(" TCCR", AS_DIGIT(T), "A: ", *TCCRA);
SERIAL_ECHOPAIR(" TCCR", AS_DIGIT(T), "B: ", *TCCRB); SERIAL_ECHOPGM(" TCCR", AS_DIGIT(T), "B: ", *TCCRB);
const uint8_t *TMSK = (uint8_t*)TIMSK(T); 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; const uint8_t OCIE = L - 'A' + 1;
if (N == 3) { if (WGM == 0 || WGM == 2 || WGM == 4 || WGM == 6) err_is_counter(); } if (N == 3) { if (WGM == 0 || WGM == 2 || WGM == 4 || WGM == 6) err_is_counter(); }

View File

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

View File

@ -87,7 +87,7 @@ bool GET_PINMODE(int8_t pin) { // 1: output, 0: input
void pwm_details(int32_t pin) { void pwm_details(int32_t pin) {
if (pwm_status(pin)) { if (pwm_status(pin)) {
uint32_t chan = g_APinDescription[pin].ulPWMChannel; 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);
} }
} }

View File

@ -59,7 +59,7 @@ void wifi_init() {
MDNS.addService("http", "tcp", 80); 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 #endif // WIFISUPPORT

View File

@ -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"); PGM_P const rw_str = write ? PSTR("write") : PSTR("read");
SERIAL_CHAR(' '); SERIAL_CHAR(' ');
SERIAL_ECHOPGM_P(rw_str); SERIAL_ECHOPGM_P(rw_str);
SERIAL_ECHOLNPAIR("_data(", pos, ",", value, ",", size, ", ...)"); SERIAL_ECHOLNPGM("_data(", pos, ",", value, ",", size, ", ...)");
if (total) { if (total) {
SERIAL_ECHOPGM(" f_"); SERIAL_ECHOPGM(" f_");
SERIAL_ECHOPGM_P(rw_str); SERIAL_ECHOPGM_P(rw_str);
SERIAL_ECHOPAIR("()=", s, "\n size=", size, "\n bytes_"); SERIAL_ECHOPGM("()=", s, "\n size=", size, "\n bytes_");
SERIAL_ECHOLNPAIR_P(write ? PSTR("written=") : PSTR("read="), total); SERIAL_ECHOLNPGM_P(write ? PSTR("written=") : PSTR("read="), total);
} }
else else
SERIAL_ECHOLNPAIR(" f_lseek()=", s); SERIAL_ECHOLNPGM(" f_lseek()=", s);
} }
// File function return codes for type FRESULT. This goes away soon, but // File function return codes for type FRESULT. This goes away soon, but

View File

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

View File

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

View File

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

View File

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

View File

@ -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) { 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("Calling ");
SERIAL_ECHOPGM_P(name); SERIAL_ECHOPGM_P(name);
SERIAL_ECHOLNPAIR(" for ", cycles); SERIAL_ECHOLNPGM(" for ", cycles);
SERIAL_ECHOPGM_P(unit); SERIAL_ECHOPGM_P(unit);
SERIAL_ECHOLNPAIR(" took: ", total); SERIAL_ECHOLNPGM(" took: ", total);
SERIAL_ECHOPGM_P(unit); SERIAL_ECHOPGM_P(unit);
if (do_flush) SERIAL_FLUSHTX(); if (do_flush) SERIAL_FLUSHTX();
}; };
uint32_t s, e; 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(); SERIAL_FLUSH();
// Display the results of the calibration above // Display the results of the calibration above
constexpr uint32_t testValues[] = { 1, 5, 10, 20, 50, 100, 150, 200, 350, 500, 750, 1000 }; constexpr uint32_t testValues[] = { 1, 5, 10, 20, 50, 100, 150, 200, 350, 500, 750, 1000 };

View File

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

View File

@ -20,19 +20,19 @@
*/ */
#pragma once #pragma once
// We need SERIAL_ECHOPAIR and macros.h // We need SERIAL_ECHOPGM and macros.h
#include "serial.h" #include "serial.h"
#if ENABLED(POSTMORTEM_DEBUGGING) #if ENABLED(POSTMORTEM_DEBUGGING)
// Useful macro for stopping the CPU on an unexpected condition // 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. // 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 // \/ 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_ECHOLNPAIR(V); SERIAL_FLUSHTX(); *(char*)0 = 42; } while(0) #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) #elif ENABLED(MARLIN_DEV_MODE)
// Don't stop the CPU here, but at least dump the bug on the serial port // 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 // \/ 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_ECHOLNPAIR(V); SERIAL_FLUSHTX(); } while(0) #define BUG_ON(V...) do { SERIAL_ECHO(ONLY_FILENAME); SERIAL_ECHO(__LINE__); SERIAL_ECHOLNPGM(": BUG!"); SERIAL_ECHOLNPGM(V); SERIAL_FLUSHTX(); } while(0)
#else #else
// Release mode, let's ignore the bug // Release mode, let's ignore the bug
#define BUG_ON(V...) NOOP #define BUG_ON(V...) NOOP

View File

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

View File

@ -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*/) { void print_pos(LINEAR_AXIS_ARGS(const_float_t), PGM_P const prefix/*=nullptr*/, PGM_P const suffix/*=nullptr*/) {
if (prefix) serialprintPGM(prefix); 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) 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(); if (suffix) serialprintPGM(suffix); else SERIAL_EOL();

View File

@ -188,44 +188,44 @@ inline void SERIAL_FLUSHTX() { SERIAL_IMPL.flushTX(); }
void serialprintPGM(PGM_P str); 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. // 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(V)
#define _SEP_N(N,V...) __SEP_N(N,V) #define _SEP_N(N,V...) __SEP_N(N,V)
#define _SEP_N_REF() _SEP_N #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_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 _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. // 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(V)
#define _SELP_N(N,V...) __SELP_N(N,V) #define _SELP_N(N,V...) __SELP_N(N,V)
#define _SELP_N_REF() _SELP_N #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_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 _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. // 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(V)
#define _SEP_N_P(N,V...) __SEP_N_P(N,V) #define _SEP_N_P(N,V...) __SEP_N_P(N,V)
#define _SEP_N_P_REF() _SEP_N_P #define _SEP_N_P_REF() _SEP_N_P
#define _SEP_1_P(s) serialprintPGM(s); #define _SEP_1_P(p) serialprintPGM(p);
#define _SEP_2_P(s,v) serial_echopair_PGM(s,v); #define _SEP_2_P(p,v) serial_echopair_PGM(p,v);
#define _SEP_3_P(s,v,V...) _SEP_2_P(s,v); DEFER2(_SEP_N_P_REF)()(TWO_ARGS(V),V); #define _SEP_3_P(p,v,V...) _SEP_2_P(p,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 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. // 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(V)
#define _SELP_N_P(N,V...) __SELP_N_P(N,V) #define _SELP_N_P(N,V...) __SELP_N_P(N,V)
#define _SELP_N_P_REF() _SELP_N_P #define _SELP_N_P_REF() _SELP_N_P
#define _SELP_1_P(s) { serialprintPGM(s); SERIAL_EOL(); } #define _SELP_1_P(p) { serialprintPGM(p); SERIAL_EOL(); }
#define _SELP_2_P(s,v) { serial_echopair_PGM(s,v); SERIAL_EOL(); } #define _SELP_2_P(p,v) { serial_echopair_PGM(p,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 _SELP_3_P(p,v,V...) { _SEP_2_P(p,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 SERIAL_ECHOLNPGM_P(V...) do{ EVAL(_SELP_N_P(TWO_ARGS(V),V)); }while(0)
#ifdef AllowDifferentTypeInList #ifdef AllowDifferentTypeInList
@ -261,12 +261,6 @@ void serialprintPGM(PGM_P str);
#endif #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_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) #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_ERROR_START() serial_error_start()
#define SERIAL_EOL() SERIAL_CHAR('\n') #define SERIAL_EOL() SERIAL_CHAR('\n')
#define SERIAL_ECHO_MSG(V...) do{ SERIAL_ECHO_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_ECHOLNPAIR(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) #define SERIAL_ECHO_SP(C) serial_spaces(C)

View File

@ -79,9 +79,9 @@ void safe_delay(millis_t ms) {
#if HAS_BED_PROBE #if HAS_BED_PROBE
#if !HAS_PROBE_XY_OFFSET #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 #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) if (probe.offset_xy.x > 0)
SERIAL_ECHOPGM(" (Right"); SERIAL_ECHOPGM(" (Right");
else if (probe.offset_xy.x < 0) else if (probe.offset_xy.x < 0)
@ -119,7 +119,7 @@ void safe_delay(millis_t ms) {
SERIAL_ECHOLNPGM(" (enabled)"); SERIAL_ECHOLNPGM(" (enabled)");
#if ENABLED(ENABLE_LEVELING_FADE_HEIGHT) #if ENABLED(ENABLE_LEVELING_FADE_HEIGHT)
if (planner.z_fade_height) if (planner.z_fade_height)
SERIAL_ECHOLNPAIR("Z Fade: ", planner.z_fade_height); SERIAL_ECHOLNPGM("Z Fade: ", planner.z_fade_height);
#endif #endif
#if ABL_PLANAR #if ABL_PLANAR
SERIAL_ECHOPGM("ABL Adjustment"); SERIAL_ECHOPGM("ABL Adjustment");
@ -140,7 +140,7 @@ void safe_delay(millis_t ms) {
SERIAL_ECHO(ftostr43sign(rz, '+')); SERIAL_ECHO(ftostr43sign(rz, '+'));
#if ENABLED(ENABLE_LEVELING_FADE_HEIGHT) #if ENABLED(ENABLE_LEVELING_FADE_HEIGHT)
if (planner.z_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(')'); SERIAL_CHAR(')');
} }
#endif #endif
@ -156,10 +156,10 @@ void safe_delay(millis_t ms) {
SERIAL_ECHOPGM("Mesh Bed Leveling"); SERIAL_ECHOPGM("Mesh Bed Leveling");
if (planner.leveling_active) { if (planner.leveling_active) {
SERIAL_ECHOLNPGM(" (enabled)"); 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 ENABLED(ENABLE_LEVELING_FADE_HEIGHT)
if (planner.z_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)), '+' mbl.get_z(current_position, planner.fade_scaling_factor_for_z(current_position.z)), '+'
)); ));
SERIAL_CHAR(')'); SERIAL_CHAR(')');

View File

@ -134,12 +134,12 @@ void Backlash::add_correction_steps(const int32_t &da, const int32_t &db, const
switch (axis) { switch (axis) {
case CORE_AXIS_1: case CORE_AXIS_1:
//block->steps[CORE_AXIS_2] += influence_distance_mm[axis] * planner.settings.axis_steps_per_mm[CORE_AXIS_2]; //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); // " da=", da, " db=", db, " block->steps[axis]=", block->steps[axis], " err_corr=", error_correction);
break; break;
case CORE_AXIS_2: case CORE_AXIS_2:
//block->steps[CORE_AXIS_1] += influence_distance_mm[axis] * planner.settings.axis_steps_per_mm[CORE_AXIS_1];; //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); // " da=", da, " db=", db, " block->steps[axis]=", block->steps[axis], " err_corr=", error_correction);
break; break;
case NORMAL_AXIS: break; case NORMAL_AXIS: break;

View File

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

View File

@ -51,7 +51,7 @@ void unified_bed_leveling::report_current_mesh() {
GRID_LOOP(x, y) GRID_LOOP(x, y)
if (!isnan(z_values[x][y])) { if (!isnan(z_values[x][y])) {
SERIAL_ECHO_START(); 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_ECHOLNPAIR_F_P(SP_Z_STR, z_values[x][y], 4);
serial_delay(75); // Prevent Printrun from exploding serial_delay(75); // Prevent Printrun from exploding
} }

View File

@ -208,7 +208,7 @@ public:
if (DEBUGGING(LEVELING)) { if (DEBUGGING(LEVELING)) {
if (WITHIN(x1_i, 0, (GRID_MAX_POINTS_X) - 1)) DEBUG_ECHOPGM("yi"); else DEBUG_ECHOPGM("x1_i"); 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. // 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 (DEBUGGING(LEVELING)) {
if (WITHIN(xi, 0, (GRID_MAX_POINTS_X) - 1)) DEBUG_ECHOPGM("y1_i"); else DEBUG_ECHOPGM("xi"); 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. // 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 // because part of the Mesh is undefined and we don't have the
// information we need to complete the height correction. // 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)) { if (DEBUGGING(MESH_ADJUST)) {
DEBUG_ECHOPAIR("get_z_correction(", rx0, ", ", ry0); DEBUG_ECHOPGM("get_z_correction(", rx0, ", ", ry0);
DEBUG_ECHOLNPAIR_F(") => ", z0, 6); DEBUG_ECHOLNPAIR_F(") => ", z0, 6);
} }

View File

@ -428,7 +428,7 @@ void unified_bed_leveling::G29() {
SERIAL_ECHOLNPGM("Mesh invalidated. Probing mesh."); SERIAL_ECHOLNPGM("Mesh invalidated. Probing mesh.");
} }
if (param.V_verbosity > 1) { if (param.V_verbosity > 1) {
SERIAL_ECHOPAIR("Probing around (", param.XY_pos.x); SERIAL_ECHOPGM("Probing around (", param.XY_pos.x);
SERIAL_CHAR(','); SERIAL_CHAR(',');
SERIAL_DECIMAL(param.XY_pos.y); SERIAL_DECIMAL(param.XY_pos.y);
SERIAL_ECHOLNPGM(").\n"); SERIAL_ECHOLNPGM(").\n");
@ -602,7 +602,7 @@ void unified_bed_leveling::G29() {
} }
if (!WITHIN(param.KLS_storage_slot, 0, a - 1)) { 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; return;
} }
@ -630,7 +630,7 @@ void unified_bed_leveling::G29() {
} }
if (!WITHIN(param.KLS_storage_slot, 0, a - 1)) { 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; goto LEAVE;
} }
@ -653,7 +653,7 @@ void unified_bed_leveling::G29() {
#endif #endif
#ifdef Z_PROBE_END_SCRIPT #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) { if (probe_deployed) {
planner.synchronize(); planner.synchronize();
gcode.process_subcommands_now_P(PSTR(Z_PROBE_END_SCRIPT)); 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])) if (!isnan(z_values[x][y]))
sum_of_diff_squared += sq(z_values[x][y] - mean); 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); SERIAL_ECHOLNPAIR_F("Mean Mesh Height: ", mean, 6);
const float sigma = SQRT(sum_of_diff_squared / (n + 1)); 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); if (do_ubl_mesh_map) display_map(param.T_map_type);
const uint8_t point_num = (GRID_MAX_POINTS - count) + 1; 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))); 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 #if HAS_LCD_MENU
@ -1450,7 +1450,7 @@ void unified_bed_leveling::smart_fill_mesh() {
#endif #endif
if (param.V_verbosity > 3) { if (param.V_verbosity > 3) {
serial_spaces(16); serial_spaces(16);
SERIAL_ECHOLNPAIR("Corrected_Z=", measured_z); SERIAL_ECHOLNPGM("Corrected_Z=", measured_z);
} }
incremental_LSF(&lsf_results, points[0], 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]); measured_z -= get_z_correction(points[1]);
if (param.V_verbosity > 3) { if (param.V_verbosity > 3) {
serial_spaces(16); serial_spaces(16);
SERIAL_ECHOLNPAIR("Corrected_Z=", measured_z); SERIAL_ECHOLNPGM("Corrected_Z=", measured_z);
} }
incremental_LSF(&lsf_results, points[1], 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]); measured_z -= get_z_correction(points[2]);
if (param.V_verbosity > 3) { if (param.V_verbosity > 3) {
serial_spaces(16); serial_spaces(16);
SERIAL_ECHOLNPAIR("Corrected_Z=", measured_z); SERIAL_ECHOLNPGM("Corrected_Z=", measured_z);
} }
incremental_LSF(&lsf_results, points[2], 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); rpos.y = y_min + dy * (zig_zag ? param.J_grid_size - 1 - iy : iy);
if (!abort_flag) { 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)); 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 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) { if (param.V_verbosity > 3) {
serial_spaces(16); serial_spaces(16);
SERIAL_ECHOLNPAIR("Corrected_Z=", measured_z); SERIAL_ECHOLNPGM("Corrected_Z=", measured_z);
} }
incremental_LSF(&lsf_results, rpos, 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); DEBUG_ECHOLNPAIR_F("0 : ", normed(safe_homing_xy, 0), 6);
d_from(); DEBUG_ECHOPGM("safe home with Z="); 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_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); DEBUG_ECHOLNPAIR_F(") = ", get_z_correction(safe_homing_xy), 6);
#endif #endif
} // DEBUGGING(LEVELING) } // DEBUGGING(LEVELING)
@ -1722,7 +1722,7 @@ void unified_bed_leveling::smart_fill_mesh() {
if (storage_slot == -1) if (storage_slot == -1)
SERIAL_ECHOPGM("No Mesh Loaded."); SERIAL_ECHOPGM("No Mesh Loaded.");
else else
SERIAL_ECHOPAIR("Mesh ", storage_slot, " Loaded."); SERIAL_ECHOPGM("Mesh ", storage_slot, " Loaded.");
SERIAL_EOL(); SERIAL_EOL();
serial_delay(50); 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); SERIAL_ECHOLNPAIR_F("Probe Offset M851 Z", probe.offset.z, 7);
#endif #endif
SERIAL_ECHOLNPAIR("MESH_MIN_X " STRINGIFY(MESH_MIN_X) "=", MESH_MIN_X); serial_delay(50); SERIAL_ECHOLNPGM("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_ECHOLNPGM("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_ECHOLNPGM("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_ECHOLNPGM("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_ECHOLNPGM("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_ECHOLNPGM("GRID_MAX_POINTS_Y ", GRID_MAX_POINTS_Y); serial_delay(50);
SERIAL_ECHOLNPAIR("MESH_X_DIST ", MESH_X_DIST); SERIAL_ECHOLNPGM("MESH_X_DIST ", MESH_X_DIST);
SERIAL_ECHOLNPAIR("MESH_Y_DIST ", MESH_Y_DIST); serial_delay(50); SERIAL_ECHOLNPGM("MESH_Y_DIST ", MESH_Y_DIST); serial_delay(50);
SERIAL_ECHOPGM("X-Axis Mesh Points at: "); SERIAL_ECHOPGM("X-Axis Mesh Points at: ");
LOOP_L_N(i, GRID_MAX_POINTS_X) { LOOP_L_N(i, GRID_MAX_POINTS_X) {
@ -1762,27 +1762,27 @@ void unified_bed_leveling::smart_fill_mesh() {
SERIAL_EOL(); SERIAL_EOL();
#if HAS_KILL #if HAS_KILL
SERIAL_ECHOLNPAIR("Kill pin on :", KILL_PIN, " state:", kill_state()); SERIAL_ECHOLNPGM("Kill pin on :", KILL_PIN, " state:", kill_state());
#endif #endif
SERIAL_EOL(); SERIAL_EOL();
serial_delay(50); serial_delay(50);
#if ENABLED(UBL_DEVEL_DEBUGGING) #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_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_delay(50);
SERIAL_ECHOLNPAIR("sizeof(ubl) : ", sizeof(ubl)); SERIAL_EOL(); SERIAL_ECHOLNPGM("sizeof(ubl) : ", sizeof(ubl)); SERIAL_EOL();
SERIAL_ECHOLNPAIR("z_value[][] size: ", sizeof(z_values)); SERIAL_EOL(); SERIAL_ECHOLNPGM("z_value[][] size: ", sizeof(z_values)); SERIAL_EOL();
serial_delay(25); 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_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); serial_delay(25);
#endif // UBL_DEVEL_DEBUGGING #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)) { 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; return;
} }
@ -1838,7 +1838,7 @@ void unified_bed_leveling::smart_fill_mesh() {
float tmp_z_values[GRID_MAX_POINTS_X][GRID_MAX_POINTS_Y]; float tmp_z_values[GRID_MAX_POINTS_X][GRID_MAX_POINTS_Y];
settings.load_mesh(param.KLS_storage_slot, &tmp_z_values); 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) { GRID_LOOP(x, y) {
z_values[x][y] -= tmp_z_values[x][y]; z_values[x][y] -= tmp_z_values[x][y];

View File

@ -146,9 +146,9 @@ public:
transfer_timeout = millis() + TIMEOUT; transfer_timeout = millis() + TIMEOUT;
switch (static_cast<FileTransfer>(packet_type)) { switch (static_cast<FileTransfer>(packet_type)) {
case FileTransfer::QUERY: 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) #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 #else
SERIAL_ECHOLNPGM(":compression:none"); SERIAL_ECHOLNPGM(":compression:none");
#endif #endif
@ -322,7 +322,7 @@ public:
if (packet.header.checksum == packet.header_checksum) { 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 // 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) { 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; stream_state = StreamState::PACKET_RESET;
break; break;
} }
@ -337,7 +337,7 @@ public:
stream_state = StreamState::PACKET_PROCESS; stream_state = StreamState::PACKET_PROCESS;
} }
else if (packet.header.sync == sync - 1) { // ok response must have been lost 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; stream_state = StreamState::PACKET_RESET;
} }
else if (packet_retries) { else if (packet_retries) {
@ -393,7 +393,7 @@ public:
packet_retries = 0; packet_retries = 0;
bytes_received += packet.header.size; 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(); dispatch();
stream_state = StreamState::PACKET_RESET; stream_state = StreamState::PACKET_RESET;
break; break;
@ -402,7 +402,7 @@ public:
packet_retries++; packet_retries++;
stream_state = StreamState::PACKET_RESET; stream_state = StreamState::PACKET_RESET;
SERIAL_ECHO_MSG("Resend request ", packet_retries); SERIAL_ECHO_MSG("Resend request ", packet_retries);
SERIAL_ECHOLNPAIR("rs", sync); SERIAL_ECHOLNPGM("rs", sync);
} }
else else
stream_state = StreamState::PACKET_ERROR; stream_state = StreamState::PACKET_ERROR;
@ -412,7 +412,7 @@ public:
stream_state = StreamState::PACKET_RESEND; stream_state = StreamState::PACKET_RESEND;
break; break;
case StreamState::PACKET_ERROR: case StreamState::PACKET_ERROR:
SERIAL_ECHOLNPAIR("fe", packet.header.sync); SERIAL_ECHOLNPGM("fe", packet.header.sync);
reset(); // reset everything, resync required reset(); // reset everything, resync required
stream_state = StreamState::PACKET_RESET; stream_state = StreamState::PACKET_RESET;
break; break;

View File

@ -39,7 +39,7 @@ void stop();
#include "../core/debug_out.h" #include "../core/debug_out.h"
bool BLTouch::command(const BLTCommand cmd, const millis_t &ms) { 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); MOVE_SERVO(Z_PROBE_SERVO_NR, cmd);
safe_delay(_MAX(ms, (uint32_t)BLTOUCH_DELAY)); // BLTOUCH_DELAY is also the *minimum* delay safe_delay(_MAX(ms, (uint32_t)BLTOUCH_DELAY)); // BLTOUCH_DELAY is also the *minimum* delay
return triggered(); return triggered();
@ -64,7 +64,7 @@ void BLTouch::init(const bool set_voltage/*=false*/) {
#else #else
if (DEBUGGING(LEVELING)) { if (DEBUGGING(LEVELING)) {
DEBUG_ECHOLNPAIR("last_written_mode - ", last_written_mode); DEBUG_ECHOLNPGM("last_written_mode - ", last_written_mode);
DEBUG_ECHOLNPGM("config mode - " DEBUG_ECHOLNPGM("config mode - "
#if ENABLED(BLTOUCH_SET_5V_MODE) #if ENABLED(BLTOUCH_SET_5V_MODE)
"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 _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 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 if (tr) _stow(); else _deploy(); // Turn off SW mode, reset any trigger, honor pin state
return !tr; 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.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 * 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(); _deploy();
if (M5V) _set_5V_mode(); else _set_OD_mode(); if (M5V) _set_5V_mode(); else _set_OD_mode();
_mode_store(); _mode_store();

View File

@ -85,15 +85,15 @@ void StepperDAC::print_values() {
if (!dac_present) return; if (!dac_present) return;
SERIAL_ECHO_MSG("Stepper current values in % (Amps):"); SERIAL_ECHO_MSG("Stepper current values in % (Amps):");
SERIAL_ECHO_START(); 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 #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 #endif
#if HAS_Z_AXIS #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 #endif
#if HAS_EXTRUDERS #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 #endif
} }

View File

@ -49,7 +49,7 @@ void I2CPositionEncoder::init(const uint8_t address, const AxisEnum axis) {
initialized = true; 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(); position = get_position();
} }
@ -67,7 +67,7 @@ void I2CPositionEncoder::update() {
/* /*
if (trusted) { //commented out as part of the note below if (trusted) { //commented out as part of the note below
trusted = false; 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; return;
@ -92,7 +92,7 @@ void I2CPositionEncoder::update() {
if (millis() - lastErrorTime > I2CPE_TIME_TRUSTED) { if (millis() - lastErrorTime > I2CPE_TIME_TRUSTED) {
trusted = true; 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 //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 //idea of where it the axis is to re-initialize
@ -103,10 +103,10 @@ void I2CPositionEncoder::update() {
zeroOffset -= (positionInTicks - get_position()); zeroOffset -= (positionInTicks - get_position());
#ifdef I2CPE_DEBUG #ifdef I2CPE_DEBUG
SERIAL_ECHOLNPAIR("Current position is ", pos); SERIAL_ECHOLNPGM("Current position is ", pos);
SERIAL_ECHOLNPAIR("Position in encoder ticks is ", positionInTicks); SERIAL_ECHOLNPGM("Position in encoder ticks is ", positionInTicks);
SERIAL_ECHOLNPAIR("New zero-offset of ", zeroOffset); SERIAL_ECHOLNPGM("New zero-offset of ", zeroOffset);
SERIAL_ECHOPAIR("New position reads as ", get_position()); SERIAL_ECHOPGM("New position reads as ", get_position());
SERIAL_CHAR('('); SERIAL_CHAR('(');
SERIAL_DECIMAL(mm_from_count(get_position())); SERIAL_DECIMAL(mm_from_count(get_position()));
SERIAL_ECHOLNPGM(")"); SERIAL_ECHOLNPGM(")");
@ -149,12 +149,12 @@ void I2CPositionEncoder::update() {
const int32_t error = get_axis_error_steps(false); const int32_t error = get_axis_error_steps(false);
#endif #endif
//SERIAL_ECHOLNPAIR("Axis error steps: ", error); //SERIAL_ECHOLNPGM("Axis error steps: ", error);
#ifdef I2CPE_ERR_THRESH_ABORT #ifdef I2CPE_ERR_THRESH_ABORT
if (ABS(error) > I2CPE_ERR_THRESH_ABORT * planner.settings.axis_steps_per_mm[encoderAxis]) { if (ABS(error) > I2CPE_ERR_THRESH_ABORT * planner.settings.axis_steps_per_mm[encoderAxis]) {
//kill(PSTR("Significant Error")); //kill(PSTR("Significant Error"));
SERIAL_ECHOLNPAIR("Axis error over threshold, aborting!", error); SERIAL_ECHOLNPGM("Axis error over threshold, aborting!", error);
safe_delay(5000); safe_delay(5000);
} }
#endif #endif
@ -173,7 +173,7 @@ void I2CPositionEncoder::update() {
LOOP_L_N(i, I2CPE_ERR_PRST_ARRAY_SIZE) sumP += errPrst[i]; 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)); const int32_t errorP = int32_t(sumP * RECIPROCAL(I2CPE_ERR_PRST_ARRAY_SIZE));
SERIAL_CHAR(axis_codes[encoderAxis]); 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)); babystep.add_steps(encoderAxis, -LROUND(errorP));
errPrstIdx = 0; errPrstIdx = 0;
} }
@ -193,7 +193,7 @@ void I2CPositionEncoder::update() {
const millis_t ms = millis(); const millis_t ms = millis();
if (ELAPSED(ms, nextErrorCountTime)) { if (ELAPSED(ms, nextErrorCountTime)) {
SERIAL_CHAR(axis_codes[encoderAxis]); SERIAL_CHAR(axis_codes[encoderAxis]);
SERIAL_ECHOLNPAIR(" : LARGE ERR ", error, "; diffSum=", diffSum); SERIAL_ECHOLNPGM(" : LARGE ERR ", error, "; diffSum=", diffSum);
errorCount++; errorCount++;
nextErrorCountTime = ms + I2CPE_ERR_CNT_DEBOUNCE_MS; nextErrorCountTime = ms + I2CPE_ERR_CNT_DEBOUNCE_MS;
} }
@ -213,7 +213,7 @@ void I2CPositionEncoder::set_homed() {
#ifdef I2CPE_DEBUG #ifdef I2CPE_DEBUG
SERIAL_CHAR(axis_codes[encoderAxis]); SERIAL_CHAR(axis_codes[encoderAxis]);
SERIAL_ECHOLNPAIR(" axis encoder homed, offset of ", zeroOffset, " ticks."); SERIAL_ECHOLNPGM(" axis encoder homed, offset of ", zeroOffset, " ticks.");
#endif #endif
} }
} }
@ -253,7 +253,7 @@ float I2CPositionEncoder::get_axis_error_mm(const bool report) {
if (report) { if (report) {
SERIAL_CHAR(axis_codes[encoderAxis]); 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; return error;
@ -288,7 +288,7 @@ int32_t I2CPositionEncoder::get_axis_error_steps(const bool report) {
if (report) { if (report) {
SERIAL_CHAR(axis_codes[encoderAxis]); 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) { if (suppressOutput) {
@ -424,15 +424,15 @@ void I2CPositionEncoder::calibrate_steps_mm(const uint8_t iter) {
travelledDistance = mm_from_count(ABS(stopCount - startCount)); travelledDistance = mm_from_count(ABS(stopCount - startCount));
SERIAL_ECHOLNPAIR("Attempted travel: ", travelDistance, "mm"); SERIAL_ECHOLNPGM("Attempted travel: ", travelDistance, "mm");
SERIAL_ECHOLNPAIR(" Actual travel: ", travelledDistance, "mm"); SERIAL_ECHOLNPGM(" Actual travel: ", travelledDistance, "mm");
//Calculate new axis steps per unit //Calculate new axis steps per unit
old_steps_mm = planner.settings.axis_steps_per_mm[encoderAxis]; old_steps_mm = planner.settings.axis_steps_per_mm[encoderAxis];
new_steps_mm = (old_steps_mm * travelDistance) / travelledDistance; new_steps_mm = (old_steps_mm * travelDistance) / travelledDistance;
SERIAL_ECHOLNPAIR("Old steps/mm: ", old_steps_mm); SERIAL_ECHOLNPGM("Old steps/mm: ", old_steps_mm);
SERIAL_ECHOLNPAIR("New steps/mm: ", new_steps_mm); SERIAL_ECHOLNPGM("New steps/mm: ", new_steps_mm);
//Save new value //Save new value
planner.settings.axis_steps_per_mm[encoderAxis] = new_steps_mm; 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) { if (iter > 1) {
total /= (float)iter; total /= (float)iter;
SERIAL_ECHOLNPAIR("Average steps/mm: ", total); SERIAL_ECHOLNPGM("Average steps/mm: ", total);
} }
ec = oldec; ec = oldec;
@ -675,18 +675,18 @@ void I2CPositionEncodersMgr::change_module_address(const uint8_t oldaddr, const
// First check 'new' address is not in use // First check 'new' address is not in use
Wire.beginTransmission(I2C_ADDRESS(newaddr)); Wire.beginTransmission(I2C_ADDRESS(newaddr));
if (!Wire.endTransmission()) { 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; return;
} }
// Now check that we can find the module on the oldaddr address // Now check that we can find the module on the oldaddr address
Wire.beginTransmission(I2C_ADDRESS(oldaddr)); Wire.beginTransmission(I2C_ADDRESS(oldaddr));
if (Wire.endTransmission()) { if (Wire.endTransmission()) {
SERIAL_ECHOLNPAIR("?No module detected at this address! (", oldaddr, ")"); SERIAL_ECHOLNPGM("?No module detected at this address! (", oldaddr, ")");
return; 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 // Change the modules address
Wire.beginTransmission(I2C_ADDRESS(oldaddr)); Wire.beginTransmission(I2C_ADDRESS(oldaddr));
@ -722,11 +722,11 @@ void I2CPositionEncodersMgr::report_module_firmware(const uint8_t address) {
// First check there is a module // First check there is a module
Wire.beginTransmission(I2C_ADDRESS(address)); Wire.beginTransmission(I2C_ADDRESS(address));
if (Wire.endTransmission()) { if (Wire.endTransmission()) {
SERIAL_ECHOLNPAIR("?No module detected at this address! (", address, ")"); SERIAL_ECHOLNPGM("?No module detected at this address! (", address, ")");
return; 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.beginTransmission(I2C_ADDRESS(address));
Wire.write(I2CPE_SET_REPORT_MODE); Wire.write(I2CPE_SET_REPORT_MODE);
@ -773,13 +773,13 @@ int8_t I2CPositionEncodersMgr::parse() {
else if (parser.seenval('I')) { else if (parser.seenval('I')) {
if (!parser.has_value()) { 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; return I2CPE_PARSE_ERR;
}; };
I2CPE_idx = parser.value_byte(); I2CPE_idx = parser.value_byte();
if (I2CPE_idx >= I2CPE_ENCODER_CNT) { 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; return I2CPE_PARSE_ERR;
} }
@ -954,7 +954,7 @@ void I2CPositionEncodersMgr::M864() {
else return; 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); change_module_address(I2CPE_addr, newAddress);
} }

View File

@ -236,7 +236,7 @@ class I2CPositionEncodersMgr {
static void report_status(const int8_t idx) { static void report_status(const int8_t idx) {
CHECK_IDX(); CHECK_IDX();
SERIAL_ECHOLNPAIR("Encoder ", idx, ": "); SERIAL_ECHOLNPGM("Encoder ", idx, ": ");
encoders[idx].get_raw_count(); encoders[idx].get_raw_count();
encoders[idx].passes_test(true); encoders[idx].passes_test(true);
} }
@ -261,32 +261,32 @@ class I2CPositionEncodersMgr {
static void report_error_count(const int8_t idx, const AxisEnum axis) { static void report_error_count(const int8_t idx, const AxisEnum axis) {
CHECK_IDX(); 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) { static void reset_error_count(const int8_t idx, const AxisEnum axis) {
CHECK_IDX(); CHECK_IDX();
encoders[idx].set_error_count(0); 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) { static void enable_ec(const int8_t idx, const bool enabled, const AxisEnum axis) {
CHECK_IDX(); CHECK_IDX();
encoders[idx].set_ec_enabled(enabled); 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"); 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) { static void set_ec_threshold(const int8_t idx, const float newThreshold, const AxisEnum axis) {
CHECK_IDX(); CHECK_IDX();
encoders[idx].set_ec_threshold(newThreshold); 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) { static void get_ec_threshold(const int8_t idx, const AxisEnum axis) {
CHECK_IDX(); CHECK_IDX();
const float threshold = encoders[idx].get_ec_threshold(); 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) { static int8_t idx_from_axis(const AxisEnum axis) {

View File

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

View File

@ -68,13 +68,13 @@ Joystick joystick;
void Joystick::report() { void Joystick::report() {
SERIAL_ECHOPGM("Joystick"); SERIAL_ECHOPGM("Joystick");
#if HAS_JOY_ADC_X #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 #endif
#if HAS_JOY_ADC_Y #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 #endif
#if HAS_JOY_ADC_Z #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 #endif
#if HAS_JOY_ADC_EN #if HAS_JOY_ADC_EN
SERIAL_ECHO_TERNARY(READ(JOY_EN_PIN), " EN=", "HIGH (dis", "LOW (en", "abled)"); SERIAL_ECHO_TERNARY(READ(JOY_EN_PIN), " EN=", "HIGH (dis", "LOW (en", "abled)");

View File

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

View File

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

View File

@ -154,11 +154,11 @@ void Mixer::refresh_collector(const float proportion/*=1.0*/, const uint8_t t/*=
cmax = _MAX(cmax, v); cmax = _MAX(cmax, v);
csum += 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; const float inv_prop = proportion / csum;
MIXER_STEPPER_LOOP(i) { MIXER_STEPPER_LOOP(i) {
c[i] = color[t][i] * inv_prop; 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(); //SERIAL_EOL();
} }

View File

@ -152,7 +152,7 @@ class Mixer {
MIXER_STEPPER_LOOP(i) mix[i] = mixer_perc_t(100.0f * color[j][i] / ctot); MIXER_STEPPER_LOOP(i) mix[i] = mixer_perc_t(100.0f * color[j][i] / ctot);
#ifdef MIXER_NORMALIZER_DEBUG #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_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_ECHOPGM(" ] to Mix [ ");
SERIAL_ECHOLIST_N(MIXING_STEPPERS, mix[0], mix[1], mix[2], mix[3], mix[4], mix[5]); SERIAL_ECHOLIST_N(MIXING_STEPPERS, mix[0], mix[1], mix[2], mix[3], mix[4], mix[5]);

View File

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

View File

@ -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) { static bool ensure_safe_temperature(const bool wait=true, const PauseMode mode=PAUSE_MODE_SAME) {
DEBUG_SECTION(est, "ensure_safe_temperature", true); 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 ENABLED(PREVENT_COLD_EXTRUSION)
if (!DEBUGGING(DRYRUN) && thermalManager.targetTooColdToExtrude(active_extruder)) 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 DXC_ARGS
) { ) {
DEBUG_SECTION(lf, "load_filament", true); 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 (!ensure_safe_temperature(false, mode)) {
if (show_lcd) ui.pause_show_message(PAUSE_MESSAGE_STATUS, 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 #endif
) { ) {
DEBUG_SECTION(uf, "unload_filament", true); 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) #if BOTH(FILAMENT_UNLOAD_ALL_EXTRUDERS, MIXING_EXTRUDER)
, " mixmult:", mix_multiplier , " mixmult:", mix_multiplier
#endif #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) { 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_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); 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 // Initial retract before move to filament change position
if (retract && thermalManager.hotEnoughToExtrude(active_extruder)) { if (retract && thermalManager.hotEnoughToExtrude(active_extruder)) {
DEBUG_ECHOLNPAIR("... retract:", retract); DEBUG_ECHOLNPGM("... retract:", retract);
unscaled_e_move(retract, PAUSE_PARK_RETRACT_FEEDRATE); 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) { void show_continue_prompt(const bool is_reload) {
DEBUG_SECTION(scp, "pause_print", true); 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); ui.pause_show_message(is_reload ? PAUSE_MESSAGE_INSERT : PAUSE_MESSAGE_WAITING);
SERIAL_ECHO_START(); 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) { 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_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; 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) { 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_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, "start of resume_print()\ndual_x_carriage_mode:", dual_x_carriage_mode,
"\nextruder_duplication_enabled:", extruder_duplication_enabled, "\nextruder_duplication_enabled:", extruder_duplication_enabled,
"\nactive_extruder:", active_extruder, "\nactive_extruder:", active_extruder,

View File

@ -577,7 +577,7 @@ void PrintJobRecovery::resume() {
void PrintJobRecovery::debug(PGM_P const prefix) { void PrintJobRecovery::debug(PGM_P const prefix) {
DEBUG_ECHOPGM_P(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) {
if (info.valid_head == info.valid_foot) { if (info.valid_head == info.valid_foot) {
DEBUG_ECHOPGM("current_position: "); DEBUG_ECHOPGM("current_position: ");
@ -587,14 +587,14 @@ void PrintJobRecovery::resume() {
} }
DEBUG_EOL(); 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) #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) 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 #endif
#if HAS_HOME_OFFSET #if HAS_HOME_OFFSET
@ -616,12 +616,12 @@ void PrintJobRecovery::resume() {
#endif #endif
#if HAS_MULTI_EXTRUDER #if HAS_MULTI_EXTRUDER
DEBUG_ECHOLNPAIR("active_extruder: ", info.active_extruder); DEBUG_ECHOLNPGM("active_extruder: ", info.active_extruder);
#endif #endif
#if DISABLED(NO_VOLUMETRICS) #if DISABLED(NO_VOLUMETRICS)
DEBUG_ECHOPGM("filament_size:"); 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(); DEBUG_EOL();
#endif #endif
@ -635,7 +635,7 @@ void PrintJobRecovery::resume() {
#endif #endif
#if HAS_HEATED_BED #if HAS_HEATED_BED
DEBUG_ECHOLNPAIR("target_temperature_bed: ", info.target_temperature_bed); DEBUG_ECHOLNPGM("target_temperature_bed: ", info.target_temperature_bed);
#endif #endif
#if HAS_FAN #if HAS_FAN
@ -648,7 +648,7 @@ void PrintJobRecovery::resume() {
#endif #endif
#if HAS_LEVELING #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 #endif
#if ENABLED(FWRETRACT) #if ENABLED(FWRETRACT)
@ -658,17 +658,17 @@ void PrintJobRecovery::resume() {
if (e < EXTRUDERS - 1) DEBUG_CHAR(','); if (e < EXTRUDERS - 1) DEBUG_CHAR(',');
} }
DEBUG_EOL(); DEBUG_EOL();
DEBUG_ECHOLNPAIR("retract_hop: ", info.retract_hop); DEBUG_ECHOLNPGM("retract_hop: ", info.retract_hop);
#endif #endif
// Mixing extruder and gradient // Mixing extruder and gradient
#if BOTH(MIXING_EXTRUDER, GRADIENT_MIX) #if BOTH(MIXING_EXTRUDER, GRADIENT_MIX)
DEBUG_ECHOLNPAIR("gradient: ", info.gradient.enabled ? "ON" : "OFF"); DEBUG_ECHOLNPGM("gradient: ", info.gradient.enabled ? "ON" : "OFF");
#endif #endif
DEBUG_ECHOLNPAIR("sd_filename: ", info.sd_filename); DEBUG_ECHOLNPGM("sd_filename: ", info.sd_filename);
DEBUG_ECHOLNPAIR("sdpos: ", info.sdpos); DEBUG_ECHOLNPGM("sdpos: ", info.sdpos);
DEBUG_ECHOLNPAIR("print_job_elapsed: ", info.print_job_elapsed); DEBUG_ECHOLNPGM("print_job_elapsed: ", info.print_job_elapsed);
DEBUG_ECHOPGM("axis_relative:"); DEBUG_ECHOPGM("axis_relative:");
if (TEST(info.axis_relative, REL_X)) DEBUG_ECHOPGM(" REL_X"); 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"); if (TEST(info.axis_relative, E_MODE_REL)) DEBUG_ECHOPGM(" E_MODE_REL");
DEBUG_EOL(); DEBUG_EOL();
DEBUG_ECHOLNPAIR("flag.dryrun: ", AS_DIGIT(info.flag.dryrun)); DEBUG_ECHOLNPGM("flag.dryrun: ", AS_DIGIT(info.flag.dryrun));
DEBUG_ECHOLNPAIR("flag.allow_cold_extrusion: ", AS_DIGIT(info.flag.allow_cold_extrusion)); DEBUG_ECHOLNPGM("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.volumetric_enabled: ", AS_DIGIT(info.flag.volumetric_enabled));
} }
else else
DEBUG_ECHOLNPGM("INVALID DATA"); DEBUG_ECHOLNPGM("INVALID DATA");

View File

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

View File

@ -43,7 +43,7 @@ void Repeat::add_marker(const uint32_t sdpos, const uint16_t count) {
marker[index].sdpos = sdpos; marker[index].sdpos = sdpos;
marker[index].counter = count ?: -1; marker[index].counter = count ?: -1;
index++; 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 { else {
const uint8_t ind = index - 1; // Active marker's index const uint8_t ind = index - 1; // Active marker's index
if (!marker[ind].counter) { // Did its counter run out? 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'. index--; // Carry on. Previous marker on the next 'M808'.
} }
else { else {
card.setIndex(marker[ind].sdpos); // Loop back to the marker. card.setIndex(marker[ind].sdpos); // Loop back to the marker.
if (marker[ind].counter > 0) // Ignore a negative (or zero) counter. 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. --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) { void Repeat::early_parse_M808(char * const cmd) {
if (is_command_M808(cmd)) { if (is_command_M808(cmd)) {
DEBUG_ECHOLNPAIR("Parsing \"", cmd, "\""); DEBUG_ECHOLNPGM("Parsing \"", cmd, "\"");
parser.parse(cmd); parser.parse(cmd);
if (parser.seen('L')) if (parser.seen('L'))
add_marker(card.getIndex(), parser.value_ushort()); add_marker(card.getIndex(), parser.value_ushort());

View File

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

View File

@ -145,7 +145,7 @@ class TFilamentMonitor : public FilamentMonitorBase {
if (runout_flags) { if (runout_flags) {
SERIAL_ECHOPGM("Runout Sensors: "); SERIAL_ECHOPGM("Runout Sensors: ");
LOOP_L_N(i, 8) SERIAL_ECHO('0' + TEST(runout_flags, i)); 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"); if (ran_out) SERIAL_ECHOPGM(" RUN OUT");
SERIAL_EOL(); SERIAL_EOL();
} }
@ -317,7 +317,7 @@ class FilamentSensorBase {
static uint8_t was_out; // = 0 static uint8_t was_out; // = 0
if (out != TEST(was_out, s)) { if (out != TEST(was_out, s)) {
TBI(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 #endif
} }
@ -352,7 +352,7 @@ class FilamentSensorBase {
if (ELAPSED(ms, t)) { if (ELAPSED(ms, t)) {
t = millis() + 1000UL; t = millis() + 1000UL;
LOOP_L_N(i, NUM_RUNOUT_SENSORS) 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(); SERIAL_EOL();
} }
#endif #endif

View File

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

View File

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

View File

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

View File

@ -539,7 +539,7 @@ void GcodeSuite::G26() {
if (bedtemp) { if (bedtemp) {
if (!WITHIN(bedtemp, 40, BED_MAX_TARGET)) { 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; return;
} }
g26.bed_temp = bedtemp; g26.bed_temp = bedtemp;

View File

@ -106,19 +106,19 @@ void GcodeSuite::G35() {
const float z_probed_height = probe.probe_at_point(tramming_points[i], PROBE_PT_RAISE, 0, true); const float z_probed_height = probe.probe_at_point(tramming_points[i], PROBE_PT_RAISE, 0, true);
if (isnan(z_probed_height)) { 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_ECHOPGM_P((char *)pgm_read_ptr(&tramming_point_name[i]));
SERIAL_CHAR(')'); 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; err_break = true;
break; break;
} }
if (DEBUGGING(LEVELING)) { 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_ECHOPGM_P((char *)pgm_read_ptr(&tramming_point_name[i]));
DEBUG_CHAR(')'); 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; z_measured[i] = z_probed_height;
@ -138,9 +138,9 @@ void GcodeSuite::G35() {
SERIAL_ECHOPGM("Turn "); SERIAL_ECHOPGM("Turn ");
SERIAL_ECHOPGM_P((char *)pgm_read_ptr(&tramming_point_name[i])); 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"); SERIAL_ECHOPGM(" ", (screw_thread & 1) == (adjust > 0) ? "CCW" : "CW", " by ", ABS(full_turns), " turns");
if (minutes) SERIAL_ECHOPAIR(" and ", ABS(minutes), " minutes"); if (minutes) SERIAL_ECHOPGM(" and ", ABS(minutes), " minutes");
if (ENABLED(REPORT_TRAMMING_MM)) SERIAL_ECHOPAIR(" (", -diff, "mm)"); if (ENABLED(REPORT_TRAMMING_MM)) SERIAL_ECHOPGM(" (", -diff, "mm)");
SERIAL_EOL(); SERIAL_EOL();
} }
} }

View File

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

View File

@ -379,7 +379,7 @@ G29_TYPE GcodeSuite::G29() {
if (!probe.good_bounds(abl.probe_position_lf, abl.probe_position_rb)) { if (!probe.good_bounds(abl.probe_position_lf, abl.probe_position_rb)) {
if (DEBUGGING(LEVELING)) { 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); " F", abl.probe_position_lf.y, " B", abl.probe_position_rb.y);
} }
SERIAL_ECHOLNPGM("? (L,R,F,B) out of bounds."); SERIAL_ECHOLNPGM("? (L,R,F,B) out of bounds.");
@ -470,7 +470,7 @@ G29_TYPE GcodeSuite::G29() {
if (abl.verbose_level || seenQ) { if (abl.verbose_level || seenQ) {
SERIAL_ECHOPGM("Manual G29 "); SERIAL_ECHOPGM("Manual G29 ");
if (g29_in_progress) 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 else
SERIAL_ECHOLNPGM("idle"); SERIAL_ECHOLNPGM("idle");
} }
@ -513,7 +513,7 @@ G29_TYPE GcodeSuite::G29() {
z_values[abl.meshCount.x][abl.meshCount.y] = newz; z_values[abl.meshCount.x][abl.meshCount.y] = newz;
TERN_(EXTENSIBLE_UI, ExtUI::onMeshUpdate(abl.meshCount, 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 #endif
} }
@ -635,7 +635,7 @@ G29_TYPE GcodeSuite::G29() {
// Avoid probing outside the round or hexagonal area // Avoid probing outside the round or hexagonal area
if (TERN0(IS_KINEMATIC, !probe.can_reach(abl.probePos))) continue; 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))); 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); 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 // Probe at 3 arbitrary points
LOOP_L_N(i, 3) { 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))); 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 // Retain the last probe position
@ -842,7 +842,7 @@ G29_TYPE GcodeSuite::G29() {
&& NEAR(current_position.y, abl.probePos.y - probe.offset_xy.y) && NEAR(current_position.y, abl.probePos.y - probe.offset_xy.y)
) { ) {
const float simple_z = current_position.z - abl.measured_z; 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; converted.z = simple_z;
} }
@ -855,14 +855,14 @@ G29_TYPE GcodeSuite::G29() {
#elif ENABLED(AUTO_BED_LEVELING_BILINEAR) #elif ENABLED(AUTO_BED_LEVELING_BILINEAR)
if (!abl.dryrun) { 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 // Unapply the offset because it is going to be immediately applied
// and cause compensation movement in Z // 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); 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); 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 #endif // ABL_PLANAR
@ -880,7 +880,7 @@ G29_TYPE GcodeSuite::G29() {
TERN_(HAS_BED_PROBE, probe.move_z_after_probing()); TERN_(HAS_BED_PROBE, probe.move_z_after_probing());
#ifdef Z_PROBE_END_SCRIPT #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(); planner.synchronize();
process_subcommands_now_P(PSTR(Z_PROBE_END_SCRIPT)); process_subcommands_now_P(PSTR(Z_PROBE_END_SCRIPT));
#endif #endif

View File

@ -173,7 +173,7 @@ void GcodeSuite::G29() {
if (parser.seenval('I')) { if (parser.seenval('I')) {
ix = parser.value_int(); ix = parser.value_int();
if (!WITHIN(ix, 0, (GRID_MAX_POINTS_X) - 1)) { 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; return;
} }
} }
@ -183,7 +183,7 @@ void GcodeSuite::G29() {
if (parser.seenval('J')) { if (parser.seenval('J')) {
iy = parser.value_int(); iy = parser.value_int();
if (!WITHIN(iy, 0, (GRID_MAX_POINTS_Y) - 1)) { 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; return;
} }
} }
@ -213,7 +213,7 @@ void GcodeSuite::G29() {
} // switch(state) } // switch(state)
if (state == MeshNext) { 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))); 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)));
} }

View File

@ -270,7 +270,7 @@ void GcodeSuite::G28() {
#if HAS_HOMING_CURRENT #if HAS_HOMING_CURRENT
auto debug_current = [](PGM_P const s, const int16_t a, const int16_t b) { 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) #if HAS_CURRENT_HOME(X)
const int16_t tmc_save_current_X = stepperX.getMilliamps(); 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))) { 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) // 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); do_z_clearance(z_homing_height);
TERN_(BLTOUCH, bltouch.init()); TERN_(BLTOUCH, bltouch.init());
} }

View File

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

View File

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

View File

@ -354,44 +354,44 @@ inline void probe_sides(measurements_t &m, const float uncertainty) {
inline void report_measured_faces(const measurements_t &m) { inline void report_measured_faces(const measurements_t &m) {
SERIAL_ECHOLNPGM("Sides:"); SERIAL_ECHOLNPGM("Sides:");
#if HAS_Z_AXIS && AXIS_CAN_CALIBRATE(Z) #if HAS_Z_AXIS && AXIS_CAN_CALIBRATE(Z)
SERIAL_ECHOLNPAIR(" Top: ", m.obj_side[TOP]); SERIAL_ECHOLNPGM(" Top: ", m.obj_side[TOP]);
#endif #endif
#if ENABLED(CALIBRATION_MEASURE_LEFT) #if ENABLED(CALIBRATION_MEASURE_LEFT)
SERIAL_ECHOLNPAIR(" Left: ", m.obj_side[LEFT]); SERIAL_ECHOLNPGM(" Left: ", m.obj_side[LEFT]);
#endif #endif
#if ENABLED(CALIBRATION_MEASURE_RIGHT) #if ENABLED(CALIBRATION_MEASURE_RIGHT)
SERIAL_ECHOLNPAIR(" Right: ", m.obj_side[RIGHT]); SERIAL_ECHOLNPGM(" Right: ", m.obj_side[RIGHT]);
#endif #endif
#if HAS_Y_AXIS #if HAS_Y_AXIS
#if ENABLED(CALIBRATION_MEASURE_FRONT) #if ENABLED(CALIBRATION_MEASURE_FRONT)
SERIAL_ECHOLNPAIR(" Front: ", m.obj_side[FRONT]); SERIAL_ECHOLNPGM(" Front: ", m.obj_side[FRONT]);
#endif #endif
#if ENABLED(CALIBRATION_MEASURE_BACK) #if ENABLED(CALIBRATION_MEASURE_BACK)
SERIAL_ECHOLNPAIR(" Back: ", m.obj_side[BACK]); SERIAL_ECHOLNPGM(" Back: ", m.obj_side[BACK]);
#endif #endif
#endif #endif
#if LINEAR_AXES >= 4 #if LINEAR_AXES >= 4
#if ENABLED(CALIBRATION_MEASURE_IMIN) #if ENABLED(CALIBRATION_MEASURE_IMIN)
SERIAL_ECHOLNPAIR(" " STR_I_MIN ": ", m.obj_side[IMINIMUM]); SERIAL_ECHOLNPGM(" " STR_I_MIN ": ", m.obj_side[IMINIMUM]);
#endif #endif
#if ENABLED(CALIBRATION_MEASURE_IMAX) #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
#endif #endif
#if LINEAR_AXES >= 5 #if LINEAR_AXES >= 5
#if ENABLED(CALIBRATION_MEASURE_JMIN) #if ENABLED(CALIBRATION_MEASURE_JMIN)
SERIAL_ECHOLNPAIR(" " STR_J_MIN ": ", m.obj_side[JMINIMUM]); SERIAL_ECHOLNPGM(" " STR_J_MIN ": ", m.obj_side[JMINIMUM]);
#endif #endif
#if ENABLED(CALIBRATION_MEASURE_JMAX) #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
#endif #endif
#if LINEAR_AXES >= 6 #if LINEAR_AXES >= 6
#if ENABLED(CALIBRATION_MEASURE_KMIN) #if ENABLED(CALIBRATION_MEASURE_KMIN)
SERIAL_ECHOLNPAIR(" " STR_K_MIN ": ", m.obj_side[KMINIMUM]); SERIAL_ECHOLNPGM(" " STR_K_MIN ": ", m.obj_side[KMINIMUM]);
#endif #endif
#if ENABLED(CALIBRATION_MEASURE_KMAX) #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
#endif #endif
SERIAL_EOL(); 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) { inline void report_measured_center(const measurements_t &m) {
SERIAL_ECHOLNPGM("Center:"); SERIAL_ECHOLNPGM("Center:");
#if HAS_X_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 #endif
#if HAS_Y_CENTER #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 #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 #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 #endif
#if HAS_J_CENTER #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 #endif
#if HAS_K_CENTER #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 #endif
SERIAL_EOL(); SERIAL_EOL();
} }
@ -422,45 +422,45 @@ inline void probe_sides(measurements_t &m, const float uncertainty) {
SERIAL_ECHOLNPGM("Backlash:"); SERIAL_ECHOLNPGM("Backlash:");
#if AXIS_CAN_CALIBRATE(X) #if AXIS_CAN_CALIBRATE(X)
#if ENABLED(CALIBRATION_MEASURE_LEFT) #if ENABLED(CALIBRATION_MEASURE_LEFT)
SERIAL_ECHOLNPAIR(" Left: ", m.backlash[LEFT]); SERIAL_ECHOLNPGM(" Left: ", m.backlash[LEFT]);
#endif #endif
#if ENABLED(CALIBRATION_MEASURE_RIGHT) #if ENABLED(CALIBRATION_MEASURE_RIGHT)
SERIAL_ECHOLNPAIR(" Right: ", m.backlash[RIGHT]); SERIAL_ECHOLNPGM(" Right: ", m.backlash[RIGHT]);
#endif #endif
#endif #endif
#if HAS_Y_AXIS && AXIS_CAN_CALIBRATE(Y) #if HAS_Y_AXIS && AXIS_CAN_CALIBRATE(Y)
#if ENABLED(CALIBRATION_MEASURE_FRONT) #if ENABLED(CALIBRATION_MEASURE_FRONT)
SERIAL_ECHOLNPAIR(" Front: ", m.backlash[FRONT]); SERIAL_ECHOLNPGM(" Front: ", m.backlash[FRONT]);
#endif #endif
#if ENABLED(CALIBRATION_MEASURE_BACK) #if ENABLED(CALIBRATION_MEASURE_BACK)
SERIAL_ECHOLNPAIR(" Back: ", m.backlash[BACK]); SERIAL_ECHOLNPGM(" Back: ", m.backlash[BACK]);
#endif #endif
#endif #endif
#if HAS_Z_AXIS && AXIS_CAN_CALIBRATE(Z) #if HAS_Z_AXIS && AXIS_CAN_CALIBRATE(Z)
SERIAL_ECHOLNPAIR(" Top: ", m.backlash[TOP]); SERIAL_ECHOLNPGM(" Top: ", m.backlash[TOP]);
#endif #endif
#if LINEAR_AXES >= 4 && AXIS_CAN_CALIBRATE(I) #if LINEAR_AXES >= 4 && AXIS_CAN_CALIBRATE(I)
#if ENABLED(CALIBRATION_MEASURE_IMIN) #if ENABLED(CALIBRATION_MEASURE_IMIN)
SERIAL_ECHOLNPAIR(" " STR_I_MIN ": ", m.backlash[IMINIMUM]); SERIAL_ECHOLNPGM(" " STR_I_MIN ": ", m.backlash[IMINIMUM]);
#endif #endif
#if ENABLED(CALIBRATION_MEASURE_IMAX) #if ENABLED(CALIBRATION_MEASURE_IMAX)
SERIAL_ECHOLNPAIR(" " STR_I_MAX ": ", m.backlash[IMAXIMUM]); SERIAL_ECHOLNPGM(" " STR_I_MAX ": ", m.backlash[IMAXIMUM]);
#endif #endif
#endif #endif
#if LINEAR_AXES >= 5 && AXIS_CAN_CALIBRATE(J) #if LINEAR_AXES >= 5 && AXIS_CAN_CALIBRATE(J)
#if ENABLED(CALIBRATION_MEASURE_JMIN) #if ENABLED(CALIBRATION_MEASURE_JMIN)
SERIAL_ECHOLNPAIR(" " STR_J_MIN ": ", m.backlash[JMINIMUM]); SERIAL_ECHOLNPGM(" " STR_J_MIN ": ", m.backlash[JMINIMUM]);
#endif #endif
#if ENABLED(CALIBRATION_MEASURE_JMAX) #if ENABLED(CALIBRATION_MEASURE_JMAX)
SERIAL_ECHOLNPAIR(" " STR_J_MAX ": ", m.backlash[JMAXIMUM]); SERIAL_ECHOLNPGM(" " STR_J_MAX ": ", m.backlash[JMAXIMUM]);
#endif #endif
#endif #endif
#if LINEAR_AXES >= 6 && AXIS_CAN_CALIBRATE(K) #if LINEAR_AXES >= 6 && AXIS_CAN_CALIBRATE(K)
#if ENABLED(CALIBRATION_MEASURE_KMIN) #if ENABLED(CALIBRATION_MEASURE_KMIN)
SERIAL_ECHOLNPAIR(" " STR_K_MIN ": ", m.backlash[KMINIMUM]); SERIAL_ECHOLNPGM(" " STR_K_MIN ": ", m.backlash[KMINIMUM]);
#endif #endif
#if ENABLED(CALIBRATION_MEASURE_KMAX) #if ENABLED(CALIBRATION_MEASURE_KMAX)
SERIAL_ECHOLNPAIR(" " STR_K_MAX ": ", m.backlash[KMAXIMUM]); SERIAL_ECHOLNPGM(" " STR_K_MAX ": ", m.backlash[KMAXIMUM]);
#endif #endif
#endif #endif
SERIAL_EOL(); SERIAL_EOL();
@ -471,22 +471,22 @@ inline void probe_sides(measurements_t &m, const float uncertainty) {
SERIAL_ECHO(active_extruder); SERIAL_ECHO(active_extruder);
SERIAL_ECHOLNPGM(" Positional Error:"); SERIAL_ECHOLNPGM(" Positional Error:");
#if HAS_X_CENTER && AXIS_CAN_CALIBRATE(X) #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 #endif
#if HAS_Y_CENTER && AXIS_CAN_CALIBRATE(Y) #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 #endif
#if HAS_Z_AXIS && AXIS_CAN_CALIBRATE(Z) #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 #endif
#if HAS_I_CENTER && AXIS_CAN_CALIBRATE(I) #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 #endif
#if HAS_J_CENTER && AXIS_CAN_CALIBRATE(J) #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 #endif
#if HAS_K_CENTER && AXIS_CAN_CALIBRATE(K) #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 #endif
SERIAL_EOL(); 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) { inline void report_measured_nozzle_dimensions(const measurements_t &m) {
SERIAL_ECHOLNPGM("Nozzle Tip Outer Dimensions:"); SERIAL_ECHOLNPGM("Nozzle Tip Outer Dimensions:");
#if HAS_X_CENTER #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 #endif
#if HAS_Y_CENTER #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 #endif
SERIAL_EOL(); SERIAL_EOL();
UNUSED(m); UNUSED(m);
@ -509,7 +509,7 @@ inline void probe_sides(measurements_t &m, const float uncertainty) {
// //
inline void report_hotend_offsets() { inline void report_hotend_offsets() {
LOOP_S_L_N(e, 1, HOTENDS) 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 #endif

View File

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

View File

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

View File

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

View File

@ -162,7 +162,7 @@ void GcodeSuite::M48() {
#endif #endif
); );
if (verbose_level > 3) { 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'); if (dir > 0) SERIAL_CHAR('C');
SERIAL_ECHOLNPGM("CW"); SERIAL_ECHOLNPGM("CW");
} }
@ -200,7 +200,7 @@ void GcodeSuite::M48() {
while (!probe.can_reach(next_pos)) { while (!probe.can_reach(next_pos)) {
next_pos *= 0.8f; next_pos *= 0.8f;
if (verbose_level > 3) 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 #elif HAS_ENDSTOPS
// For a rectangular bed just keep the probe in bounds // For a rectangular bed just keep the probe in bounds
@ -209,7 +209,7 @@ void GcodeSuite::M48() {
#endif #endif
if (verbose_level > 3) 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); do_blocking_move_to_xy(next_pos);
} // n_legs loop } // n_legs loop
@ -241,7 +241,7 @@ void GcodeSuite::M48() {
if (verbose_level > 1) { if (verbose_level > 1) {
SERIAL_ECHO(n + 1); SERIAL_ECHO(n + 1);
SERIAL_ECHOPAIR(" of ", n_samples); SERIAL_ECHOPGM(" of ", n_samples);
SERIAL_ECHOPAIR_F(": z: ", pz, 3); SERIAL_ECHOPAIR_F(": z: ", pz, 3);
SERIAL_CHAR(' '); SERIAL_CHAR(' ');
dev_report(verbose_level > 2, mean, sigma, min, max); dev_report(verbose_level > 2, mean, sigma, min, max);

View File

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

View File

@ -52,17 +52,17 @@
is_err = true; is_err = true;
else { else {
delta_endstop_adj[i] = v; 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(); if (!is_set) M666_report();
} }
void GcodeSuite::M666_report(const bool forReplay/*=true*/) { void GcodeSuite::M666_report(const bool forReplay/*=true*/) {
report_heading_etc(forReplay, PSTR(STR_ENDSTOP_ADJUSTMENT)); report_heading_etc(forReplay, PSTR(STR_ENDSTOP_ADJUSTMENT));
SERIAL_ECHOLNPAIR_P( SERIAL_ECHOLNPGM_P(
PSTR(" M666 X"), LINEAR_UNIT(delta_endstop_adj.a) PSTR(" M666 X"), LINEAR_UNIT(delta_endstop_adj.a)
, SP_Y_STR, LINEAR_UNIT(delta_endstop_adj.b) , SP_Y_STR, LINEAR_UNIT(delta_endstop_adj.b)
, SP_Z_STR, LINEAR_UNIT(delta_endstop_adj.c) , SP_Z_STR, LINEAR_UNIT(delta_endstop_adj.c)
@ -108,22 +108,22 @@
report_heading_etc(forReplay, PSTR(STR_ENDSTOP_ADJUSTMENT)); report_heading_etc(forReplay, PSTR(STR_ENDSTOP_ADJUSTMENT));
SERIAL_ECHOPGM(" M666"); SERIAL_ECHOPGM(" M666");
#if ENABLED(X_DUAL_ENDSTOPS) #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 #endif
#if ENABLED(Y_DUAL_ENDSTOPS) #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 #endif
#if ENABLED(Z_MULTI_ENDSTOPS) #if ENABLED(Z_MULTI_ENDSTOPS)
#if NUM_Z_STEPPER_DRIVERS >= 3 #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); 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 #if NUM_Z_STEPPER_DRIVERS >= 4
report_echo_start(forReplay); 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 #endif
#else #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
#endif #endif
} }

View File

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

View File

@ -136,33 +136,33 @@ void GcodeSuite::M217_report(const bool forReplay/*=true*/) {
SERIAL_ECHOPGM(" M217"); SERIAL_ECHOPGM(" M217");
#if ENABLED(TOOLCHANGE_FILAMENT_SWAP) #if ENABLED(TOOLCHANGE_FILAMENT_SWAP)
SERIAL_ECHOPAIR(" S", LINEAR_UNIT(toolchange_settings.swap_length)); SERIAL_ECHOPGM(" S", LINEAR_UNIT(toolchange_settings.swap_length));
SERIAL_ECHOPAIR_P(SP_B_STR, LINEAR_UNIT(toolchange_settings.extra_resume), SERIAL_ECHOPGM_P(SP_B_STR, LINEAR_UNIT(toolchange_settings.extra_resume),
SP_E_STR, LINEAR_UNIT(toolchange_settings.extra_prime), SP_E_STR, LINEAR_UNIT(toolchange_settings.extra_prime),
SP_P_STR, LINEAR_UNIT(toolchange_settings.prime_speed)); 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), " U", LINEAR_UNIT(toolchange_settings.unretract_speed),
" F", toolchange_settings.fan_speed, " F", toolchange_settings.fan_speed,
" G", toolchange_settings.fan_time); " G", toolchange_settings.fan_time);
#if ENABLED(TOOLCHANGE_MIGRATION_FEATURE) #if ENABLED(TOOLCHANGE_MIGRATION_FEATURE)
SERIAL_ECHOPAIR(" A", migration.automode); SERIAL_ECHOPGM(" A", migration.automode);
SERIAL_ECHOPAIR(" L", LINEAR_UNIT(migration.last)); SERIAL_ECHOPGM(" L", LINEAR_UNIT(migration.last));
#endif #endif
#if ENABLED(TOOLCHANGE_PARK) #if ENABLED(TOOLCHANGE_PARK)
SERIAL_ECHOPAIR(" W", LINEAR_UNIT(toolchange_settings.enable_park)); SERIAL_ECHOPGM(" W", LINEAR_UNIT(toolchange_settings.enable_park));
SERIAL_ECHOPAIR_P(SP_X_STR, LINEAR_UNIT(toolchange_settings.change_point.x)); SERIAL_ECHOPGM_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_P(SP_Y_STR, LINEAR_UNIT(toolchange_settings.change_point.y));
#endif #endif
#if ENABLED(TOOLCHANGE_FS_PRIME_FIRST_USED) #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
#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 #endif // HAS_MULTI_EXTRUDER

View File

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

View File

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

View File

@ -38,7 +38,7 @@ void GcodeSuite::M221() {
else { else {
SERIAL_ECHO_START(); SERIAL_ECHO_START();
SERIAL_CHAR('E', '0' + target_extruder); 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_CHAR('%');
SERIAL_EOL(); SERIAL_EOL();
} }

View File

@ -69,7 +69,7 @@ void GcodeSuite::M281_report(const bool forReplay/*=true*/) {
case Z_PROBE_SERVO_NR: case Z_PROBE_SERVO_NR:
#endif #endif
report_echo_start(forReplay); 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]);
} }
} }
} }

View File

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

View File

@ -56,7 +56,7 @@ void GcodeSuite::M302() {
SERIAL_ECHO_START(); SERIAL_ECHO_START();
SERIAL_ECHOPGM("Cold extrudes are "); SERIAL_ECHOPGM("Cold extrudes are ");
SERIAL_ECHOPGM_P(thermalManager.allow_cold_extrude ? PSTR("en") : PSTR("dis")); 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)");
} }
} }

View File

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

View File

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

View File

@ -78,10 +78,10 @@ void GcodeSuite::M92() {
micro_steps = argH ?: Z_MICROSTEPS; micro_steps = argH ?: Z_MICROSTEPS;
const float z_full_step_mm = micro_steps * planner.steps_to_mm[Z_AXIS]; const float z_full_step_mm = micro_steps * planner.steps_to_mm[Z_AXIS];
SERIAL_ECHO_START(); 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) { if (wanted) {
const float best = uint16_t(wanted / z_full_step_mm) * z_full_step_mm; 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); } if (best != wanted) { SERIAL_CHAR(','); SERIAL_DECIMAL(best + z_full_step_mm); }
SERIAL_CHAR(']'); SERIAL_CHAR(']');
} }
@ -92,7 +92,7 @@ void GcodeSuite::M92() {
void GcodeSuite::M92_report(const bool forReplay/*=true*/, const int8_t e/*=-1*/) { void GcodeSuite::M92_report(const bool forReplay/*=true*/, const int8_t e/*=-1*/) {
report_heading_etc(forReplay, PSTR(STR_STEPS_PER_UNIT)); 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]), 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_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]), 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])) SP_K_STR, LINEAR_UNIT(planner.settings.axis_steps_per_mm[K_AXIS]))
); );
#if HAS_EXTRUDERS && DISABLED(DISTINCT_E_FACTORS) #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 #endif
SERIAL_EOL(); 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) { LOOP_L_N(i, E_STEPPERS) {
if (e >= 0 && i != e) continue; if (e >= 0 && i != e) continue;
report_echo_start(forReplay); report_echo_start(forReplay);
SERIAL_ECHOLNPAIR_P( SERIAL_ECHOLNPGM_P(
PSTR(" M92 T"), i, PSTR(" M92 T"), i,
SP_E_STR, VOLUMETRIC_UNIT(planner.settings.axis_steps_per_mm[E_AXIS_N(i)]) SP_E_STR, VOLUMETRIC_UNIT(planner.settings.axis_steps_per_mm[E_AXIS_N(i)])
); );

View File

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

View File

@ -41,7 +41,7 @@ void GcodeSuite::M211() {
void GcodeSuite::M211_report(const bool forReplay/*=true*/) { void GcodeSuite::M211_report(const bool forReplay/*=true*/) {
report_heading_etc(forReplay, PSTR(STR_SOFT_ENDSTOPS)); 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); serialprintln_onoff(soft_endstop._enabled);
report_echo_start(forReplay); report_echo_start(forReplay);

View File

@ -127,26 +127,26 @@
case DXC_DUPLICATION_MODE: DEBUG_ECHOPGM("DUPLICATION"); break; case DXC_DUPLICATION_MODE: DEBUG_ECHOPGM("DUPLICATION"); break;
case DXC_MIRRORED_MODE: DEBUG_ECHOPGM("MIRRORED"); 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 "); if (!active_extruder_parked) DEBUG_ECHOPGM(" NOT ");
DEBUG_ECHOPGM(" parked."); DEBUG_ECHOPGM(" parked.");
DEBUG_ECHOPAIR("\nactive_extruder_x_pos: ", current_position.x); DEBUG_ECHOPGM("\nactive_extruder_x_pos: ", current_position.x);
DEBUG_ECHOPAIR("\ninactive_extruder_x: ", inactive_extruder_x); DEBUG_ECHOPGM("\ninactive_extruder_x: ", inactive_extruder_x);
DEBUG_ECHOPAIR("\nextruder_duplication_enabled: ", extruder_duplication_enabled); DEBUG_ECHOPGM("\nextruder_duplication_enabled: ", extruder_duplication_enabled);
DEBUG_ECHOPAIR("\nduplicate_extruder_x_offset: ", duplicate_extruder_x_offset); DEBUG_ECHOPGM("\nduplicate_extruder_x_offset: ", duplicate_extruder_x_offset);
DEBUG_ECHOPAIR("\nduplicate_extruder_temp_offset: ", duplicate_extruder_temp_offset); DEBUG_ECHOPGM("\nduplicate_extruder_temp_offset: ", duplicate_extruder_temp_offset);
DEBUG_ECHOPAIR("\ndelayed_move_time: ", delayed_move_time); DEBUG_ECHOPGM("\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_ECHOPGM("\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_ECHOPGM("\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_ECHOPGM("\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_ECHOPGM("\nDEFAULT_DUAL_X_CARRIAGE_MODE=", STRINGIFY(DEFAULT_DUAL_X_CARRIAGE_MODE));
DEBUG_ECHOPAIR("\toolchange_settings.z_raise=", toolchange_settings.z_raise); DEBUG_ECHOPGM("\toolchange_settings.z_raise=", toolchange_settings.z_raise);
DEBUG_ECHOPAIR("\nDEFAULT_DUPLICATION_X_OFFSET=", DEFAULT_DUPLICATION_X_OFFSET); DEBUG_ECHOPGM("\nDEFAULT_DUPLICATION_X_OFFSET=", DEFAULT_DUPLICATION_X_OFFSET);
DEBUG_EOL(); DEBUG_EOL();
HOTEND_LOOP() { HOTEND_LOOP() {
DEBUG_ECHOPAIR_P(SP_T_STR, e); DEBUG_ECHOPGM_P(SP_T_STR, e);
LOOP_LINEAR_AXES(a) DEBUG_ECHOPAIR(" hotend_offset[", e, "].", AS_CHAR(AXIS_CHAR(a) | 0x20), "=", hotend_offset[e][a]); LOOP_LINEAR_AXES(a) DEBUG_ECHOPGM(" hotend_offset[", e, "].", AS_CHAR(AXIS_CHAR(a) | 0x20), "=", hotend_offset[e][a]);
DEBUG_EOL(); DEBUG_EOL();
} }
DEBUG_EOL(); DEBUG_EOL();

View File

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

View File

@ -49,7 +49,7 @@
void GcodeSuite::T(const int8_t tool_index) { void GcodeSuite::T(const int8_t tool_index) {
DEBUG_SECTION(log_T, "T", DEBUGGING(LEVELING)); 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 // Count this command as movement / activity
reset_stepper_timeout(); reset_stepper_timeout();

View File

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

View File

@ -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"); if (!(sh.STATUS_AXIS & sh.STATUS_AXIS_WRONG_CMD)) SERIAL_ECHOPGM("IN");
SERIAL_ECHOPGM("VALID "); SERIAL_ECHOPGM("VALID ");
SERIAL_ECHOPGM_P(sh.STATUS_AXIS & sh.STATUS_AXIS_NOTPERF_CMD ? PSTR("COMPLETED ") : PSTR("Not PERFORMED")); 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); SERIAL_ECHOPGM(" OVERCURRENT:"); echo_yes_no((sh.STATUS_AXIS & sh.STATUS_AXIS_OCD) == 0);
if (sh.STATUS_AXIS_LAYOUT != L6474_STATUS_LAYOUT) { if (sh.STATUS_AXIS_LAYOUT != L6474_STATUS_LAYOUT) {

View File

@ -63,7 +63,7 @@ void L64XX_report_current(L64XX &motor, const L64XX_axis_t axis) {
#if ENABLED(L6470_CHITCHAT) #if ENABLED(L6470_CHITCHAT)
char tmp[10]; char tmp[10];
sprintf_P(tmp, PSTR("%4x "), status); sprintf_P(tmp, PSTR("%4x "), status);
DEBUG_ECHOPAIR(" status: ", tmp); DEBUG_ECHOPGM(" status: ", tmp);
print_bin(status); print_bin(status);
#else #else
UNUSED(status); UNUSED(status);
@ -104,13 +104,13 @@ void L64XX_report_current(L64XX &motor, const L64XX_axis_t axis) {
} }
SERIAL_EOL(); SERIAL_EOL();
SERIAL_ECHOPAIR("...MicroSteps: ", MicroSteps, SERIAL_ECHOPGM("...MicroSteps: ", MicroSteps,
" ADC_OUT: ", L6470_ADC_out); " ADC_OUT: ", L6470_ADC_out);
SERIAL_ECHOPGM(" Vs_compensation: "); SERIAL_ECHOPGM(" Vs_compensation: ");
SERIAL_ECHOPGM_P((motor.GetParam(sh.L6470_AXIS_CONFIG) & CONFIG_EN_VSCOMP) ? PSTR("ENABLED ") : PSTR("DISABLED")); 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_RUN : ", motor.GetParam(L6470_KVAL_RUN),
" KVAL_ACC: ", motor.GetParam(L6470_KVAL_ACC), " KVAL_ACC: ", motor.GetParam(L6470_KVAL_ACC),
" KVAL_DEC: ", motor.GetParam(L6470_KVAL_DEC), " 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"); SERIAL_ECHOLNPGM(" mA) Motor Status: NA");
const uint16_t MicroSteps = _BV(motor.GetParam(L6470_STEP_MODE) & 0x07); //NOMORE(MicroSteps, 16); 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); " ADC_OUT: ", L6470_ADC_out);
SERIAL_ECHOLNPGM(" Vs_compensation: NA\n"); 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 1: DEBUG_ECHOLNPGM("75V/uS") ; break;
case 2: DEBUG_ECHOLNPGM("110V/uS") ; break; case 2: DEBUG_ECHOLNPGM("110V/uS") ; break;
case 3: DEBUG_ECHOLNPGM("260V/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 #endif
SERIAL_EOL(); SERIAL_EOL();

View File

@ -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)) 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 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 planner.synchronize(); // wait for all current movement commands to complete
@ -127,9 +127,9 @@ void GcodeSuite::M916() {
do { do {
if (sh.STATUS_AXIS_LAYOUT == L6474_STATUS_LAYOUT) 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 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++) 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) 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)) 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 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 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 // 2 - OCD finalized - decreasing STALL - exit when STALL warning happens
// 3 - OCD finalized - increasing STALL - exit when STALL warning stop // 3 - OCD finalized - increasing STALL - exit when STALL warning stop
// 4 - all testing completed // 4 - all testing completed
DEBUG_ECHOPAIR(".\n.\n.\nover_current threshold : ", (OCD_TH_val + 1) * 375); // first status display DEBUG_ECHOPGM(".\n.\n.\nover_current threshold : ", (OCD_TH_val + 1) * 375); // first status display
DEBUG_ECHOPAIR(" (OCD_TH: : ", OCD_TH_val); DEBUG_ECHOPGM(" (OCD_TH: : ", OCD_TH_val);
if (sh.STATUS_AXIS_LAYOUT != L6474_STATUS_LAYOUT) { if (sh.STATUS_AXIS_LAYOUT != L6474_STATUS_LAYOUT) {
DEBUG_ECHOPAIR(") Stall threshold: ", (STALL_TH_val + 1) * 31.25); DEBUG_ECHOPGM(") Stall threshold: ", (STALL_TH_val + 1) * 31.25);
DEBUG_ECHOPAIR(" (STALL_TH: ", STALL_TH_val); DEBUG_ECHOPGM(" (STALL_TH: ", STALL_TH_val);
} }
DEBUG_ECHOLNPGM(")"); DEBUG_ECHOLNPGM(")");
do { do {
if (sh.STATUS_AXIS_LAYOUT != L6474_STATUS_LAYOUT) DEBUG_ECHOPAIR("STALL threshold : ", (STALL_TH_val + 1) * 31.25); if (sh.STATUS_AXIS_LAYOUT != L6474_STATUS_LAYOUT) DEBUG_ECHOPGM("STALL threshold : ", (STALL_TH_val + 1) * 31.25);
DEBUG_ECHOLNPAIR(" OCD threshold : ", (OCD_TH_val + 1) * 375); 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)); 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); gcode.process_subcommands_now_P(gcode_string);
@ -303,7 +303,7 @@ void GcodeSuite::M917() {
if (!(k % 4)) { if (!(k % 4)) {
kval_hold *= 0.95; kval_hold *= 0.95;
DEBUG_EOL(); 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++) for (j = 0; j < driver_count; j++)
L64xxManager.set_param(axis_index[j], L6470_KVAL_HOLD, kval_hold); 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 m_steps = L64xxManager.get_param(axis_index[0], L6470_STEP_MODE) & 0x07; // get microsteps
DEBUG_ECHOLNPAIR("Microsteps = ", _BV(m_steps)); DEBUG_ECHOLNPGM("Microsteps = ", _BV(m_steps));
DEBUG_ECHOLNPAIR("target (maximum) feedrate = ", final_feedrate); 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 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 fr_limit = final_feedrate * 0.99f; // Rounding-safe comparison value
@ -612,7 +612,7 @@ void GcodeSuite::M918() {
do { do {
current_feedrate += feedrate_inc; 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)); 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); gcode.process_subcommands_now_P(gcode_string);

View File

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

View File

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

View File

@ -102,7 +102,7 @@ void GcodeSuite::M907() {
void GcodeSuite::M907_report(const bool forReplay/*=true*/) { void GcodeSuite::M907_report(const bool forReplay/*=true*/) {
report_heading_etc(forReplay, PSTR(STR_STEPPER_MOTOR_CURRENTS)); report_heading_etc(forReplay, PSTR(STR_STEPPER_MOTOR_CURRENTS));
#if HAS_MOTOR_CURRENT_PWM #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 PSTR(" M907 X"), stepper.motor_current_setting[0] // X and Y
, SP_Z_STR, stepper.motor_current_setting[1] // Z , SP_Z_STR, stepper.motor_current_setting[1] // Z
, SP_E_STR, stepper.motor_current_setting[2] // E , SP_E_STR, stepper.motor_current_setting[2] // E

View File

@ -38,7 +38,7 @@ void GcodeSuite::M404() {
planner.volumetric_area_nominal = CIRCLE_AREA(filwidth.nominal_mm * 0.5); planner.volumetric_area_nominal = CIRCLE_AREA(filwidth.nominal_mm * 0.5);
} }
else 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 * M407: Get measured filament diameter on serial output
*/ */
void GcodeSuite::M407() { 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 #endif // FILAMENT_WIDTH_SENSOR

View File

@ -30,12 +30,12 @@
#include "../../../feature/mixing.h" #include "../../../feature/mixing.h"
inline void echo_mix() { 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) { inline void echo_zt(const int t, const_float_t z) {
mixer.update_mix_from_vtool(t); 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(); echo_mix();
} }
@ -74,7 +74,7 @@ void GcodeSuite::M166() {
#if ENABLED(GRADIENT_VTOOL) #if ENABLED(GRADIENT_VTOOL)
if (mixer.gradient.vtool_index >= 0) { if (mixer.gradient.vtool_index >= 0) {
SERIAL_ECHOPAIR(" (T", mixer.gradient.vtool_index); SERIAL_ECHOPGM(" (T", mixer.gradient.vtool_index);
SERIAL_CHAR(')'); SERIAL_CHAR(')');
} }
#endif #endif

View File

@ -66,7 +66,7 @@ void GcodeSuite::M510() {
if (password.value_entry < CAT(1e, PASSWORD_LENGTH)) { if (password.value_entry < CAT(1e, PASSWORD_LENGTH)) {
password.is_set = true; password.is_set = true;
password.value = password.value_entry; 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 else
SERIAL_ECHOLNPGM(STR_PASSWORD_TOO_LONG); SERIAL_ECHOLNPGM(STR_PASSWORD_TOO_LONG);

View File

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

View File

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

View File

@ -69,12 +69,12 @@ void GcodeSuite::M603_report(const bool forReplay/*=true*/) {
#if EXTRUDERS == 1 #if EXTRUDERS == 1
report_echo_start(forReplay); 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(); say_units();
#else #else
LOOP_L_N(e, EXTRUDERS) { LOOP_L_N(e, EXTRUDERS) {
report_echo_start(forReplay); 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(); say_units();
} }
#endif #endif

View File

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

View File

@ -58,7 +58,7 @@ void GcodeSuite::M413() {
void GcodeSuite::M413_report(const bool forReplay/*=true*/) { void GcodeSuite::M413_report(const bool forReplay/*=true*/) {
report_heading_etc(forReplay, PSTR(STR_POWER_LOSS_RECOVERY)); 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); serialprintln_onoff(recovery.enabled);
} }

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -36,7 +36,7 @@ static void config_prefix(PGM_P const name, PGM_P const pref=nullptr, const int8
SERIAL_ECHOPGM("Config:"); SERIAL_ECHOPGM("Config:");
if (pref) SERIAL_ECHOPGM_P(pref); if (pref) SERIAL_ECHOPGM_P(pref);
if (ind >= 0) { SERIAL_ECHO(ind); SERIAL_CHAR(':'); } 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) { 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); config_prefix(name, pref, ind);

View File

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

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