A single SERIAL_ECHO macro type (#12557)
This commit is contained in:
@ -384,6 +384,36 @@ void MarlinSettings::postprocess() {
|
||||
|
||||
#endif // SD_FIRMWARE_UPDATE
|
||||
|
||||
#if ENABLED(EEPROM_CHITCHAT)
|
||||
#define CHITCHAT_ECHO(V) SERIAL_ECHO(V)
|
||||
#define CHITCHAT_ECHOLNPGM(STR) SERIAL_ECHOLNPGM(STR)
|
||||
#define CHITCHAT_ECHOPAIR(STR,V) SERIAL_ECHOPAIR(STR,V)
|
||||
#define CHITCHAT_ECHOLNPAIR(STR,V) SERIAL_ECHOLNPAIR(STR,V)
|
||||
#define CHITCHAT_ECHO_START_P(port) SERIAL_ECHO_START_P(port)
|
||||
#define CHITCHAT_ERROR_START_P(port) SERIAL_ERROR_START_P(port)
|
||||
#define CHITCHAT_ERROR_MSG_P(port, STR) SERIAL_ERROR_MSG_P(port, STR)
|
||||
#define CHITCHAT_ECHO_P(port, VAL) SERIAL_ECHO_P(port, VAL)
|
||||
#define CHITCHAT_ECHOPGM_P(port, STR) SERIAL_ECHOPGM_P(port, STR)
|
||||
#define CHITCHAT_ECHOLNPGM_P(port, STR) SERIAL_ECHOLNPGM_P(port, STR)
|
||||
#define CHITCHAT_ECHOPAIR_P(port, STR, VAL) SERIAL_ECHOPAIR_P(port, STR, VAL)
|
||||
#define CHITCHAT_ECHOLNPAIR_P(port, STR, VAL) SERIAL_ECHOLNPAIR_P(port, STR, VAL)
|
||||
#define CHITCHAT_EOL() SERIAL_EOL()
|
||||
#else
|
||||
#define CHITCHAT_ECHO(V) NOOP
|
||||
#define CHITCHAT_ECHOLNPGM(STR) NOOP
|
||||
#define CHITCHAT_ECHOPAIR(STR,V) NOOP
|
||||
#define CHITCHAT_ECHOLNPAIR(STR,V) NOOP
|
||||
#define CHITCHAT_ECHO_START_P(port) NOOP
|
||||
#define CHITCHAT_ERROR_START_P(port) NOOP
|
||||
#define CHITCHAT_ERROR_MSG_P(port, STR) NOOP
|
||||
#define CHITCHAT_ECHO_P(port, VAL) NOOP
|
||||
#define CHITCHAT_ECHOPGM_P(port, STR) NOOP
|
||||
#define CHITCHAT_ECHOLNPGM_P(port, STR) NOOP
|
||||
#define CHITCHAT_ECHOPAIR_P(port, STR, VAL) NOOP
|
||||
#define CHITCHAT_ECHOLNPAIR_P(port, STR, VAL) NOOP
|
||||
#define CHITCHAT_EOL() NOOP
|
||||
#endif
|
||||
|
||||
#if ENABLED(EEPROM_SETTINGS)
|
||||
|
||||
#define EEPROM_START() int eeprom_index = EEPROM_OFFSET; persistentStore.access_start()
|
||||
@ -392,7 +422,7 @@ void MarlinSettings::postprocess() {
|
||||
#define EEPROM_WRITE(VAR) persistentStore.write_data(eeprom_index, (uint8_t*)&VAR, sizeof(VAR), &working_crc)
|
||||
#define EEPROM_READ(VAR) persistentStore.read_data(eeprom_index, (uint8_t*)&VAR, sizeof(VAR), &working_crc, !validating)
|
||||
#define EEPROM_READ_ALWAYS(VAR) persistentStore.read_data(eeprom_index, (uint8_t*)&VAR, sizeof(VAR), &working_crc)
|
||||
#define EEPROM_ASSERT(TST,ERR) do{ if (!(TST)) { SERIAL_ERROR_START_P(port); SERIAL_ERRORLNPGM_P(port, ERR); eeprom_error = true; } }while(0)
|
||||
#define EEPROM_ASSERT(TST,ERR) do{ if (!(TST)) { SERIAL_ERROR_MSG_P(port, ERR); eeprom_error = true; } }while(0)
|
||||
|
||||
#if ENABLED(DEBUG_EEPROM_READWRITE)
|
||||
#define _FIELD_TEST(FIELD) \
|
||||
@ -410,10 +440,7 @@ void MarlinSettings::postprocess() {
|
||||
|
||||
bool MarlinSettings::size_error(const uint16_t size PORTARG_AFTER) {
|
||||
if (size != datasize()) {
|
||||
#if ENABLED(EEPROM_CHITCHAT)
|
||||
SERIAL_ERROR_START_P(port);
|
||||
SERIAL_ERRORLNPGM_P(port, "EEPROM datasize error.");
|
||||
#endif
|
||||
CHITCHAT_ERROR_MSG_P(port, "EEPROM datasize error.");
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@ -1050,12 +1077,10 @@ void MarlinSettings::postprocess() {
|
||||
EEPROM_WRITE(final_crc);
|
||||
|
||||
// Report storage size
|
||||
#if ENABLED(EEPROM_CHITCHAT)
|
||||
SERIAL_ECHO_START_P(port);
|
||||
SERIAL_ECHOPAIR_P(port, "Settings Stored (", eeprom_size);
|
||||
SERIAL_ECHOPAIR_P(port, " bytes; crc ", (uint32_t)final_crc);
|
||||
SERIAL_ECHOLNPGM_P(port, ")");
|
||||
#endif
|
||||
CHITCHAT_ECHO_START_P(port);
|
||||
CHITCHAT_ECHOPAIR_P(port, "Settings Stored (", eeprom_size);
|
||||
CHITCHAT_ECHOPAIR_P(port, " bytes; crc ", (uint32_t)final_crc);
|
||||
CHITCHAT_ECHOLNPGM_P(port, ")");
|
||||
|
||||
eeprom_error |= size_error(eeprom_size);
|
||||
}
|
||||
@ -1092,12 +1117,10 @@ void MarlinSettings::postprocess() {
|
||||
stored_ver[0] = '?';
|
||||
stored_ver[1] = '\0';
|
||||
}
|
||||
#if ENABLED(EEPROM_CHITCHAT)
|
||||
SERIAL_ECHO_START_P(port);
|
||||
SERIAL_ECHOPGM_P(port, "EEPROM version mismatch ");
|
||||
SERIAL_ECHOPAIR_P(port, "(EEPROM=", stored_ver);
|
||||
SERIAL_ECHOLNPGM_P(port, " Marlin=" EEPROM_VERSION ")");
|
||||
#endif
|
||||
CHITCHAT_ECHO_START_P(port);
|
||||
CHITCHAT_ECHOPGM_P(port, "EEPROM version mismatch ");
|
||||
CHITCHAT_ECHOPAIR_P(port, "(EEPROM=", stored_ver);
|
||||
CHITCHAT_ECHOLNPGM_P(port, " Marlin=" EEPROM_VERSION ")");
|
||||
eeprom_error = true;
|
||||
}
|
||||
else {
|
||||
@ -1704,31 +1727,25 @@ void MarlinSettings::postprocess() {
|
||||
|
||||
eeprom_error = size_error(eeprom_index - (EEPROM_OFFSET));
|
||||
if (eeprom_error) {
|
||||
#if ENABLED(EEPROM_CHITCHAT)
|
||||
SERIAL_ECHO_START_P(port);
|
||||
SERIAL_ECHOPAIR_P(port, "Index: ", int(eeprom_index - (EEPROM_OFFSET)));
|
||||
SERIAL_ECHOLNPAIR_P(port, " Size: ", datasize());
|
||||
#endif
|
||||
CHITCHAT_ECHO_START_P(port);
|
||||
CHITCHAT_ECHOPAIR_P(port, "Index: ", int(eeprom_index - (EEPROM_OFFSET)));
|
||||
CHITCHAT_ECHOLNPAIR_P(port, " Size: ", datasize());
|
||||
}
|
||||
else if (working_crc != stored_crc) {
|
||||
eeprom_error = true;
|
||||
#if ENABLED(EEPROM_CHITCHAT)
|
||||
SERIAL_ERROR_START_P(port);
|
||||
SERIAL_ERRORPGM_P(port, "EEPROM CRC mismatch - (stored) ");
|
||||
SERIAL_ERROR_P(port, stored_crc);
|
||||
SERIAL_ERRORPGM_P(port, " != ");
|
||||
SERIAL_ERROR_P(port, working_crc);
|
||||
SERIAL_ERRORLNPGM_P(port, " (calculated)!");
|
||||
#endif
|
||||
CHITCHAT_ERROR_START_P(port);
|
||||
CHITCHAT_ECHOPGM_P(port, "EEPROM CRC mismatch - (stored) ");
|
||||
CHITCHAT_ECHO_P(port, stored_crc);
|
||||
CHITCHAT_ECHOPGM_P(port, " != ");
|
||||
CHITCHAT_ECHO_P(port, working_crc);
|
||||
CHITCHAT_ECHOLNPGM_P(port, " (calculated)!");
|
||||
}
|
||||
else if (!validating) {
|
||||
#if ENABLED(EEPROM_CHITCHAT)
|
||||
SERIAL_ECHO_START_P(port);
|
||||
SERIAL_ECHO_P(port, version);
|
||||
SERIAL_ECHOPAIR_P(port, " stored settings retrieved (", eeprom_index - (EEPROM_OFFSET));
|
||||
SERIAL_ECHOPAIR_P(port, " bytes; crc ", (uint32_t)working_crc);
|
||||
SERIAL_ECHOLNPGM_P(port, ")");
|
||||
#endif
|
||||
CHITCHAT_ECHO_START_P(port);
|
||||
CHITCHAT_ECHO_P(port, version);
|
||||
CHITCHAT_ECHOPAIR_P(port, " stored settings retrieved (", eeprom_index - (EEPROM_OFFSET));
|
||||
CHITCHAT_ECHOPAIR_P(port, " bytes; crc ", (uint32_t)working_crc);
|
||||
CHITCHAT_ECHOLNPGM_P(port, ")");
|
||||
}
|
||||
|
||||
if (!validating && !eeprom_error) postprocess();
|
||||
@ -1741,31 +1758,27 @@ void MarlinSettings::postprocess() {
|
||||
SERIAL_EOL_P(port);
|
||||
#if ENABLED(EEPROM_CHITCHAT)
|
||||
ubl.echo_name();
|
||||
SERIAL_ECHOLNPGM_P(port, " initialized.\n");
|
||||
CHITCHAT_ECHOLNPGM_P(port, " initialized.\n");
|
||||
#endif
|
||||
}
|
||||
else {
|
||||
eeprom_error = true;
|
||||
#if ENABLED(EEPROM_CHITCHAT)
|
||||
SERIAL_PROTOCOLPGM_P(port, "?Can't enable ");
|
||||
CHITCHAT_ECHOPGM_P(port, "?Can't enable ");
|
||||
ubl.echo_name();
|
||||
SERIAL_PROTOCOLLNPGM_P(port, ".");
|
||||
CHITCHAT_ECHOLNPGM_P(port, ".");
|
||||
#endif
|
||||
ubl.reset();
|
||||
}
|
||||
|
||||
if (ubl.storage_slot >= 0) {
|
||||
load_mesh(ubl.storage_slot);
|
||||
#if ENABLED(EEPROM_CHITCHAT)
|
||||
SERIAL_ECHOPAIR_P(port, "Mesh ", ubl.storage_slot);
|
||||
SERIAL_ECHOLNPGM_P(port, " loaded from storage.");
|
||||
#endif
|
||||
CHITCHAT_ECHOPAIR_P(port, "Mesh ", ubl.storage_slot);
|
||||
CHITCHAT_ECHOLNPGM_P(port, " loaded from storage.");
|
||||
}
|
||||
else {
|
||||
ubl.reset();
|
||||
#if ENABLED(EEPROM_CHITCHAT)
|
||||
SERIAL_ECHOLNPGM_P(port, "UBL System reset()");
|
||||
#endif
|
||||
CHITCHAT_ECHOLNPGM_P(port, "UBL System reset()");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@ -1794,13 +1807,15 @@ void MarlinSettings::postprocess() {
|
||||
|
||||
#if ENABLED(AUTO_BED_LEVELING_UBL)
|
||||
|
||||
#if ENABLED(EEPROM_CHITCHAT)
|
||||
void ubl_invalid_slot(const int s) {
|
||||
SERIAL_PROTOCOLLNPGM("?Invalid slot.");
|
||||
SERIAL_PROTOCOL(s);
|
||||
SERIAL_PROTOCOLLNPGM(" mesh slots available.");
|
||||
}
|
||||
#endif
|
||||
inline void ubl_invalid_slot(const int s) {
|
||||
#if ENABLED(EEPROM_CHITCHAT)
|
||||
CHITCHAT_ECHOLNPGM("?Invalid slot.");
|
||||
CHITCHAT_ECHO(s);
|
||||
CHITCHAT_ECHOLNPGM(" mesh slots available.");
|
||||
#else
|
||||
UNUSED(s);
|
||||
#endif
|
||||
}
|
||||
|
||||
const uint16_t MarlinSettings::meshes_end = persistentStore.capacity() - 129; // 128 (+1 because of the change to capacity rather than last valid address)
|
||||
// is a placeholder for the size of the MAT; the MAT will always
|
||||
@ -1824,32 +1839,24 @@ void MarlinSettings::postprocess() {
|
||||
#if ENABLED(AUTO_BED_LEVELING_UBL)
|
||||
const int16_t a = calc_num_meshes();
|
||||
if (!WITHIN(slot, 0, a - 1)) {
|
||||
#if ENABLED(EEPROM_CHITCHAT)
|
||||
ubl_invalid_slot(a);
|
||||
SERIAL_PROTOCOLPAIR("E2END=", persistentStore.capacity() - 1);
|
||||
SERIAL_PROTOCOLPAIR(" meshes_end=", meshes_end);
|
||||
SERIAL_PROTOCOLLNPAIR(" slot=", slot);
|
||||
SERIAL_EOL();
|
||||
#endif
|
||||
ubl_invalid_slot(a);
|
||||
CHITCHAT_ECHOPAIR("E2END=", persistentStore.capacity() - 1);
|
||||
CHITCHAT_ECHOPAIR(" meshes_end=", meshes_end);
|
||||
CHITCHAT_ECHOLNPAIR(" slot=", slot);
|
||||
CHITCHAT_EOL();
|
||||
return;
|
||||
}
|
||||
|
||||
int pos = mesh_slot_offset(slot);
|
||||
uint16_t crc = 0;
|
||||
|
||||
// Write crc to MAT along with other data, or just tack on to the beginning or end
|
||||
persistentStore.access_start();
|
||||
const bool status = persistentStore.write_data(pos, (uint8_t *)&ubl.z_values, sizeof(ubl.z_values), &crc);
|
||||
persistentStore.access_finish();
|
||||
|
||||
if (status)
|
||||
SERIAL_PROTOCOLPGM("?Unable to save mesh data.\n");
|
||||
|
||||
// Write crc to MAT along with other data, or just tack on to the beginning or end
|
||||
|
||||
#if ENABLED(EEPROM_CHITCHAT)
|
||||
if (!status)
|
||||
SERIAL_PROTOCOLLNPAIR("Mesh saved in slot ", slot);
|
||||
#endif
|
||||
if (status) SERIAL_ECHOPGM("?Unable to save mesh data.\n");
|
||||
else CHITCHAT_ECHOLNPAIR("Mesh saved in slot ", slot);
|
||||
|
||||
#else
|
||||
|
||||
@ -1865,9 +1872,7 @@ void MarlinSettings::postprocess() {
|
||||
const int16_t a = settings.calc_num_meshes();
|
||||
|
||||
if (!WITHIN(slot, 0, a - 1)) {
|
||||
#if ENABLED(EEPROM_CHITCHAT)
|
||||
ubl_invalid_slot(a);
|
||||
#endif
|
||||
ubl_invalid_slot(a);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1879,13 +1884,9 @@ void MarlinSettings::postprocess() {
|
||||
const uint16_t status = persistentStore.read_data(pos, dest, sizeof(ubl.z_values), &crc);
|
||||
persistentStore.access_finish();
|
||||
|
||||
if (status)
|
||||
SERIAL_PROTOCOLPGM("?Unable to load mesh data.\n");
|
||||
if (status) SERIAL_ECHOPGM("?Unable to load mesh data.\n");
|
||||
else CHITCHAT_ECHOLNPAIR("Mesh loaded from slot ", slot);
|
||||
|
||||
#if ENABLED(EEPROM_CHITCHAT)
|
||||
else
|
||||
SERIAL_PROTOCOLLNPAIR("Mesh loaded from slot ", slot);
|
||||
#endif
|
||||
EEPROM_FINISH();
|
||||
|
||||
#else
|
||||
@ -1903,10 +1904,7 @@ void MarlinSettings::postprocess() {
|
||||
#else // !EEPROM_SETTINGS
|
||||
|
||||
bool MarlinSettings::save(PORTARG_SOLO) {
|
||||
#if ENABLED(EEPROM_CHITCHAT)
|
||||
SERIAL_ERROR_START_P(port);
|
||||
SERIAL_ERRORLNPGM_P(port, "EEPROM disabled");
|
||||
#endif
|
||||
CHITCHAT_ERROR_MSG_P(port, "EEPROM disabled");
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -2177,15 +2175,15 @@ void MarlinSettings::reset(PORTARG_SOLO) {
|
||||
|
||||
postprocess();
|
||||
|
||||
#if ENABLED(EEPROM_CHITCHAT)
|
||||
SERIAL_ECHO_START_P(port);
|
||||
SERIAL_ECHOLNPGM_P(port, "Hardcoded Default Settings Loaded");
|
||||
#endif
|
||||
CHITCHAT_ECHO_START_P(port);
|
||||
CHITCHAT_ECHOLNPGM_P(port, "Hardcoded Default Settings Loaded");
|
||||
}
|
||||
|
||||
#if DISABLED(DISABLE_M503)
|
||||
|
||||
#define CONFIG_ECHO_START do{ if (!forReplay) SERIAL_ECHO_START_P(port); }while(0)
|
||||
#define CONFIG_ECHO_START() do{ if (!forReplay) SERIAL_ECHO_START_P(port); }while(0)
|
||||
#define CONFIG_ECHO_MSG(STR) do{ CONFIG_ECHO_START(); SERIAL_ECHOLNPGM_P(port, STR); }while(0)
|
||||
#define CONFIG_ECHO_HEADING(STR) do{ if (!forReplay) { CONFIG_ECHO_START(); SERIAL_ECHOLNPGM_P(port, STR); } }while(0)
|
||||
|
||||
#if HAS_TRINAMIC
|
||||
void say_M906(PORTARG_SOLO) { SERIAL_ECHOPGM_P(port, " M906"); }
|
||||
@ -2234,7 +2232,7 @@ void MarlinSettings::reset(PORTARG_SOLO) {
|
||||
/**
|
||||
* Announce current units, in case inches are being displayed
|
||||
*/
|
||||
CONFIG_ECHO_START;
|
||||
CONFIG_ECHO_START();
|
||||
#if ENABLED(INCH_MODE_SUPPORT)
|
||||
SERIAL_ECHOPGM_P(port, " G2");
|
||||
SERIAL_CHAR_P(port, parser.linear_unit_factor == 1.0 ? '1' : '0');
|
||||
@ -2250,7 +2248,7 @@ void MarlinSettings::reset(PORTARG_SOLO) {
|
||||
|
||||
// Temperature units - for Ultipanel temperature options
|
||||
|
||||
CONFIG_ECHO_START;
|
||||
CONFIG_ECHO_START();
|
||||
#if ENABLED(TEMPERATURE_UNITS_SUPPORT)
|
||||
SERIAL_ECHOPGM_P(port, " M149 ");
|
||||
SERIAL_CHAR_P(port, parser.temp_units_code());
|
||||
@ -2270,7 +2268,7 @@ void MarlinSettings::reset(PORTARG_SOLO) {
|
||||
* Volumetric extrusion M200
|
||||
*/
|
||||
if (!forReplay) {
|
||||
CONFIG_ECHO_START;
|
||||
CONFIG_ECHO_START();
|
||||
SERIAL_ECHOPGM_P(port, "Filament settings:");
|
||||
if (parser.volumetric_enabled)
|
||||
SERIAL_EOL_P(port);
|
||||
@ -2278,27 +2276,27 @@ void MarlinSettings::reset(PORTARG_SOLO) {
|
||||
SERIAL_ECHOLNPGM_P(port, " Disabled");
|
||||
}
|
||||
|
||||
CONFIG_ECHO_START;
|
||||
CONFIG_ECHO_START();
|
||||
SERIAL_ECHOPAIR_P(port, " M200 D", LINEAR_UNIT(planner.filament_size[0]));
|
||||
SERIAL_EOL_P(port);
|
||||
#if EXTRUDERS > 1
|
||||
CONFIG_ECHO_START;
|
||||
CONFIG_ECHO_START();
|
||||
SERIAL_ECHOPAIR_P(port, " M200 T1 D", LINEAR_UNIT(planner.filament_size[1]));
|
||||
SERIAL_EOL_P(port);
|
||||
#if EXTRUDERS > 2
|
||||
CONFIG_ECHO_START;
|
||||
CONFIG_ECHO_START();
|
||||
SERIAL_ECHOPAIR_P(port, " M200 T2 D", LINEAR_UNIT(planner.filament_size[2]));
|
||||
SERIAL_EOL_P(port);
|
||||
#if EXTRUDERS > 3
|
||||
CONFIG_ECHO_START;
|
||||
CONFIG_ECHO_START();
|
||||
SERIAL_ECHOPAIR_P(port, " M200 T3 D", LINEAR_UNIT(planner.filament_size[3]));
|
||||
SERIAL_EOL_P(port);
|
||||
#if EXTRUDERS > 4
|
||||
CONFIG_ECHO_START;
|
||||
CONFIG_ECHO_START();
|
||||
SERIAL_ECHOPAIR_P(port, " M200 T4 D", LINEAR_UNIT(planner.filament_size[4]));
|
||||
SERIAL_EOL_P(port);
|
||||
#if EXTRUDERS > 5
|
||||
CONFIG_ECHO_START;
|
||||
CONFIG_ECHO_START();
|
||||
SERIAL_ECHOPAIR_P(port, " M200 T5 D", LINEAR_UNIT(planner.filament_size[5]));
|
||||
SERIAL_EOL_P(port);
|
||||
#endif // EXTRUDERS > 5
|
||||
@ -2307,18 +2305,13 @@ void MarlinSettings::reset(PORTARG_SOLO) {
|
||||
#endif // EXTRUDERS > 2
|
||||
#endif // EXTRUDERS > 1
|
||||
|
||||
if (!parser.volumetric_enabled) {
|
||||
CONFIG_ECHO_START;
|
||||
SERIAL_ECHOLNPGM_P(port, " M200 D0");
|
||||
}
|
||||
if (!parser.volumetric_enabled)
|
||||
CONFIG_ECHO_MSG(" M200 D0");
|
||||
|
||||
#endif // !NO_VOLUMETRICS
|
||||
|
||||
if (!forReplay) {
|
||||
CONFIG_ECHO_START;
|
||||
SERIAL_ECHOLNPGM_P(port, "Steps per unit:");
|
||||
}
|
||||
CONFIG_ECHO_START;
|
||||
CONFIG_ECHO_HEADING("Steps per unit:");
|
||||
CONFIG_ECHO_START();
|
||||
SERIAL_ECHOPAIR_P(port, " M92 X", LINEAR_UNIT(planner.settings.axis_steps_per_mm[X_AXIS]));
|
||||
SERIAL_ECHOPAIR_P(port, " Y", LINEAR_UNIT(planner.settings.axis_steps_per_mm[Y_AXIS]));
|
||||
SERIAL_ECHOPAIR_P(port, " Z", LINEAR_UNIT(planner.settings.axis_steps_per_mm[Z_AXIS]));
|
||||
@ -2327,18 +2320,15 @@ void MarlinSettings::reset(PORTARG_SOLO) {
|
||||
#endif
|
||||
SERIAL_EOL_P(port);
|
||||
#if ENABLED(DISTINCT_E_FACTORS)
|
||||
CONFIG_ECHO_START;
|
||||
CONFIG_ECHO_START();
|
||||
for (uint8_t i = 0; i < E_STEPPERS; i++) {
|
||||
SERIAL_ECHOPAIR_P(port, " M92 T", (int)i);
|
||||
SERIAL_ECHOLNPAIR_P(port, " E", VOLUMETRIC_UNIT(planner.settings.axis_steps_per_mm[E_AXIS + i]));
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!forReplay) {
|
||||
CONFIG_ECHO_START;
|
||||
SERIAL_ECHOLNPGM_P(port, "Maximum feedrates (units/s):");
|
||||
}
|
||||
CONFIG_ECHO_START;
|
||||
CONFIG_ECHO_HEADING("Maximum feedrates (units/s):");
|
||||
CONFIG_ECHO_START();
|
||||
SERIAL_ECHOPAIR_P(port, " M203 X", LINEAR_UNIT(planner.settings.max_feedrate_mm_s[X_AXIS]));
|
||||
SERIAL_ECHOPAIR_P(port, " Y", LINEAR_UNIT(planner.settings.max_feedrate_mm_s[Y_AXIS]));
|
||||
SERIAL_ECHOPAIR_P(port, " Z", LINEAR_UNIT(planner.settings.max_feedrate_mm_s[Z_AXIS]));
|
||||
@ -2347,18 +2337,15 @@ void MarlinSettings::reset(PORTARG_SOLO) {
|
||||
#endif
|
||||
SERIAL_EOL_P(port);
|
||||
#if ENABLED(DISTINCT_E_FACTORS)
|
||||
CONFIG_ECHO_START;
|
||||
CONFIG_ECHO_START();
|
||||
for (uint8_t i = 0; i < E_STEPPERS; i++) {
|
||||
SERIAL_ECHOPAIR_P(port, " M203 T", (int)i);
|
||||
SERIAL_ECHOLNPAIR_P(port, " E", VOLUMETRIC_UNIT(planner.settings.max_feedrate_mm_s[E_AXIS + i]));
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!forReplay) {
|
||||
CONFIG_ECHO_START;
|
||||
SERIAL_ECHOLNPGM_P(port, "Maximum Acceleration (units/s2):");
|
||||
}
|
||||
CONFIG_ECHO_START;
|
||||
CONFIG_ECHO_HEADING("Maximum Acceleration (units/s2):");
|
||||
CONFIG_ECHO_START();
|
||||
SERIAL_ECHOPAIR_P(port, " M201 X", LINEAR_UNIT(planner.settings.max_acceleration_mm_per_s2[X_AXIS]));
|
||||
SERIAL_ECHOPAIR_P(port, " Y", LINEAR_UNIT(planner.settings.max_acceleration_mm_per_s2[Y_AXIS]));
|
||||
SERIAL_ECHOPAIR_P(port, " Z", LINEAR_UNIT(planner.settings.max_acceleration_mm_per_s2[Z_AXIS]));
|
||||
@ -2367,24 +2354,21 @@ void MarlinSettings::reset(PORTARG_SOLO) {
|
||||
#endif
|
||||
SERIAL_EOL_P(port);
|
||||
#if ENABLED(DISTINCT_E_FACTORS)
|
||||
CONFIG_ECHO_START;
|
||||
CONFIG_ECHO_START();
|
||||
for (uint8_t i = 0; i < E_STEPPERS; i++) {
|
||||
SERIAL_ECHOPAIR_P(port, " M201 T", (int)i);
|
||||
SERIAL_ECHOLNPAIR_P(port, " E", VOLUMETRIC_UNIT(planner.settings.max_acceleration_mm_per_s2[E_AXIS + i]));
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!forReplay) {
|
||||
CONFIG_ECHO_START;
|
||||
SERIAL_ECHOLNPGM_P(port, "Acceleration (units/s2): P<print_accel> R<retract_accel> T<travel_accel>");
|
||||
}
|
||||
CONFIG_ECHO_START;
|
||||
CONFIG_ECHO_HEADING("Acceleration (units/s2): P<print_accel> R<retract_accel> T<travel_accel>");
|
||||
CONFIG_ECHO_START();
|
||||
SERIAL_ECHOPAIR_P(port, " M204 P", LINEAR_UNIT(planner.settings.acceleration));
|
||||
SERIAL_ECHOPAIR_P(port, " R", LINEAR_UNIT(planner.settings.retract_acceleration));
|
||||
SERIAL_ECHOLNPAIR_P(port, " T", LINEAR_UNIT(planner.settings.travel_acceleration));
|
||||
|
||||
if (!forReplay) {
|
||||
CONFIG_ECHO_START;
|
||||
CONFIG_ECHO_START();
|
||||
SERIAL_ECHOPGM_P(port, "Advanced: B<min_segment_time_us> S<min_feedrate> T<min_travel_feedrate>");
|
||||
#if ENABLED(JUNCTION_DEVIATION)
|
||||
SERIAL_ECHOPGM_P(port, " J<junc_dev>");
|
||||
@ -2397,7 +2381,7 @@ void MarlinSettings::reset(PORTARG_SOLO) {
|
||||
#endif
|
||||
SERIAL_EOL_P(port);
|
||||
}
|
||||
CONFIG_ECHO_START;
|
||||
CONFIG_ECHO_START();
|
||||
SERIAL_ECHOPAIR_P(port, " M205 B", LINEAR_UNIT(planner.settings.min_segment_time_us));
|
||||
SERIAL_ECHOPAIR_P(port, " S", LINEAR_UNIT(planner.settings.min_feedrate_mm_s));
|
||||
SERIAL_ECHOPAIR_P(port, " T", LINEAR_UNIT(planner.settings.min_travel_feedrate_mm_s));
|
||||
@ -2417,29 +2401,21 @@ void MarlinSettings::reset(PORTARG_SOLO) {
|
||||
SERIAL_EOL_P(port);
|
||||
|
||||
#if HAS_M206_COMMAND
|
||||
if (!forReplay) {
|
||||
CONFIG_ECHO_START;
|
||||
SERIAL_ECHOLNPGM_P(port, "Home offset:");
|
||||
}
|
||||
CONFIG_ECHO_START;
|
||||
CONFIG_ECHO_HEADING("Home offset:");
|
||||
CONFIG_ECHO_START();
|
||||
SERIAL_ECHOPAIR_P(port, " M206 X", LINEAR_UNIT(home_offset[X_AXIS]));
|
||||
SERIAL_ECHOPAIR_P(port, " Y", LINEAR_UNIT(home_offset[Y_AXIS]));
|
||||
SERIAL_ECHOLNPAIR_P(port, " Z", LINEAR_UNIT(home_offset[Z_AXIS]));
|
||||
#endif
|
||||
|
||||
#if HAS_HOTEND_OFFSET
|
||||
if (!forReplay) {
|
||||
CONFIG_ECHO_START;
|
||||
SERIAL_ECHOLNPGM_P(port, "Hotend offsets:");
|
||||
}
|
||||
CONFIG_ECHO_START;
|
||||
CONFIG_ECHO_HEADING("Hotend offsets:");
|
||||
CONFIG_ECHO_START();
|
||||
for (uint8_t e = 1; e < HOTENDS; e++) {
|
||||
SERIAL_ECHOPAIR_P(port, " M218 T", (int)e);
|
||||
SERIAL_ECHOPAIR_P(port, " X", LINEAR_UNIT(hotend_offset[X_AXIS][e]));
|
||||
SERIAL_ECHOPAIR_P(port, " Y", LINEAR_UNIT(hotend_offset[Y_AXIS][e]));
|
||||
SERIAL_ECHO_P(port, " Z");
|
||||
SERIAL_ECHO_F_P(port, LINEAR_UNIT(hotend_offset[Z_AXIS][e]), 3);
|
||||
SERIAL_EOL_P(port);
|
||||
SERIAL_ECHOLNPAIR_F_P(port, " Z", LINEAR_UNIT(hotend_offset[Z_AXIS][e]), 3);
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -2450,29 +2426,23 @@ void MarlinSettings::reset(PORTARG_SOLO) {
|
||||
|
||||
#if ENABLED(MESH_BED_LEVELING)
|
||||
|
||||
if (!forReplay) {
|
||||
CONFIG_ECHO_START;
|
||||
SERIAL_ECHOLNPGM_P(port, "Mesh Bed Leveling:");
|
||||
}
|
||||
CONFIG_ECHO_HEADING("Mesh Bed Leveling:");
|
||||
|
||||
#elif ENABLED(AUTO_BED_LEVELING_UBL)
|
||||
|
||||
if (!forReplay) {
|
||||
CONFIG_ECHO_START;
|
||||
CONFIG_ECHO_START();
|
||||
ubl.echo_name();
|
||||
SERIAL_ECHOLNPGM_P(port, ":");
|
||||
}
|
||||
|
||||
#elif HAS_ABL
|
||||
|
||||
if (!forReplay) {
|
||||
CONFIG_ECHO_START;
|
||||
SERIAL_ECHOLNPGM_P(port, "Auto Bed Leveling:");
|
||||
}
|
||||
CONFIG_ECHO_HEADING("Auto Bed Leveling:");
|
||||
|
||||
#endif
|
||||
|
||||
CONFIG_ECHO_START;
|
||||
CONFIG_ECHO_START();
|
||||
SERIAL_ECHOPAIR_P(port, " M420 S", planner.leveling_active ? 1 : 0);
|
||||
#if ENABLED(ENABLE_LEVELING_FADE_HEIGHT)
|
||||
SERIAL_ECHOPAIR_P(port, " Z", LINEAR_UNIT(planner.z_fade_height));
|
||||
@ -2484,12 +2454,10 @@ void MarlinSettings::reset(PORTARG_SOLO) {
|
||||
if (leveling_is_valid()) {
|
||||
for (uint8_t py = 0; py < GRID_MAX_POINTS_Y; py++) {
|
||||
for (uint8_t px = 0; px < GRID_MAX_POINTS_X; px++) {
|
||||
CONFIG_ECHO_START;
|
||||
CONFIG_ECHO_START();
|
||||
SERIAL_ECHOPAIR_P(port, " G29 S3 X", (int)px + 1);
|
||||
SERIAL_ECHOPAIR_P(port, " Y", (int)py + 1);
|
||||
SERIAL_ECHOPGM_P(port, " Z");
|
||||
SERIAL_ECHO_F_P(port, LINEAR_UNIT(mbl.z_values[px][py]), 5);
|
||||
SERIAL_EOL_P(port);
|
||||
SERIAL_ECHOLNPAIR_F_P(port, " Z", LINEAR_UNIT(mbl.z_values[px][py]), 5);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -2504,19 +2472,17 @@ void MarlinSettings::reset(PORTARG_SOLO) {
|
||||
SERIAL_ECHOLNPGM_P(port, " meshes.\n");
|
||||
}
|
||||
|
||||
// ubl.report_current_mesh(PORTVAR_SOLO); // This is too verbose for large mesh's. A better (more terse)
|
||||
// solution needs to be found.
|
||||
//ubl.report_current_mesh(PORTVAR_SOLO); // This is too verbose for large meshes. A better (more terse)
|
||||
// solution needs to be found.
|
||||
#elif ENABLED(AUTO_BED_LEVELING_BILINEAR)
|
||||
|
||||
if (leveling_is_valid()) {
|
||||
for (uint8_t py = 0; py < GRID_MAX_POINTS_Y; py++) {
|
||||
for (uint8_t px = 0; px < GRID_MAX_POINTS_X; px++) {
|
||||
CONFIG_ECHO_START;
|
||||
CONFIG_ECHO_START();
|
||||
SERIAL_ECHOPAIR_P(port, " G29 W I", (int)px);
|
||||
SERIAL_ECHOPAIR_P(port, " J", (int)py);
|
||||
SERIAL_ECHOPGM_P(port, " Z");
|
||||
SERIAL_ECHO_F_P(port, LINEAR_UNIT(z_values[px][py]), 5);
|
||||
SERIAL_EOL_P(port);
|
||||
SERIAL_ECHOLNPAIR_F_P(port, " Z", LINEAR_UNIT(z_values[px][py]), 5);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -2527,10 +2493,7 @@ void MarlinSettings::reset(PORTARG_SOLO) {
|
||||
|
||||
#if HAS_SERVOS && ENABLED(EDITABLE_SERVO_ANGLES)
|
||||
|
||||
if (!forReplay) {
|
||||
CONFIG_ECHO_START;
|
||||
SERIAL_ECHOLNPGM_P(port, "Servo Angles:");
|
||||
}
|
||||
CONFIG_ECHO_HEADING("Servo Angles:");
|
||||
for (uint8_t i = 0; i < NUM_SERVOS; i++) {
|
||||
switch (i) {
|
||||
#if ENABLED(SWITCHING_EXTRUDER)
|
||||
@ -2543,7 +2506,7 @@ void MarlinSettings::reset(PORTARG_SOLO) {
|
||||
#elif defined(Z_SERVO_ANGLES) && defined(Z_PROBE_SERVO_NR)
|
||||
case Z_PROBE_SERVO_NR:
|
||||
#endif
|
||||
CONFIG_ECHO_START;
|
||||
CONFIG_ECHO_START();
|
||||
SERIAL_ECHOPAIR_P(port, " M281 P", int(i));
|
||||
SERIAL_ECHOPAIR_P(port, " L", servo_angles[i][0]);
|
||||
SERIAL_ECHOPAIR_P(port, " U", servo_angles[i][1]);
|
||||
@ -2556,11 +2519,8 @@ void MarlinSettings::reset(PORTARG_SOLO) {
|
||||
|
||||
#if HAS_SCARA_OFFSET
|
||||
|
||||
if (!forReplay) {
|
||||
CONFIG_ECHO_START;
|
||||
SERIAL_ECHOLNPGM_P(port, "SCARA settings: S<seg-per-sec> P<theta-psi-offset> T<theta-offset>");
|
||||
}
|
||||
CONFIG_ECHO_START;
|
||||
CONFIG_ECHO_HEADING("SCARA settings: S<seg-per-sec> P<theta-psi-offset> T<theta-offset>");
|
||||
CONFIG_ECHO_START();
|
||||
SERIAL_ECHOPAIR_P(port, " M665 S", delta_segments_per_second);
|
||||
SERIAL_ECHOPAIR_P(port, " P", scara_home_offset[A_AXIS]);
|
||||
SERIAL_ECHOPAIR_P(port, " T", scara_home_offset[B_AXIS]);
|
||||
@ -2569,19 +2529,14 @@ void MarlinSettings::reset(PORTARG_SOLO) {
|
||||
|
||||
#elif ENABLED(DELTA)
|
||||
|
||||
if (!forReplay) {
|
||||
CONFIG_ECHO_START;
|
||||
SERIAL_ECHOLNPGM_P(port, "Endstop adjustment:");
|
||||
}
|
||||
CONFIG_ECHO_START;
|
||||
CONFIG_ECHO_HEADING("Endstop adjustment:");
|
||||
CONFIG_ECHO_START();
|
||||
SERIAL_ECHOPAIR_P(port, " M666 X", LINEAR_UNIT(delta_endstop_adj[X_AXIS]));
|
||||
SERIAL_ECHOPAIR_P(port, " Y", LINEAR_UNIT(delta_endstop_adj[Y_AXIS]));
|
||||
SERIAL_ECHOLNPAIR_P(port, " Z", LINEAR_UNIT(delta_endstop_adj[Z_AXIS]));
|
||||
if (!forReplay) {
|
||||
CONFIG_ECHO_START;
|
||||
SERIAL_ECHOLNPGM_P(port, "Delta settings: L<diagonal_rod> R<radius> H<height> S<segments_per_s> B<calibration radius> XYZ<tower angle corrections>");
|
||||
}
|
||||
CONFIG_ECHO_START;
|
||||
|
||||
CONFIG_ECHO_HEADING("Delta settings: L<diagonal_rod> R<radius> H<height> S<segments_per_s> B<calibration radius> XYZ<tower angle corrections>");
|
||||
CONFIG_ECHO_START();
|
||||
SERIAL_ECHOPAIR_P(port, " M665 L", LINEAR_UNIT(delta_diagonal_rod));
|
||||
SERIAL_ECHOPAIR_P(port, " R", LINEAR_UNIT(delta_radius));
|
||||
SERIAL_ECHOPAIR_P(port, " H", LINEAR_UNIT(delta_height));
|
||||
@ -2594,11 +2549,8 @@ void MarlinSettings::reset(PORTARG_SOLO) {
|
||||
|
||||
#elif ENABLED(X_DUAL_ENDSTOPS) || ENABLED(Y_DUAL_ENDSTOPS) || ENABLED(Z_DUAL_ENDSTOPS)
|
||||
|
||||
if (!forReplay) {
|
||||
CONFIG_ECHO_START;
|
||||
SERIAL_ECHOLNPGM_P(port, "Endstop adjustment:");
|
||||
}
|
||||
CONFIG_ECHO_START;
|
||||
CONFIG_ECHO_HEADING("Endstop adjustment:");
|
||||
CONFIG_ECHO_START();
|
||||
SERIAL_ECHOPGM_P(port, " M666");
|
||||
#if ENABLED(X_DUAL_ENDSTOPS)
|
||||
SERIAL_ECHOPAIR_P(port, " X", LINEAR_UNIT(endstops.x2_endstop_adj));
|
||||
@ -2608,7 +2560,7 @@ void MarlinSettings::reset(PORTARG_SOLO) {
|
||||
#endif
|
||||
#if ENABLED(Z_TRIPLE_ENDSTOPS)
|
||||
SERIAL_ECHOLNPAIR_P(port, "S1 Z", LINEAR_UNIT(endstops.z2_endstop_adj));
|
||||
CONFIG_ECHO_START;
|
||||
CONFIG_ECHO_START();
|
||||
SERIAL_ECHOPAIR_P(port, " M666 S2 Z", LINEAR_UNIT(endstops.z3_endstop_adj));
|
||||
#elif ENABLED(Z_DUAL_ENDSTOPS)
|
||||
SERIAL_ECHOPAIR_P(port, " Z", LINEAR_UNIT(endstops.z2_endstop_adj));
|
||||
@ -2619,12 +2571,9 @@ void MarlinSettings::reset(PORTARG_SOLO) {
|
||||
|
||||
#if HAS_LCD_MENU
|
||||
|
||||
if (!forReplay) {
|
||||
CONFIG_ECHO_START;
|
||||
SERIAL_ECHOLNPGM_P(port, "Material heatup parameters:");
|
||||
}
|
||||
CONFIG_ECHO_HEADING("Material heatup parameters:");
|
||||
for (uint8_t i = 0; i < COUNT(ui.preheat_hotend_temp); i++) {
|
||||
CONFIG_ECHO_START;
|
||||
CONFIG_ECHO_START();
|
||||
SERIAL_ECHOPAIR_P(port, " M145 S", (int)i);
|
||||
SERIAL_ECHOPAIR_P(port, " H", TEMP_UNIT(ui.preheat_hotend_temp[i]));
|
||||
SERIAL_ECHOPAIR_P(port, " B", TEMP_UNIT(ui.preheat_bed_temp[i]));
|
||||
@ -2635,15 +2584,12 @@ void MarlinSettings::reset(PORTARG_SOLO) {
|
||||
|
||||
#if HAS_PID_HEATING
|
||||
|
||||
if (!forReplay) {
|
||||
CONFIG_ECHO_START;
|
||||
SERIAL_ECHOLNPGM_P(port, "PID settings:");
|
||||
}
|
||||
CONFIG_ECHO_HEADING("PID settings:");
|
||||
#if ENABLED(PIDTEMP)
|
||||
#if HOTENDS > 1
|
||||
if (forReplay) {
|
||||
HOTEND_LOOP() {
|
||||
CONFIG_ECHO_START;
|
||||
CONFIG_ECHO_START();
|
||||
SERIAL_ECHOPAIR_P(port, " M301 E", e);
|
||||
SERIAL_ECHOPAIR_P(port, " P", PID_PARAM(Kp, e));
|
||||
SERIAL_ECHOPAIR_P(port, " I", unscalePID_i(PID_PARAM(Ki, e)));
|
||||
@ -2659,7 +2605,7 @@ void MarlinSettings::reset(PORTARG_SOLO) {
|
||||
#endif // HOTENDS > 1
|
||||
// !forReplay || HOTENDS == 1
|
||||
{
|
||||
CONFIG_ECHO_START;
|
||||
CONFIG_ECHO_START();
|
||||
SERIAL_ECHOPAIR_P(port, " M301 P", PID_PARAM(Kp, 0)); // for compatibility with hosts, only echo values for E0
|
||||
SERIAL_ECHOPAIR_P(port, " I", unscalePID_i(PID_PARAM(Ki, 0)));
|
||||
SERIAL_ECHOPAIR_P(port, " D", unscalePID_d(PID_PARAM(Kd, 0)));
|
||||
@ -2672,7 +2618,7 @@ void MarlinSettings::reset(PORTARG_SOLO) {
|
||||
#endif // PIDTEMP
|
||||
|
||||
#if ENABLED(PIDTEMPBED)
|
||||
CONFIG_ECHO_START;
|
||||
CONFIG_ECHO_START();
|
||||
SERIAL_ECHOPAIR_P(port, " M304 P", thermalManager.bed_pid.Kp);
|
||||
SERIAL_ECHOPAIR_P(port, " I", unscalePID_i(thermalManager.bed_pid.Ki));
|
||||
SERIAL_ECHOPAIR_P(port, " D", unscalePID_d(thermalManager.bed_pid.Kd));
|
||||
@ -2682,51 +2628,36 @@ void MarlinSettings::reset(PORTARG_SOLO) {
|
||||
#endif // PIDTEMP || PIDTEMPBED
|
||||
|
||||
#if HAS_LCD_CONTRAST
|
||||
if (!forReplay) {
|
||||
CONFIG_ECHO_START;
|
||||
SERIAL_ECHOLNPGM_P(port, "LCD Contrast:");
|
||||
}
|
||||
CONFIG_ECHO_START;
|
||||
CONFIG_ECHO_HEADING("LCD Contrast:");
|
||||
CONFIG_ECHO_START();
|
||||
SERIAL_ECHOLNPAIR_P(port, " M250 C", ui.contrast);
|
||||
#endif
|
||||
|
||||
#if ENABLED(POWER_LOSS_RECOVERY)
|
||||
if (!forReplay) {
|
||||
CONFIG_ECHO_START;
|
||||
SERIAL_ECHOLNPGM_P(port, "Power-Loss Recovery:");
|
||||
}
|
||||
CONFIG_ECHO_START;
|
||||
CONFIG_ECHO_HEADING("Power-Loss Recovery:");
|
||||
CONFIG_ECHO_START();
|
||||
SERIAL_ECHOLNPAIR_P(port, " M413 S", int(recovery.enabled));
|
||||
#endif
|
||||
|
||||
#if ENABLED(FWRETRACT)
|
||||
|
||||
if (!forReplay) {
|
||||
CONFIG_ECHO_START;
|
||||
SERIAL_ECHOLNPGM_P(port, "Retract: S<length> F<units/m> Z<lift>");
|
||||
}
|
||||
CONFIG_ECHO_START;
|
||||
CONFIG_ECHO_HEADING("Retract: S<length> F<units/m> Z<lift>");
|
||||
CONFIG_ECHO_START();
|
||||
SERIAL_ECHOPAIR_P(port, " M207 S", LINEAR_UNIT(fwretract.settings.retract_length));
|
||||
SERIAL_ECHOPAIR_P(port, " W", LINEAR_UNIT(fwretract.settings.swap_retract_length));
|
||||
SERIAL_ECHOPAIR_P(port, " F", MMS_TO_MMM(LINEAR_UNIT(fwretract.settings.retract_feedrate_mm_s)));
|
||||
SERIAL_ECHOLNPAIR_P(port, " Z", LINEAR_UNIT(fwretract.settings.retract_zraise));
|
||||
|
||||
if (!forReplay) {
|
||||
CONFIG_ECHO_START;
|
||||
SERIAL_ECHOLNPGM_P(port, "Recover: S<length> F<units/m>");
|
||||
}
|
||||
CONFIG_ECHO_START;
|
||||
CONFIG_ECHO_HEADING("Recover: S<length> F<units/m>");
|
||||
CONFIG_ECHO_START();
|
||||
SERIAL_ECHOPAIR_P(port, " M208 S", LINEAR_UNIT(fwretract.settings.retract_recover_length));
|
||||
SERIAL_ECHOPAIR_P(port, " W", LINEAR_UNIT(fwretract.settings.swap_retract_recover_length));
|
||||
SERIAL_ECHOLNPAIR_P(port, " F", MMS_TO_MMM(LINEAR_UNIT(fwretract.settings.retract_recover_feedrate_mm_s)));
|
||||
|
||||
#if ENABLED(FWRETRACT_AUTORETRACT)
|
||||
|
||||
if (!forReplay) {
|
||||
CONFIG_ECHO_START;
|
||||
SERIAL_ECHOLNPGM_P(port, "Auto-Retract: S=0 to disable, 1 to interpret E-only moves as retract/recover");
|
||||
}
|
||||
CONFIG_ECHO_START;
|
||||
CONFIG_ECHO_HEADING("Auto-Retract: S=0 to disable, 1 to interpret E-only moves as retract/recover");
|
||||
CONFIG_ECHO_START();
|
||||
SERIAL_ECHOLNPAIR_P(port, " M209 S", fwretract.autoretract_enabled ? 1 : 0);
|
||||
|
||||
#endif // FWRETRACT_AUTORETRACT
|
||||
@ -2738,11 +2669,11 @@ void MarlinSettings::reset(PORTARG_SOLO) {
|
||||
*/
|
||||
#if HAS_BED_PROBE
|
||||
if (!forReplay) {
|
||||
CONFIG_ECHO_START;
|
||||
CONFIG_ECHO_START();
|
||||
SERIAL_ECHOPGM_P(port, "Z-Probe Offset");
|
||||
SAY_UNITS_P(port, true);
|
||||
}
|
||||
CONFIG_ECHO_START;
|
||||
CONFIG_ECHO_START();
|
||||
SERIAL_ECHOLNPAIR_P(port, " M851 Z", LINEAR_UNIT(zprobe_zoffset));
|
||||
#endif
|
||||
|
||||
@ -2750,23 +2681,14 @@ void MarlinSettings::reset(PORTARG_SOLO) {
|
||||
* Bed Skew Correction
|
||||
*/
|
||||
#if ENABLED(SKEW_CORRECTION_GCODE)
|
||||
if (!forReplay) {
|
||||
CONFIG_ECHO_START;
|
||||
SERIAL_ECHOLNPGM_P(port, "Skew Factor: ");
|
||||
}
|
||||
CONFIG_ECHO_START;
|
||||
CONFIG_ECHO_HEADING("Skew Factor: ");
|
||||
CONFIG_ECHO_START();
|
||||
#if ENABLED(SKEW_CORRECTION_FOR_Z)
|
||||
SERIAL_ECHOPGM_P(port, " M852 I");
|
||||
SERIAL_ECHO_F_P(port, LINEAR_UNIT(planner.skew_factor.xy), 6);
|
||||
SERIAL_ECHOPGM_P(port, " J");
|
||||
SERIAL_ECHO_F_P(port, LINEAR_UNIT(planner.skew_factor.xz), 6);
|
||||
SERIAL_ECHOPGM_P(port, " K");
|
||||
SERIAL_ECHO_F_P(port, LINEAR_UNIT(planner.skew_factor.yz), 6);
|
||||
SERIAL_EOL_P(port);
|
||||
SERIAL_ECHOPAIR_F_P(port, " M852 I", LINEAR_UNIT(planner.skew_factor.xy), 6);
|
||||
SERIAL_ECHOPAIR_F_P(port, " J", LINEAR_UNIT(planner.skew_factor.xz), 6);
|
||||
SERIAL_ECHOLNPAIR_F_P(port, " K", LINEAR_UNIT(planner.skew_factor.yz), 6);
|
||||
#else
|
||||
SERIAL_ECHOPGM_P(port, " M852 S");
|
||||
SERIAL_ECHO_F_P(port, LINEAR_UNIT(planner.skew_factor.xy), 6);
|
||||
SERIAL_EOL_P(port);
|
||||
SERIAL_ECHOLNPAIR_F_P(port, " M852 S", LINEAR_UNIT(planner.skew_factor.xy), 6);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@ -2775,11 +2697,8 @@ void MarlinSettings::reset(PORTARG_SOLO) {
|
||||
/**
|
||||
* TMC stepper driver current
|
||||
*/
|
||||
if (!forReplay) {
|
||||
CONFIG_ECHO_START;
|
||||
SERIAL_ECHOLNPGM_P(port, "Stepper driver current:");
|
||||
}
|
||||
CONFIG_ECHO_START;
|
||||
CONFIG_ECHO_HEADING("Stepper driver current:");
|
||||
CONFIG_ECHO_START();
|
||||
#if AXIS_IS_TMC(X) || AXIS_IS_TMC(Y) || AXIS_IS_TMC(Z)
|
||||
say_M906(PORTVAR_SOLO);
|
||||
#endif
|
||||
@ -2848,11 +2767,8 @@ void MarlinSettings::reset(PORTARG_SOLO) {
|
||||
* TMC Hybrid Threshold
|
||||
*/
|
||||
#if ENABLED(HYBRID_THRESHOLD)
|
||||
if (!forReplay) {
|
||||
CONFIG_ECHO_START;
|
||||
SERIAL_ECHOLNPGM_P(port, "Hybrid Threshold:");
|
||||
}
|
||||
CONFIG_ECHO_START;
|
||||
CONFIG_ECHO_HEADING("Hybrid Threshold:");
|
||||
CONFIG_ECHO_START();
|
||||
#if AXIS_HAS_STEALTHCHOP(X) || AXIS_HAS_STEALTHCHOP(Y) || AXIS_HAS_STEALTHCHOP(Z)
|
||||
say_M913(PORTVAR_SOLO);
|
||||
#endif
|
||||
@ -2923,11 +2839,8 @@ void MarlinSettings::reset(PORTARG_SOLO) {
|
||||
* TMC Sensorless homing thresholds
|
||||
*/
|
||||
#if USE_SENSORLESS
|
||||
if (!forReplay) {
|
||||
CONFIG_ECHO_START;
|
||||
SERIAL_ECHOLNPGM_P(port, "TMC2130 StallGuard threshold:");
|
||||
}
|
||||
CONFIG_ECHO_START;
|
||||
CONFIG_ECHO_HEADING("TMC2130 StallGuard threshold:");
|
||||
CONFIG_ECHO_START();
|
||||
#if X_SENSORLESS || Y_SENSORLESS || Z_SENSORLESS
|
||||
say_M914(PORTVAR_SOLO);
|
||||
#if X_SENSORLESS
|
||||
@ -2975,12 +2888,8 @@ void MarlinSettings::reset(PORTARG_SOLO) {
|
||||
* Linear Advance
|
||||
*/
|
||||
#if ENABLED(LIN_ADVANCE)
|
||||
if (!forReplay) {
|
||||
CONFIG_ECHO_START;
|
||||
SERIAL_ECHOLNPGM_P(port, "Linear Advance:");
|
||||
}
|
||||
|
||||
CONFIG_ECHO_START;
|
||||
CONFIG_ECHO_HEADING("Linear Advance:");
|
||||
CONFIG_ECHO_START();
|
||||
#if EXTRUDERS < 2
|
||||
SERIAL_ECHOLNPAIR_P(port, " M900 K", planner.extruder_advance_K[0]);
|
||||
#else
|
||||
@ -2992,11 +2901,8 @@ void MarlinSettings::reset(PORTARG_SOLO) {
|
||||
#endif
|
||||
|
||||
#if HAS_MOTOR_CURRENT_PWM
|
||||
CONFIG_ECHO_START;
|
||||
if (!forReplay) {
|
||||
SERIAL_ECHOLNPGM_P(port, "Stepper motor currents:");
|
||||
CONFIG_ECHO_START;
|
||||
}
|
||||
CONFIG_ECHO_HEADING("Stepper motor currents:");
|
||||
CONFIG_ECHO_START();
|
||||
SERIAL_ECHOPAIR_P(port, " M907 X", stepper.motor_current_setting[0]);
|
||||
SERIAL_ECHOPAIR_P(port, " Z", stepper.motor_current_setting[1]);
|
||||
SERIAL_ECHOPAIR_P(port, " E", stepper.motor_current_setting[2]);
|
||||
@ -3007,11 +2913,8 @@ void MarlinSettings::reset(PORTARG_SOLO) {
|
||||
* Advanced Pause filament load & unload lengths
|
||||
*/
|
||||
#if ENABLED(ADVANCED_PAUSE_FEATURE)
|
||||
if (!forReplay) {
|
||||
CONFIG_ECHO_START;
|
||||
SERIAL_ECHOLNPGM_P(port, "Filament load/unload lengths:");
|
||||
}
|
||||
CONFIG_ECHO_START;
|
||||
CONFIG_ECHO_HEADING("Filament load/unload lengths:");
|
||||
CONFIG_ECHO_START();
|
||||
#if EXTRUDERS == 1
|
||||
say_M603(PORTVAR_SOLO);
|
||||
SERIAL_ECHOPAIR_P(port, "L", LINEAR_UNIT(fc_settings[0].load_length));
|
||||
@ -3020,27 +2923,27 @@ void MarlinSettings::reset(PORTARG_SOLO) {
|
||||
say_M603(PORTVAR_SOLO);
|
||||
SERIAL_ECHOPAIR_P(port, "T0 L", LINEAR_UNIT(fc_settings[0].load_length));
|
||||
SERIAL_ECHOLNPAIR_P(port, " U", LINEAR_UNIT(fc_settings[0].unload_length));
|
||||
CONFIG_ECHO_START;
|
||||
CONFIG_ECHO_START();
|
||||
say_M603(PORTVAR_SOLO);
|
||||
SERIAL_ECHOPAIR_P(port, "T1 L", LINEAR_UNIT(fc_settings[1].load_length));
|
||||
SERIAL_ECHOLNPAIR_P(port, " U", LINEAR_UNIT(fc_settings[1].unload_length));
|
||||
#if EXTRUDERS > 2
|
||||
CONFIG_ECHO_START;
|
||||
CONFIG_ECHO_START();
|
||||
say_M603(PORTVAR_SOLO);
|
||||
SERIAL_ECHOPAIR_P(port, "T2 L", LINEAR_UNIT(fc_settings[2].load_length));
|
||||
SERIAL_ECHOLNPAIR_P(port, " U", LINEAR_UNIT(fc_settings[2].unload_length));
|
||||
#if EXTRUDERS > 3
|
||||
CONFIG_ECHO_START;
|
||||
CONFIG_ECHO_START();
|
||||
say_M603(PORTVAR_SOLO);
|
||||
SERIAL_ECHOPAIR_P(port, "T3 L", LINEAR_UNIT(fc_settings[3].load_length));
|
||||
SERIAL_ECHOLNPAIR_P(port, " U", LINEAR_UNIT(fc_settings[3].unload_length));
|
||||
#if EXTRUDERS > 4
|
||||
CONFIG_ECHO_START;
|
||||
CONFIG_ECHO_START();
|
||||
say_M603(PORTVAR_SOLO);
|
||||
SERIAL_ECHOPAIR_P(port, "T4 L", LINEAR_UNIT(fc_settings[4].load_length));
|
||||
SERIAL_ECHOLNPAIR_P(port, " U", LINEAR_UNIT(fc_settings[4].unload_length));
|
||||
#if EXTRUDERS > 5
|
||||
CONFIG_ECHO_START;
|
||||
CONFIG_ECHO_START();
|
||||
say_M603(PORTVAR_SOLO);
|
||||
SERIAL_ECHOPAIR_P(port, "T5 L", LINEAR_UNIT(fc_settings[5].load_length));
|
||||
SERIAL_ECHOLNPAIR_P(port, " U", LINEAR_UNIT(fc_settings[5].unload_length));
|
||||
@ -3052,11 +2955,8 @@ void MarlinSettings::reset(PORTARG_SOLO) {
|
||||
#endif // ADVANCED_PAUSE_FEATURE
|
||||
|
||||
#if EXTRUDERS > 1
|
||||
CONFIG_ECHO_START;
|
||||
if (!forReplay) {
|
||||
SERIAL_ECHOLNPGM_P(port, "Tool-changing:");
|
||||
CONFIG_ECHO_START;
|
||||
}
|
||||
CONFIG_ECHO_HEADING("Tool-changing:");
|
||||
CONFIG_ECHO_START();
|
||||
M217_report(true);
|
||||
#endif
|
||||
}
|
||||
|
@ -365,13 +365,13 @@ void Endstops::event_handler() {
|
||||
|
||||
static void print_es_state(const bool is_hit, PGM_P const label=NULL) {
|
||||
if (label) serialprintPGM(label);
|
||||
SERIAL_PROTOCOLPGM(": ");
|
||||
SERIAL_ECHOPGM(": ");
|
||||
serialprintPGM(is_hit ? PSTR(MSG_ENDSTOP_HIT) : PSTR(MSG_ENDSTOP_OPEN));
|
||||
SERIAL_EOL();
|
||||
}
|
||||
|
||||
void _O2 Endstops::M119() {
|
||||
SERIAL_PROTOCOLLNPGM(MSG_M119_REPORT);
|
||||
SERIAL_ECHOLNPGM(MSG_M119_REPORT);
|
||||
#define ES_REPORT(S) print_es_state(READ(S##_PIN) != S##_ENDSTOP_INVERTING, PSTR(MSG_##S))
|
||||
#if HAS_X_MIN
|
||||
ES_REPORT(X_MIN);
|
||||
@ -441,7 +441,7 @@ void _O2 Endstops::M119() {
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
SERIAL_PROTOCOLPGM(MSG_FILAMENT_RUNOUT_SENSOR);
|
||||
SERIAL_ECHOPGM(MSG_FILAMENT_RUNOUT_SENSOR);
|
||||
if (i > 1) { SERIAL_CHAR(' '); SERIAL_CHAR('0' + i); }
|
||||
print_es_state(digitalRead(pin) != FIL_RUNOUT_INVERTING);
|
||||
}
|
||||
@ -825,51 +825,51 @@ void Endstops::update() {
|
||||
|
||||
if (endstop_change) {
|
||||
#if HAS_X_MIN
|
||||
if (TEST(endstop_change, X_MIN)) SERIAL_PROTOCOLPAIR(" X_MIN:", TEST(live_state_local, X_MIN));
|
||||
if (TEST(endstop_change, X_MIN)) SERIAL_ECHOPAIR(" X_MIN:", TEST(live_state_local, X_MIN));
|
||||
#endif
|
||||
#if HAS_X_MAX
|
||||
if (TEST(endstop_change, X_MAX)) SERIAL_PROTOCOLPAIR(" X_MAX:", TEST(live_state_local, X_MAX));
|
||||
if (TEST(endstop_change, X_MAX)) SERIAL_ECHOPAIR(" X_MAX:", TEST(live_state_local, X_MAX));
|
||||
#endif
|
||||
#if HAS_Y_MIN
|
||||
if (TEST(endstop_change, Y_MIN)) SERIAL_PROTOCOLPAIR(" Y_MIN:", TEST(live_state_local, Y_MIN));
|
||||
if (TEST(endstop_change, Y_MIN)) SERIAL_ECHOPAIR(" Y_MIN:", TEST(live_state_local, Y_MIN));
|
||||
#endif
|
||||
#if HAS_Y_MAX
|
||||
if (TEST(endstop_change, Y_MAX)) SERIAL_PROTOCOLPAIR(" Y_MAX:", TEST(live_state_local, Y_MAX));
|
||||
if (TEST(endstop_change, Y_MAX)) SERIAL_ECHOPAIR(" Y_MAX:", TEST(live_state_local, Y_MAX));
|
||||
#endif
|
||||
#if HAS_Z_MIN
|
||||
if (TEST(endstop_change, Z_MIN)) SERIAL_PROTOCOLPAIR(" Z_MIN:", TEST(live_state_local, Z_MIN));
|
||||
if (TEST(endstop_change, Z_MIN)) SERIAL_ECHOPAIR(" Z_MIN:", TEST(live_state_local, Z_MIN));
|
||||
#endif
|
||||
#if HAS_Z_MAX
|
||||
if (TEST(endstop_change, Z_MAX)) SERIAL_PROTOCOLPAIR(" Z_MAX:", TEST(live_state_local, Z_MAX));
|
||||
if (TEST(endstop_change, Z_MAX)) SERIAL_ECHOPAIR(" Z_MAX:", TEST(live_state_local, Z_MAX));
|
||||
#endif
|
||||
#if HAS_Z_MIN_PROBE_PIN
|
||||
if (TEST(endstop_change, Z_MIN_PROBE)) SERIAL_PROTOCOLPAIR(" PROBE:", TEST(live_state_local, Z_MIN_PROBE));
|
||||
if (TEST(endstop_change, Z_MIN_PROBE)) SERIAL_ECHOPAIR(" PROBE:", TEST(live_state_local, Z_MIN_PROBE));
|
||||
#endif
|
||||
#if HAS_X2_MIN
|
||||
if (TEST(endstop_change, X2_MIN)) SERIAL_PROTOCOLPAIR(" X2_MIN:", TEST(live_state_local, X2_MIN));
|
||||
if (TEST(endstop_change, X2_MIN)) SERIAL_ECHOPAIR(" X2_MIN:", TEST(live_state_local, X2_MIN));
|
||||
#endif
|
||||
#if HAS_X2_MAX
|
||||
if (TEST(endstop_change, X2_MAX)) SERIAL_PROTOCOLPAIR(" X2_MAX:", TEST(live_state_local, X2_MAX));
|
||||
if (TEST(endstop_change, X2_MAX)) SERIAL_ECHOPAIR(" X2_MAX:", TEST(live_state_local, X2_MAX));
|
||||
#endif
|
||||
#if HAS_Y2_MIN
|
||||
if (TEST(endstop_change, Y2_MIN)) SERIAL_PROTOCOLPAIR(" Y2_MIN:", TEST(live_state_local, Y2_MIN));
|
||||
if (TEST(endstop_change, Y2_MIN)) SERIAL_ECHOPAIR(" Y2_MIN:", TEST(live_state_local, Y2_MIN));
|
||||
#endif
|
||||
#if HAS_Y2_MAX
|
||||
if (TEST(endstop_change, Y2_MAX)) SERIAL_PROTOCOLPAIR(" Y2_MAX:", TEST(live_state_local, Y2_MAX));
|
||||
if (TEST(endstop_change, Y2_MAX)) SERIAL_ECHOPAIR(" Y2_MAX:", TEST(live_state_local, Y2_MAX));
|
||||
#endif
|
||||
#if HAS_Z2_MIN
|
||||
if (TEST(endstop_change, Z2_MIN)) SERIAL_PROTOCOLPAIR(" Z2_MIN:", TEST(live_state_local, Z2_MIN));
|
||||
if (TEST(endstop_change, Z2_MIN)) SERIAL_ECHOPAIR(" Z2_MIN:", TEST(live_state_local, Z2_MIN));
|
||||
#endif
|
||||
#if HAS_Z2_MAX
|
||||
if (TEST(endstop_change, Z2_MAX)) SERIAL_PROTOCOLPAIR(" Z2_MAX:", TEST(live_state_local, Z2_MAX));
|
||||
if (TEST(endstop_change, Z2_MAX)) SERIAL_ECHOPAIR(" Z2_MAX:", TEST(live_state_local, Z2_MAX));
|
||||
#endif
|
||||
#if HAS_Z3_MIN
|
||||
if (TEST(endstop_change, Z3_MIN)) SERIAL_PROTOCOLPAIR(" Z3_MIN:", TEST(live_state_local, Z3_MIN));
|
||||
if (TEST(endstop_change, Z3_MIN)) SERIAL_ECHOPAIR(" Z3_MIN:", TEST(live_state_local, Z3_MIN));
|
||||
#endif
|
||||
#if HAS_Z3_MAX
|
||||
if (TEST(endstop_change, Z3_MAX)) SERIAL_PROTOCOLPAIR(" Z3_MAX:", TEST(live_state_local, Z3_MAX));
|
||||
if (TEST(endstop_change, Z3_MAX)) SERIAL_ECHOPAIR(" Z3_MAX:", TEST(live_state_local, Z3_MAX));
|
||||
#endif
|
||||
SERIAL_PROTOCOLPGM("\n\n");
|
||||
SERIAL_ECHOPGM("\n\n");
|
||||
analogWrite(LED_PIN, local_LED_status);
|
||||
local_LED_status ^= 255;
|
||||
old_live_state_local = live_state_local;
|
||||
|
@ -163,14 +163,10 @@ float cartes[XYZ];
|
||||
* Output the current position to serial
|
||||
*/
|
||||
void report_current_position() {
|
||||
SERIAL_PROTOCOLPGM("X:");
|
||||
SERIAL_PROTOCOL(LOGICAL_X_POSITION(current_position[X_AXIS]));
|
||||
SERIAL_PROTOCOLPGM(" Y:");
|
||||
SERIAL_PROTOCOL(LOGICAL_Y_POSITION(current_position[Y_AXIS]));
|
||||
SERIAL_PROTOCOLPGM(" Z:");
|
||||
SERIAL_PROTOCOL(LOGICAL_Z_POSITION(current_position[Z_AXIS]));
|
||||
SERIAL_PROTOCOLPGM(" E:");
|
||||
SERIAL_PROTOCOL(current_position[E_AXIS]);
|
||||
SERIAL_ECHOPAIR("X:", LOGICAL_X_POSITION(current_position[X_AXIS]));
|
||||
SERIAL_ECHOPAIR(" Y:", LOGICAL_Y_POSITION(current_position[Y_AXIS]));
|
||||
SERIAL_ECHOPAIR(" Z:", LOGICAL_Z_POSITION(current_position[Z_AXIS]));
|
||||
SERIAL_ECHOPAIR(" E:", current_position[E_AXIS]);
|
||||
|
||||
stepper.report_positions();
|
||||
|
||||
@ -967,15 +963,13 @@ void prepare_move_to_destination() {
|
||||
#if ENABLED(PREVENT_COLD_EXTRUSION)
|
||||
if (thermalManager.tooColdToExtrude(active_extruder)) {
|
||||
current_position[E_AXIS] = destination[E_AXIS]; // Behave as if the move really took place, but ignore E part
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_ECHOLNPGM(MSG_ERR_COLD_EXTRUDE_STOP);
|
||||
SERIAL_ECHO_MSG(MSG_ERR_COLD_EXTRUDE_STOP);
|
||||
}
|
||||
#endif // PREVENT_COLD_EXTRUSION
|
||||
#if ENABLED(PREVENT_LENGTHY_EXTRUDE)
|
||||
if (ABS(destination[E_AXIS] - current_position[E_AXIS]) * planner.e_factor[active_extruder] > (EXTRUDE_MAXLENGTH)) {
|
||||
current_position[E_AXIS] = destination[E_AXIS]; // Behave as if the move really took place, but ignore E part
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_ECHOLNPGM(MSG_ERR_LONG_EXTRUDE_STOP);
|
||||
SERIAL_ECHO_MSG(MSG_ERR_LONG_EXTRUDE_STOP);
|
||||
}
|
||||
#endif // PREVENT_LENGTHY_EXTRUDE
|
||||
}
|
||||
@ -1046,8 +1040,7 @@ inline float get_homing_bump_feedrate(const AxisEnum axis) {
|
||||
uint8_t hbd = pgm_read_byte(&homing_bump_divisor[axis]);
|
||||
if (hbd < 1) {
|
||||
hbd = 10;
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_ECHOLNPGM("Warning: Homing Bump Divisor < 1");
|
||||
SERIAL_ECHO_MSG("Warning: Homing Bump Divisor < 1");
|
||||
}
|
||||
return homing_feedrate(axis) / hbd;
|
||||
}
|
||||
|
@ -1661,8 +1661,7 @@ bool Planner::_populate_block(block_t * const block, bool split_move,
|
||||
position_float[E_AXIS] = target_float[E_AXIS];
|
||||
#endif
|
||||
de = 0; // no difference
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_ECHOLNPGM(MSG_ERR_COLD_EXTRUDE_STOP);
|
||||
SERIAL_ECHO_MSG(MSG_ERR_COLD_EXTRUDE_STOP);
|
||||
}
|
||||
#endif // PREVENT_COLD_EXTRUSION
|
||||
#if ENABLED(PREVENT_LENGTHY_EXTRUDE)
|
||||
@ -1672,8 +1671,7 @@ bool Planner::_populate_block(block_t * const block, bool split_move,
|
||||
position_float[E_AXIS] = target_float[E_AXIS];
|
||||
#endif
|
||||
de = 0; // no difference
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_ECHOLNPGM(MSG_ERR_LONG_EXTRUDE_STOP);
|
||||
SERIAL_ECHO_MSG(MSG_ERR_LONG_EXTRUDE_STOP);
|
||||
}
|
||||
#endif // PREVENT_LENGTHY_EXTRUDE
|
||||
}
|
||||
|
@ -111,7 +111,7 @@ void PrintCounter::saveStats() {
|
||||
void PrintCounter::showStats() {
|
||||
char buffer[21];
|
||||
|
||||
SERIAL_PROTOCOLPGM(MSG_STATS);
|
||||
SERIAL_ECHOPGM(MSG_STATS);
|
||||
|
||||
SERIAL_ECHOPGM("Prints: ");
|
||||
SERIAL_ECHO(data.totalPrints);
|
||||
@ -124,7 +124,7 @@ void PrintCounter::showStats() {
|
||||
- ((isRunning() || isPaused()) ? 1 : 0));
|
||||
|
||||
SERIAL_EOL();
|
||||
SERIAL_PROTOCOLPGM(MSG_STATS);
|
||||
SERIAL_ECHOPGM(MSG_STATS);
|
||||
|
||||
duration_t elapsed = data.printTime;
|
||||
elapsed.toString(buffer);
|
||||
@ -151,7 +151,7 @@ void PrintCounter::showStats() {
|
||||
#endif
|
||||
|
||||
SERIAL_EOL();
|
||||
SERIAL_PROTOCOLPGM(MSG_STATS);
|
||||
SERIAL_ECHOPGM(MSG_STATS);
|
||||
|
||||
SERIAL_ECHOPGM("Filament used: ");
|
||||
SERIAL_ECHO(data.filamentUsed / 1000);
|
||||
|
@ -320,8 +320,7 @@ float zprobe_zoffset; // Initialized by settings.load()
|
||||
// (Measured completion time was 0.65 seconds
|
||||
// after reset, deploy, and stow sequence)
|
||||
if (TEST_BLTOUCH()) { // If it still claims to be triggered...
|
||||
SERIAL_ERROR_START();
|
||||
SERIAL_ERRORLNPGM(MSG_STOP_BLTOUCH);
|
||||
SERIAL_ERROR_MSG(MSG_STOP_BLTOUCH);
|
||||
stop(); // punt!
|
||||
return true;
|
||||
}
|
||||
@ -450,8 +449,7 @@ bool set_probe_deployed(const bool deploy) {
|
||||
#define _AUE_ARGS
|
||||
#endif
|
||||
if (axis_unhomed_error(_AUE_ARGS)) {
|
||||
SERIAL_ERROR_START();
|
||||
SERIAL_ERRORLNPGM(MSG_STOP_UNHOMED);
|
||||
SERIAL_ERROR_MSG(MSG_STOP_UNHOMED);
|
||||
stop();
|
||||
return true;
|
||||
}
|
||||
@ -479,8 +477,7 @@ bool set_probe_deployed(const bool deploy) {
|
||||
|
||||
if (PROBE_STOWED() == deploy) { // Unchanged after deploy/stow action?
|
||||
if (IsRunning()) {
|
||||
SERIAL_ERROR_START();
|
||||
SERIAL_ERRORLNPGM("Z-Probe failed");
|
||||
SERIAL_ERROR_MSG("Z-Probe failed");
|
||||
LCD_ALERTMESSAGEPGM("Err: ZPROBE");
|
||||
}
|
||||
stop();
|
||||
@ -771,13 +768,9 @@ float probe_pt(const float &rx, const float &ry, const ProbePtRaise raise_after/
|
||||
}
|
||||
|
||||
if (verbose_level > 2) {
|
||||
SERIAL_PROTOCOLPGM("Bed X: ");
|
||||
SERIAL_PROTOCOL_F(LOGICAL_X_POSITION(rx), 3);
|
||||
SERIAL_PROTOCOLPGM(" Y: ");
|
||||
SERIAL_PROTOCOL_F(LOGICAL_Y_POSITION(ry), 3);
|
||||
SERIAL_PROTOCOLPGM(" Z: ");
|
||||
SERIAL_PROTOCOL_F(measured_z, 3);
|
||||
SERIAL_EOL();
|
||||
SERIAL_ECHOPAIR_F("Bed X: ", LOGICAL_X_POSITION(rx), 3);
|
||||
SERIAL_ECHOPAIR_F(" Y: ", LOGICAL_Y_POSITION(ry), 3);
|
||||
SERIAL_ECHOLNPAIR_F(" Z: ", measured_z, 3);
|
||||
}
|
||||
|
||||
feedrate_mm_s = old_feedrate_mm_s;
|
||||
@ -785,8 +778,7 @@ float probe_pt(const float &rx, const float &ry, const ProbePtRaise raise_after/
|
||||
if (isnan(measured_z)) {
|
||||
STOW_PROBE();
|
||||
LCD_MESSAGEPGM(MSG_ERR_PROBING_FAILED);
|
||||
SERIAL_ERROR_START();
|
||||
SERIAL_ERRORLNPGM(MSG_ERR_PROBING_FAILED);
|
||||
SERIAL_ERROR_MSG(MSG_ERR_PROBING_FAILED);
|
||||
}
|
||||
|
||||
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
||||
|
@ -142,8 +142,8 @@ void inverse_kinematics(const float (&raw)[XYZ]) {
|
||||
}
|
||||
|
||||
void scara_report_positions() {
|
||||
SERIAL_PROTOCOLPAIR("SCARA Theta:", planner.get_axis_position_degrees(A_AXIS));
|
||||
SERIAL_PROTOCOLLNPAIR(" Psi+Theta:", planner.get_axis_position_degrees(B_AXIS));
|
||||
SERIAL_ECHOPAIR("SCARA Theta:", planner.get_axis_position_degrees(A_AXIS));
|
||||
SERIAL_ECHOLNPAIR(" Psi+Theta:", planner.get_axis_position_degrees(B_AXIS));
|
||||
SERIAL_EOL();
|
||||
}
|
||||
|
||||
|
@ -2218,25 +2218,25 @@ void Stepper::report_positions() {
|
||||
if (was_enabled) ENABLE_STEPPER_DRIVER_INTERRUPT();
|
||||
|
||||
#if CORE_IS_XY || CORE_IS_XZ || ENABLED(DELTA) || IS_SCARA
|
||||
SERIAL_PROTOCOLPGM(MSG_COUNT_A);
|
||||
SERIAL_ECHOPGM(MSG_COUNT_A);
|
||||
#else
|
||||
SERIAL_PROTOCOLPGM(MSG_COUNT_X);
|
||||
SERIAL_ECHOPGM(MSG_COUNT_X);
|
||||
#endif
|
||||
SERIAL_PROTOCOL(xpos);
|
||||
SERIAL_ECHO(xpos);
|
||||
|
||||
#if CORE_IS_XY || CORE_IS_YZ || ENABLED(DELTA) || IS_SCARA
|
||||
SERIAL_PROTOCOLPGM(" B:");
|
||||
SERIAL_ECHOPGM(" B:");
|
||||
#else
|
||||
SERIAL_PROTOCOLPGM(" Y:");
|
||||
SERIAL_ECHOPGM(" Y:");
|
||||
#endif
|
||||
SERIAL_PROTOCOL(ypos);
|
||||
SERIAL_ECHO(ypos);
|
||||
|
||||
#if CORE_IS_XZ || CORE_IS_YZ || ENABLED(DELTA)
|
||||
SERIAL_PROTOCOLPGM(" C:");
|
||||
SERIAL_ECHOPGM(" C:");
|
||||
#else
|
||||
SERIAL_PROTOCOLPGM(" Z:");
|
||||
SERIAL_ECHOPGM(" Z:");
|
||||
#endif
|
||||
SERIAL_PROTOCOL(zpos);
|
||||
SERIAL_ECHO(zpos);
|
||||
|
||||
SERIAL_EOL();
|
||||
}
|
||||
@ -2813,82 +2813,81 @@ void Stepper::report_positions() {
|
||||
case 128: microstep_ms(driver, MICROSTEP128); break;
|
||||
#endif
|
||||
|
||||
default: SERIAL_ERROR_START(); SERIAL_ERRORLNPGM("Microsteps unavailable"); break;
|
||||
default: SERIAL_ERROR_MSG("Microsteps unavailable"); break;
|
||||
}
|
||||
}
|
||||
|
||||
void Stepper::microstep_readings() {
|
||||
SERIAL_PROTOCOLLNPGM("MS1,MS2,MS3 Pins");
|
||||
SERIAL_PROTOCOLPGM("X: ");
|
||||
SERIAL_ECHOPGM("MS1,MS2,MS3 Pins\nX: ");
|
||||
#if HAS_X_MICROSTEPS
|
||||
SERIAL_PROTOCOL(READ(X_MS1_PIN));
|
||||
SERIAL_PROTOCOL(READ(X_MS2_PIN));
|
||||
SERIAL_ECHO(READ(X_MS1_PIN));
|
||||
SERIAL_ECHO(READ(X_MS2_PIN));
|
||||
#if PIN_EXISTS(X_MS3)
|
||||
SERIAL_PROTOCOLLN(READ(X_MS3_PIN));
|
||||
SERIAL_ECHOLN(READ(X_MS3_PIN));
|
||||
#endif
|
||||
#endif
|
||||
#if HAS_Y_MICROSTEPS
|
||||
SERIAL_PROTOCOLPGM("Y: ");
|
||||
SERIAL_PROTOCOL(READ(Y_MS1_PIN));
|
||||
SERIAL_PROTOCOL(READ(Y_MS2_PIN));
|
||||
SERIAL_ECHOPGM("Y: ");
|
||||
SERIAL_ECHO(READ(Y_MS1_PIN));
|
||||
SERIAL_ECHO(READ(Y_MS2_PIN));
|
||||
#if PIN_EXISTS(Y_MS3)
|
||||
SERIAL_PROTOCOLLN(READ(Y_MS3_PIN));
|
||||
SERIAL_ECHOLN(READ(Y_MS3_PIN));
|
||||
#endif
|
||||
#endif
|
||||
#if HAS_Z_MICROSTEPS
|
||||
SERIAL_PROTOCOLPGM("Z: ");
|
||||
SERIAL_PROTOCOL(READ(Z_MS1_PIN));
|
||||
SERIAL_PROTOCOL(READ(Z_MS2_PIN));
|
||||
SERIAL_ECHOPGM("Z: ");
|
||||
SERIAL_ECHO(READ(Z_MS1_PIN));
|
||||
SERIAL_ECHO(READ(Z_MS2_PIN));
|
||||
#if PIN_EXISTS(Z_MS3)
|
||||
SERIAL_PROTOCOLLN(READ(Z_MS3_PIN));
|
||||
SERIAL_ECHOLN(READ(Z_MS3_PIN));
|
||||
#endif
|
||||
#endif
|
||||
#if HAS_E0_MICROSTEPS
|
||||
SERIAL_PROTOCOLPGM("E0: ");
|
||||
SERIAL_PROTOCOL(READ(E0_MS1_PIN));
|
||||
SERIAL_PROTOCOL(READ(E0_MS2_PIN));
|
||||
SERIAL_ECHOPGM("E0: ");
|
||||
SERIAL_ECHO(READ(E0_MS1_PIN));
|
||||
SERIAL_ECHO(READ(E0_MS2_PIN));
|
||||
#if PIN_EXISTS(E0_MS3)
|
||||
SERIAL_PROTOCOLLN(READ(E0_MS3_PIN));
|
||||
SERIAL_ECHOLN(READ(E0_MS3_PIN));
|
||||
#endif
|
||||
#endif
|
||||
#if HAS_E1_MICROSTEPS
|
||||
SERIAL_PROTOCOLPGM("E1: ");
|
||||
SERIAL_PROTOCOL(READ(E1_MS1_PIN));
|
||||
SERIAL_PROTOCOL(READ(E1_MS2_PIN));
|
||||
SERIAL_ECHOPGM("E1: ");
|
||||
SERIAL_ECHO(READ(E1_MS1_PIN));
|
||||
SERIAL_ECHO(READ(E1_MS2_PIN));
|
||||
#if PIN_EXISTS(E1_MS3)
|
||||
SERIAL_PROTOCOLLN(READ(E1_MS3_PIN));
|
||||
SERIAL_ECHOLN(READ(E1_MS3_PIN));
|
||||
#endif
|
||||
#endif
|
||||
#if HAS_E2_MICROSTEPS
|
||||
SERIAL_PROTOCOLPGM("E2: ");
|
||||
SERIAL_PROTOCOL(READ(E2_MS1_PIN));
|
||||
SERIAL_PROTOCOL(READ(E2_MS2_PIN));
|
||||
SERIAL_ECHOPGM("E2: ");
|
||||
SERIAL_ECHO(READ(E2_MS1_PIN));
|
||||
SERIAL_ECHO(READ(E2_MS2_PIN));
|
||||
#if PIN_EXISTS(E2_MS3)
|
||||
SERIAL_PROTOCOLLN(READ(E2_MS3_PIN));
|
||||
SERIAL_ECHOLN(READ(E2_MS3_PIN));
|
||||
#endif
|
||||
#endif
|
||||
#if HAS_E3_MICROSTEPS
|
||||
SERIAL_PROTOCOLPGM("E3: ");
|
||||
SERIAL_PROTOCOL(READ(E3_MS1_PIN));
|
||||
SERIAL_PROTOCOL(READ(E3_MS2_PIN));
|
||||
SERIAL_ECHOPGM("E3: ");
|
||||
SERIAL_ECHO(READ(E3_MS1_PIN));
|
||||
SERIAL_ECHO(READ(E3_MS2_PIN));
|
||||
#if PIN_EXISTS(E3_MS3)
|
||||
SERIAL_PROTOCOLLN(READ(E3_MS3_PIN));
|
||||
SERIAL_ECHOLN(READ(E3_MS3_PIN));
|
||||
#endif
|
||||
#endif
|
||||
#if HAS_E4_MICROSTEPS
|
||||
SERIAL_PROTOCOLPGM("E4: ");
|
||||
SERIAL_PROTOCOL(READ(E4_MS1_PIN));
|
||||
SERIAL_PROTOCOL(READ(E4_MS2_PIN));
|
||||
SERIAL_ECHOPGM("E4: ");
|
||||
SERIAL_ECHO(READ(E4_MS1_PIN));
|
||||
SERIAL_ECHO(READ(E4_MS2_PIN));
|
||||
#if PIN_EXISTS(E4_MS3)
|
||||
SERIAL_PROTOCOLLN(READ(E4_MS3_PIN));
|
||||
SERIAL_ECHOLN(READ(E4_MS3_PIN));
|
||||
#endif
|
||||
#endif
|
||||
#if HAS_E5_MICROSTEPS
|
||||
SERIAL_PROTOCOLPGM("E5: ");
|
||||
SERIAL_PROTOCOL(READ(E5_MS1_PIN));
|
||||
SERIAL_PROTOCOLLN(READ(E5_MS2_PIN));
|
||||
SERIAL_ECHOPGM("E5: ");
|
||||
SERIAL_ECHO(READ(E5_MS1_PIN));
|
||||
SERIAL_ECHOLN(READ(E5_MS2_PIN));
|
||||
#if PIN_EXISTS(E5_MS3)
|
||||
SERIAL_PROTOCOLLN(READ(E5_MS3_PIN));
|
||||
SERIAL_ECHOLN(READ(E5_MS3_PIN));
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
@ -228,7 +228,7 @@ uint8_t Temperature::soft_pwm_amount[HOTENDS];
|
||||
|
||||
#if HAS_PID_HEATING
|
||||
|
||||
inline void say_default_() { SERIAL_PROTOCOLPGM("#define DEFAULT_"); }
|
||||
inline void say_default_() { SERIAL_ECHOPGM("#define DEFAULT_"); }
|
||||
|
||||
/**
|
||||
* PID Autotuning (M303)
|
||||
@ -343,37 +343,37 @@ uint8_t Temperature::soft_pwm_amount[HOTENDS];
|
||||
bias = constrain(bias, 20, max_pow - 20);
|
||||
d = (bias > max_pow >> 1) ? max_pow - 1 - bias : bias;
|
||||
|
||||
SERIAL_PROTOCOLPAIR(MSG_BIAS, bias);
|
||||
SERIAL_PROTOCOLPAIR(MSG_D, d);
|
||||
SERIAL_PROTOCOLPAIR(MSG_T_MIN, min);
|
||||
SERIAL_PROTOCOLPAIR(MSG_T_MAX, max);
|
||||
SERIAL_ECHOPAIR(MSG_BIAS, bias);
|
||||
SERIAL_ECHOPAIR(MSG_D, d);
|
||||
SERIAL_ECHOPAIR(MSG_T_MIN, min);
|
||||
SERIAL_ECHOPAIR(MSG_T_MAX, max);
|
||||
if (cycles > 2) {
|
||||
float Ku = (4.0f * d) / (float(M_PI) * (max - min) * 0.5f),
|
||||
Tu = ((float)(t_low + t_high) * 0.001f);
|
||||
SERIAL_PROTOCOLPAIR(MSG_KU, Ku);
|
||||
SERIAL_PROTOCOLPAIR(MSG_TU, Tu);
|
||||
SERIAL_ECHOPAIR(MSG_KU, Ku);
|
||||
SERIAL_ECHOPAIR(MSG_TU, Tu);
|
||||
tune_pid.Kp = 0.6f * Ku;
|
||||
tune_pid.Ki = 2 * tune_pid.Kp / Tu;
|
||||
tune_pid.Kd = tune_pid.Kp * Tu * 0.125f;
|
||||
SERIAL_PROTOCOLLNPGM("\n" MSG_CLASSIC_PID);
|
||||
SERIAL_PROTOCOLPAIR(MSG_KP, tune_pid.Kp);
|
||||
SERIAL_PROTOCOLPAIR(MSG_KI, tune_pid.Ki);
|
||||
SERIAL_PROTOCOLLNPAIR(MSG_KD, tune_pid.Kd);
|
||||
SERIAL_ECHOLNPGM("\n" MSG_CLASSIC_PID);
|
||||
SERIAL_ECHOPAIR(MSG_KP, tune_pid.Kp);
|
||||
SERIAL_ECHOPAIR(MSG_KI, tune_pid.Ki);
|
||||
SERIAL_ECHOLNPAIR(MSG_KD, tune_pid.Kd);
|
||||
/**
|
||||
tune_pid.Kp = 0.33*Ku;
|
||||
tune_pid.Ki = tune_pid.Kp/Tu;
|
||||
tune_pid.Kd = tune_pid.Kp*Tu/3;
|
||||
SERIAL_PROTOCOLLNPGM(" Some overshoot");
|
||||
SERIAL_PROTOCOLPAIR(" Kp: ", tune_pid.Kp);
|
||||
SERIAL_PROTOCOLPAIR(" Ki: ", tune_pid.Ki);
|
||||
SERIAL_PROTOCOLPAIR(" Kd: ", tune_pid.Kd);
|
||||
SERIAL_ECHOLNPGM(" Some overshoot");
|
||||
SERIAL_ECHOPAIR(" Kp: ", tune_pid.Kp);
|
||||
SERIAL_ECHOPAIR(" Ki: ", tune_pid.Ki);
|
||||
SERIAL_ECHOPAIR(" Kd: ", tune_pid.Kd);
|
||||
tune_pid.Kp = 0.2*Ku;
|
||||
tune_pid.Ki = 2*tune_pid.Kp/Tu;
|
||||
tune_pid.Kd = tune_pid.Kp*Tu/3;
|
||||
SERIAL_PROTOCOLLNPGM(" No overshoot");
|
||||
SERIAL_PROTOCOLPAIR(" Kp: ", tune_pid.Kp);
|
||||
SERIAL_PROTOCOLPAIR(" Ki: ", tune_pid.Ki);
|
||||
SERIAL_PROTOCOLPAIR(" Kd: ", tune_pid.Kd);
|
||||
SERIAL_ECHOLNPGM(" No overshoot");
|
||||
SERIAL_ECHOPAIR(" Kp: ", tune_pid.Kp);
|
||||
SERIAL_ECHOPAIR(" Ki: ", tune_pid.Ki);
|
||||
SERIAL_ECHOPAIR(" Kd: ", tune_pid.Kd);
|
||||
*/
|
||||
}
|
||||
}
|
||||
@ -389,7 +389,7 @@ uint8_t Temperature::soft_pwm_amount[HOTENDS];
|
||||
#define MAX_OVERSHOOT_PID_AUTOTUNE 20
|
||||
#endif
|
||||
if (current > target + MAX_OVERSHOOT_PID_AUTOTUNE) {
|
||||
SERIAL_PROTOCOLLNPGM(MSG_PID_TEMP_TOO_HIGH);
|
||||
SERIAL_ECHOLNPGM(MSG_PID_TEMP_TOO_HIGH);
|
||||
break;
|
||||
}
|
||||
|
||||
@ -432,26 +432,26 @@ uint8_t Temperature::soft_pwm_amount[HOTENDS];
|
||||
#define MAX_CYCLE_TIME_PID_AUTOTUNE 20L
|
||||
#endif
|
||||
if (((ms - t1) + (ms - t2)) > (MAX_CYCLE_TIME_PID_AUTOTUNE * 60L * 1000L)) {
|
||||
SERIAL_PROTOCOLLNPGM(MSG_PID_TIMEOUT);
|
||||
SERIAL_ECHOLNPGM(MSG_PID_TIMEOUT);
|
||||
break;
|
||||
}
|
||||
|
||||
if (cycles > ncycles) {
|
||||
SERIAL_PROTOCOLLNPGM(MSG_PID_AUTOTUNE_FINISHED);
|
||||
SERIAL_ECHOLNPGM(MSG_PID_AUTOTUNE_FINISHED);
|
||||
|
||||
#if HAS_PID_FOR_BOTH
|
||||
const char * const estring = GHV(PSTR("bed"), PSTR(""));
|
||||
say_default_(); serialprintPGM(estring); SERIAL_PROTOCOLLNPAIR("Kp ", tune_pid.Kp);
|
||||
say_default_(); serialprintPGM(estring); SERIAL_PROTOCOLLNPAIR("Ki ", tune_pid.Ki);
|
||||
say_default_(); serialprintPGM(estring); SERIAL_PROTOCOLLNPAIR("Kd ", tune_pid.Kd);
|
||||
say_default_(); serialprintPGM(estring); SERIAL_ECHOLNPAIR("Kp ", tune_pid.Kp);
|
||||
say_default_(); serialprintPGM(estring); SERIAL_ECHOLNPAIR("Ki ", tune_pid.Ki);
|
||||
say_default_(); serialprintPGM(estring); SERIAL_ECHOLNPAIR("Kd ", tune_pid.Kd);
|
||||
#elif ENABLED(PIDTEMP)
|
||||
say_default_(); SERIAL_PROTOCOLLNPAIR("Kp ", tune_pid.Kp);
|
||||
say_default_(); SERIAL_PROTOCOLLNPAIR("Ki ", tune_pid.Ki);
|
||||
say_default_(); SERIAL_PROTOCOLLNPAIR("Kd ", tune_pid.Kd);
|
||||
say_default_(); SERIAL_ECHOLNPAIR("Kp ", tune_pid.Kp);
|
||||
say_default_(); SERIAL_ECHOLNPAIR("Ki ", tune_pid.Ki);
|
||||
say_default_(); SERIAL_ECHOLNPAIR("Kd ", tune_pid.Kd);
|
||||
#else
|
||||
say_default_(); SERIAL_PROTOCOLLNPAIR("bedKp ", tune_pid.Kp);
|
||||
say_default_(); SERIAL_PROTOCOLLNPAIR("bedKi ", tune_pid.Ki);
|
||||
say_default_(); SERIAL_PROTOCOLLNPAIR("bedKd ", tune_pid.Kd);
|
||||
say_default_(); SERIAL_ECHOLNPAIR("bedKp ", tune_pid.Kp);
|
||||
say_default_(); SERIAL_ECHOLNPAIR("bedKi ", tune_pid.Ki);
|
||||
say_default_(); SERIAL_ECHOLNPAIR("bedKd ", tune_pid.Kd);
|
||||
#endif
|
||||
|
||||
#define _SET_BED_PID() do { \
|
||||
@ -564,8 +564,8 @@ void Temperature::_temp_error(const int8_t heater, PGM_P const serial_msg, PGM_P
|
||||
if (IsRunning()) {
|
||||
SERIAL_ERROR_START();
|
||||
serialprintPGM(serial_msg);
|
||||
SERIAL_ERRORPGM(MSG_STOPPED_HEATER);
|
||||
if (heater >= 0) SERIAL_ERRORLN((int)heater); else SERIAL_ERRORLNPGM(MSG_HEATER_BED);
|
||||
SERIAL_ECHOPGM(MSG_STOPPED_HEATER);
|
||||
if (heater >= 0) SERIAL_ECHOLN((int)heater); else SERIAL_ECHOLNPGM(MSG_HEATER_BED);
|
||||
}
|
||||
#if DISABLED(BOGUS_TEMPERATURE_FAILSAFE_OVERRIDE)
|
||||
if (!killed) {
|
||||
@ -940,8 +940,8 @@ float Temperature::analog_to_celsius_hotend(const int raw, const uint8_t e) {
|
||||
#endif
|
||||
{
|
||||
SERIAL_ERROR_START();
|
||||
SERIAL_ERROR((int)e);
|
||||
SERIAL_ERRORLNPGM(MSG_INVALID_EXTRUDER_NUM);
|
||||
SERIAL_ECHO((int)e);
|
||||
SERIAL_ECHOLNPGM(MSG_INVALID_EXTRUDER_NUM);
|
||||
kill();
|
||||
return 0.0;
|
||||
}
|
||||
@ -1684,17 +1684,17 @@ void Temperature::disable_all_heaters() {
|
||||
|
||||
if (max6675_temp & MAX6675_ERROR_MASK) {
|
||||
SERIAL_ERROR_START();
|
||||
SERIAL_ERRORPGM("Temp measurement error! ");
|
||||
SERIAL_ECHOPGM("Temp measurement error! ");
|
||||
#if MAX6675_ERROR_MASK == 7
|
||||
SERIAL_ERRORPGM("MAX31855 ");
|
||||
SERIAL_ECHOPGM("MAX31855 ");
|
||||
if (max6675_temp & 1)
|
||||
SERIAL_ERRORLNPGM("Open Circuit");
|
||||
SERIAL_ECHOLNPGM("Open Circuit");
|
||||
else if (max6675_temp & 2)
|
||||
SERIAL_ERRORLNPGM("Short to GND");
|
||||
SERIAL_ECHOLNPGM("Short to GND");
|
||||
else if (max6675_temp & 4)
|
||||
SERIAL_ERRORLNPGM("Short to VCC");
|
||||
SERIAL_ECHOLNPGM("Short to VCC");
|
||||
#else
|
||||
SERIAL_ERRORLNPGM("MAX6675");
|
||||
SERIAL_ECHOLNPGM("MAX6675");
|
||||
#endif
|
||||
|
||||
// Thermocouple open
|
||||
@ -2365,8 +2365,8 @@ void Temperature::isr() {
|
||||
UNUSED(e);
|
||||
#endif
|
||||
|
||||
SERIAL_PROTOCOLCHAR_P(port, ' ');
|
||||
SERIAL_PROTOCOLCHAR_P(port,
|
||||
SERIAL_CHAR_P(port, ' ');
|
||||
SERIAL_CHAR_P(port,
|
||||
#if HAS_TEMP_CHAMBER && HAS_HEATED_BED && HAS_TEMP_HOTEND
|
||||
e == -2 ? 'C' : e == -1 ? 'B' : 'T'
|
||||
#elif HAS_HEATED_BED && HAS_TEMP_HOTEND
|
||||
@ -2378,14 +2378,14 @@ void Temperature::isr() {
|
||||
#endif
|
||||
);
|
||||
#if HOTENDS > 1
|
||||
if (e >= 0) SERIAL_PROTOCOLCHAR_P(port, '0' + e);
|
||||
if (e >= 0) SERIAL_CHAR_P(port, '0' + e);
|
||||
#endif
|
||||
SERIAL_PROTOCOLCHAR_P(port, ':');
|
||||
SERIAL_PROTOCOL_P(port, c);
|
||||
SERIAL_PROTOCOLPAIR_P(port, " /" , t);
|
||||
SERIAL_CHAR_P(port, ':');
|
||||
SERIAL_ECHO_P(port, c);
|
||||
SERIAL_ECHOPAIR_P(port, " /" , t);
|
||||
#if ENABLED(SHOW_TEMP_ADC_VALUES)
|
||||
SERIAL_PROTOCOLPAIR_P(port, " (", r / OVERSAMPLENR);
|
||||
SERIAL_PROTOCOLCHAR_P(port, ')');
|
||||
SERIAL_ECHOPAIR_P(port, " (", r / OVERSAMPLENR);
|
||||
SERIAL_CHAR_P(port, ')');
|
||||
#endif
|
||||
delay(2);
|
||||
}
|
||||
@ -2435,17 +2435,17 @@ void Temperature::isr() {
|
||||
, e
|
||||
);
|
||||
#endif
|
||||
SERIAL_PROTOCOLPGM_P(port, " @:");
|
||||
SERIAL_PROTOCOL_P(port, getHeaterPower(target_extruder));
|
||||
SERIAL_ECHOPGM_P(port, " @:");
|
||||
SERIAL_ECHO_P(port, getHeaterPower(target_extruder));
|
||||
#if HAS_HEATED_BED
|
||||
SERIAL_PROTOCOLPGM_P(port, " B@:");
|
||||
SERIAL_PROTOCOL_P(port, getHeaterPower(-1));
|
||||
SERIAL_ECHOPGM_P(port, " B@:");
|
||||
SERIAL_ECHO_P(port, getHeaterPower(-1));
|
||||
#endif
|
||||
#if HOTENDS > 1
|
||||
HOTEND_LOOP() {
|
||||
SERIAL_PROTOCOLPAIR_P(port, " @", e);
|
||||
SERIAL_PROTOCOLCHAR_P(port, ':');
|
||||
SERIAL_PROTOCOL_P(port, getHeaterPower(e));
|
||||
SERIAL_ECHOPAIR_P(port, " @", e);
|
||||
SERIAL_CHAR_P(port, ':');
|
||||
SERIAL_ECHO_P(port, getHeaterPower(e));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@ -2528,11 +2528,11 @@ void Temperature::isr() {
|
||||
next_temp_ms = now + 1000UL;
|
||||
print_heater_states(target_extruder);
|
||||
#if TEMP_RESIDENCY_TIME > 0
|
||||
SERIAL_PROTOCOLPGM(" W:");
|
||||
SERIAL_ECHOPGM(" W:");
|
||||
if (residency_start_ms)
|
||||
SERIAL_PROTOCOL(long((((TEMP_RESIDENCY_TIME) * 1000UL) - (now - residency_start_ms)) / 1000UL));
|
||||
SERIAL_ECHO(long((((TEMP_RESIDENCY_TIME) * 1000UL) - (now - residency_start_ms)) / 1000UL));
|
||||
else
|
||||
SERIAL_PROTOCOLCHAR('?');
|
||||
SERIAL_CHAR('?');
|
||||
#endif
|
||||
SERIAL_EOL();
|
||||
}
|
||||
@ -2651,11 +2651,11 @@ void Temperature::isr() {
|
||||
next_temp_ms = now + 1000UL;
|
||||
print_heater_states(active_extruder);
|
||||
#if TEMP_BED_RESIDENCY_TIME > 0
|
||||
SERIAL_PROTOCOLPGM(" W:");
|
||||
SERIAL_ECHOPGM(" W:");
|
||||
if (residency_start_ms)
|
||||
SERIAL_PROTOCOL(long((((TEMP_BED_RESIDENCY_TIME) * 1000UL) - (now - residency_start_ms)) / 1000UL));
|
||||
SERIAL_ECHO(long((((TEMP_BED_RESIDENCY_TIME) * 1000UL) - (now - residency_start_ms)) / 1000UL));
|
||||
else
|
||||
SERIAL_PROTOCOLCHAR('?');
|
||||
SERIAL_CHAR('?');
|
||||
#endif
|
||||
SERIAL_EOL();
|
||||
}
|
||||
|
@ -553,8 +553,7 @@ void tool_change(const uint8_t tmp_extruder, const float fr_mm_s/*=0.0*/, bool n
|
||||
#endif
|
||||
if (should_swap) {
|
||||
if (too_cold) {
|
||||
SERIAL_ERROR_START();
|
||||
SERIAL_ERRORLNPGM(MSG_ERR_HOTEND_TOO_COLD);
|
||||
SERIAL_ERROR_MSG(MSG_ERR_HOTEND_TOO_COLD);
|
||||
#if ENABLED(SINGLENOZZLE)
|
||||
active_extruder = tmp_extruder;
|
||||
return;
|
||||
|
Reference in New Issue
Block a user