|
|
|
@ -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
|
|
|
|
|
}
|
|
|
|
|