MARLIN_SMALL_BUILD option (#26775)

This commit is contained in:
Scott Lahteine 2024-02-07 23:40:54 -06:00 committed by GitHub
parent 4aa48beb37
commit 669814d0d4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
54 changed files with 179 additions and 55 deletions

View file

@ -4527,3 +4527,6 @@
// Report uncleaned reset reason from register r2 instead of MCUSR. Supported by Optiboot on AVR. // Report uncleaned reset reason from register r2 instead of MCUSR. Supported by Optiboot on AVR.
//#define OPTIBOOT_RESET_REASON //#define OPTIBOOT_RESET_REASON
// Shrink the build for smaller boards by sacrificing some serial feedback
//#define MARLIN_SMALL_BUILD

View file

@ -212,6 +212,8 @@ void FWRetract::M207() {
} }
void FWRetract::M207_report() { void FWRetract::M207_report() {
TERN_(MARLIN_SMALL_BUILD, return);
SERIAL_ECHOLNPGM_P( SERIAL_ECHOLNPGM_P(
PSTR(" M207 S"), LINEAR_UNIT(settings.retract_length) PSTR(" M207 S"), LINEAR_UNIT(settings.retract_length)
, PSTR(" W"), LINEAR_UNIT(settings.swap_retract_length) , PSTR(" W"), LINEAR_UNIT(settings.swap_retract_length)
@ -237,6 +239,8 @@ void FWRetract::M208() {
} }
void FWRetract::M208_report() { void FWRetract::M208_report() {
TERN_(MARLIN_SMALL_BUILD, return);
SERIAL_ECHOLNPGM( SERIAL_ECHOLNPGM(
" M208 S", LINEAR_UNIT(settings.retract_recover_extra) " M208 S", LINEAR_UNIT(settings.retract_recover_extra)
, " W", LINEAR_UNIT(settings.swap_retract_recover_extra) , " W", LINEAR_UNIT(settings.swap_retract_recover_extra)
@ -258,6 +262,8 @@ void FWRetract::M208_report() {
} }
void FWRetract::M209_report() { void FWRetract::M209_report() {
TERN_(MARLIN_SMALL_BUILD, return);
SERIAL_ECHOLNPGM(" M209 S", AS_DIGIT(autoretract_enabled)); SERIAL_ECHOLNPGM(" M209 S", AS_DIGIT(autoretract_enabled));
} }

View file

@ -532,7 +532,7 @@ void GcodeSuite::G26() {
if (bedtemp) { if (bedtemp) {
if (!WITHIN(bedtemp, 40, BED_MAX_TARGET)) { if (!WITHIN(bedtemp, 40, BED_MAX_TARGET)) {
SERIAL_ECHOLNPGM("?Specified bed temperature not plausible (40-", BED_MAX_TARGET, "C)."); SERIAL_ECHOLNPGM(GCODE_ERR_MSG("Specified bed temperature not plausible (40-", BED_MAX_TARGET, "C)."));
return; return;
} }
g26.bed_temp = bedtemp; g26.bed_temp = bedtemp;
@ -543,7 +543,7 @@ void GcodeSuite::G26() {
if (parser.seenval('L')) { if (parser.seenval('L')) {
g26.layer_height = parser.value_linear_units(); g26.layer_height = parser.value_linear_units();
if (!WITHIN(g26.layer_height, 0.0, 2.0)) { if (!WITHIN(g26.layer_height, 0.0, 2.0)) {
SERIAL_ECHOLNPGM("?Specified layer height not plausible."); SERIAL_ECHOLNPGM(GCODE_ERR_MSG("Specified layer height not plausible."));
return; return;
} }
} }
@ -552,12 +552,12 @@ void GcodeSuite::G26() {
if (parser.has_value()) { if (parser.has_value()) {
g26.retraction_multiplier = parser.value_float(); g26.retraction_multiplier = parser.value_float();
if (!WITHIN(g26.retraction_multiplier, 0.05, 15.0)) { if (!WITHIN(g26.retraction_multiplier, 0.05, 15.0)) {
SERIAL_ECHOLNPGM("?Specified Retraction Multiplier not plausible."); SERIAL_ECHOLNPGM(GCODE_ERR_MSG("Specified Retraction Multiplier not plausible."));
return; return;
} }
} }
else { else {
SERIAL_ECHOLNPGM("?Retraction Multiplier must be specified."); SERIAL_ECHOLNPGM(GCODE_ERR_MSG("Retraction Multiplier must be specified."));
return; return;
} }
} }
@ -565,7 +565,7 @@ void GcodeSuite::G26() {
if (parser.seenval('S')) { if (parser.seenval('S')) {
g26.nozzle = parser.value_float(); g26.nozzle = parser.value_float();
if (!WITHIN(g26.nozzle, 0.1, 2.0)) { if (!WITHIN(g26.nozzle, 0.1, 2.0)) {
SERIAL_ECHOLNPGM("?Specified nozzle size not plausible."); SERIAL_ECHOLNPGM(GCODE_ERR_MSG("Specified nozzle size not plausible."));
return; return;
} }
} }
@ -575,7 +575,7 @@ void GcodeSuite::G26() {
#if HAS_MARLINUI_MENU #if HAS_MARLINUI_MENU
g26.prime_flag = -1; g26.prime_flag = -1;
#else #else
SERIAL_ECHOLNPGM("?Prime length must be specified when not using an LCD."); SERIAL_ECHOLNPGM(GCODE_ERR_MSG("Prime length must be specified when not using an LCD."));
return; return;
#endif #endif
} }
@ -583,7 +583,7 @@ void GcodeSuite::G26() {
g26.prime_flag++; g26.prime_flag++;
g26.prime_length = parser.value_linear_units(); g26.prime_length = parser.value_linear_units();
if (!WITHIN(g26.prime_length, 0.0, 25.0)) { if (!WITHIN(g26.prime_length, 0.0, 25.0)) {
SERIAL_ECHOLNPGM("?Specified prime length not plausible."); SERIAL_ECHOLNPGM(GCODE_ERR_MSG("Specified prime length not plausible."));
return; return;
} }
} }
@ -592,7 +592,7 @@ void GcodeSuite::G26() {
if (parser.seenval('F')) { if (parser.seenval('F')) {
g26.filament_diameter = parser.value_linear_units(); g26.filament_diameter = parser.value_linear_units();
if (!WITHIN(g26.filament_diameter, 1.0, 4.0)) { if (!WITHIN(g26.filament_diameter, 1.0, 4.0)) {
SERIAL_ECHOLNPGM("?Specified filament size not plausible."); SERIAL_ECHOLNPGM(GCODE_ERR_MSG("Specified filament size not plausible."));
return; return;
} }
} }
@ -616,7 +616,7 @@ void GcodeSuite::G26() {
// If any preset or temperature was specified // If any preset or temperature was specified
if (noztemp) { if (noztemp) {
if (!WITHIN(noztemp, 165, thermalManager.hotend_max_target(active_extruder))) { if (!WITHIN(noztemp, 165, thermalManager.hotend_max_target(active_extruder))) {
SERIAL_ECHOLNPGM("?Specified nozzle temperature not plausible."); SERIAL_ECHOLNPGM(GCODE_ERR_MSG("Specified nozzle temperature not plausible."));
return; return;
} }
g26.hotend_temp = noztemp; g26.hotend_temp = noztemp;
@ -637,12 +637,12 @@ void GcodeSuite::G26() {
if (parser.seen('R')) if (parser.seen('R'))
g26_repeats = parser.has_value() ? parser.value_int() : GRID_MAX_POINTS + 1; g26_repeats = parser.has_value() ? parser.value_int() : GRID_MAX_POINTS + 1;
else { else {
SERIAL_ECHOLNPGM("?(R)epeat must be specified when not using an LCD."); SERIAL_ECHOLNPGM(GCODE_ERR_MSG("(R)epeat must be specified when not using an LCD."));
return; return;
} }
#endif #endif
if (g26_repeats < 1) { if (g26_repeats < 1) {
SERIAL_ECHOLNPGM("?(R)epeat value not plausible; must be at least 1."); SERIAL_ECHOLNPGM(GCODE_ERR_MSG("(R)epeat value not plausible; must be at least 1."));
return; return;
} }
@ -650,7 +650,7 @@ void GcodeSuite::G26() {
g26.xy_pos.set(parser.seenval('X') ? RAW_X_POSITION(parser.value_linear_units()) : current_position.x, g26.xy_pos.set(parser.seenval('X') ? RAW_X_POSITION(parser.value_linear_units()) : current_position.x,
parser.seenval('Y') ? RAW_Y_POSITION(parser.value_linear_units()) : current_position.y); parser.seenval('Y') ? RAW_Y_POSITION(parser.value_linear_units()) : current_position.y);
if (!position_is_reachable(g26.xy_pos)) { if (!position_is_reachable(g26.xy_pos)) {
SERIAL_ECHOLNPGM("?Specified X,Y coordinate out of bounds."); SERIAL_ECHOLNPGM(GCODE_ERR_MSG("Specified X,Y coordinate out of bounds."));
return; return;
} }

View file

@ -64,7 +64,7 @@ void GcodeSuite::G35() {
const uint8_t screw_thread = parser.byteval('S', TRAMMING_SCREW_THREAD); const uint8_t screw_thread = parser.byteval('S', TRAMMING_SCREW_THREAD);
if (!WITHIN(screw_thread, 30, 51) || screw_thread % 10 > 1) { if (!WITHIN(screw_thread, 30, 51) || screw_thread % 10 > 1) {
SERIAL_ECHOLNPGM("?(S)crew thread must be 30, 31, 40, 41, 50, or 51."); SERIAL_ECHOLNPGM(GCODE_ERR_MSG("(S)crew thread must be 30, 31, 40, 41, 50, or 51."));
return; return;
} }

View file

@ -105,13 +105,12 @@ void GcodeSuite::M420() {
const int16_t a = settings.calc_num_meshes(); const int16_t a = settings.calc_num_meshes();
if (!a) { if (!a) {
SERIAL_ECHOLNPGM("?EEPROM storage not available."); SERIAL_ECHOLNPGM(GCODE_ERR_MSG("EEPROM storage not available."));
return; return;
} }
if (!WITHIN(storage_slot, 0, a - 1)) { if (!WITHIN(storage_slot, 0, a - 1)) {
SERIAL_ECHOLNPGM("?Invalid storage slot."); SERIAL_ECHOLNPGM(GCODE_ERR_MSG("Invalid storage slot. Use 0 to ", a - 1));
SERIAL_ECHOLNPGM("?Use 0 to ", a - 1);
return; return;
} }
@ -120,7 +119,7 @@ void GcodeSuite::M420() {
#else #else
SERIAL_ECHOLNPGM("?EEPROM storage not available."); SERIAL_ECHOLNPGM(GCODE_ERR_MSG("EEPROM storage not available."));
return; return;
#endif #endif
@ -245,6 +244,8 @@ void GcodeSuite::M420() {
} }
void GcodeSuite::M420_report(const bool forReplay/*=true*/) { void GcodeSuite::M420_report(const bool forReplay/*=true*/) {
TERN_(MARLIN_SMALL_BUILD, return);
report_heading_etc(forReplay, F( report_heading_etc(forReplay, F(
TERN(MESH_BED_LEVELING, "Mesh Bed Leveling", TERN(AUTO_BED_LEVELING_UBL, "Unified Bed Leveling", "Auto Bed Leveling")) TERN(MESH_BED_LEVELING, "Mesh Bed Leveling", TERN(AUTO_BED_LEVELING_UBL, "Unified Bed Leveling", "Auto Bed Leveling"))
)); ));

View file

@ -344,7 +344,7 @@ G29_TYPE GcodeSuite::G29() {
abl.verbose_level = parser.intval('V'); abl.verbose_level = parser.intval('V');
if (!WITHIN(abl.verbose_level, 0, 4)) { if (!WITHIN(abl.verbose_level, 0, 4)) {
SERIAL_ECHOLNPGM("?(V)erbose level implausible (0-4)."); SERIAL_ECHOLNPGM(GCODE_ERR_MSG("(V)erbose level implausible (0-4)."));
G29_RETURN(false, false); G29_RETURN(false, false);
} }
@ -365,11 +365,11 @@ G29_TYPE GcodeSuite::G29() {
if (parser.seenval('P')) abl.grid_points.x = abl.grid_points.y = parser.value_int(); if (parser.seenval('P')) abl.grid_points.x = abl.grid_points.y = parser.value_int();
if (!WITHIN(abl.grid_points.x, 2, GRID_MAX_POINTS_X)) { if (!WITHIN(abl.grid_points.x, 2, GRID_MAX_POINTS_X)) {
SERIAL_ECHOLNPGM("?Probe points (X) implausible (2-" STRINGIFY(GRID_MAX_POINTS_X) ")."); SERIAL_ECHOLNPGM(GCODE_ERR_MSG("Probe points (X) implausible (2-" STRINGIFY(GRID_MAX_POINTS_X) ")."));
G29_RETURN(false, false); G29_RETURN(false, false);
} }
if (!WITHIN(abl.grid_points.y, 2, GRID_MAX_POINTS_Y)) { if (!WITHIN(abl.grid_points.y, 2, GRID_MAX_POINTS_Y)) {
SERIAL_ECHOLNPGM("?Probe points (Y) implausible (2-" STRINGIFY(GRID_MAX_POINTS_Y) ")."); SERIAL_ECHOLNPGM(GCODE_ERR_MSG("Probe points (Y) implausible (2-" STRINGIFY(GRID_MAX_POINTS_Y) ")."));
G29_RETURN(false, false); G29_RETURN(false, false);
} }
@ -404,7 +404,7 @@ G29_TYPE GcodeSuite::G29() {
DEBUG_ECHOLNPGM("G29 L", abl.probe_position_lf.x, " R", abl.probe_position_rb.x, DEBUG_ECHOLNPGM("G29 L", abl.probe_position_lf.x, " R", abl.probe_position_rb.x,
" F", abl.probe_position_lf.y, " B", abl.probe_position_rb.y); " F", abl.probe_position_lf.y, " B", abl.probe_position_rb.y);
} }
SERIAL_ECHOLNPGM("? (L,R,F,B) out of bounds."); SERIAL_ECHOLNPGM(GCODE_ERR_MSG(" (L,R,F,B) out of bounds."));
G29_RETURN(false, false); G29_RETURN(false, false);
} }

View file

@ -390,7 +390,7 @@ void GcodeSuite::G33() {
const int8_t probe_points = parser.intval('P', DELTA_CALIBRATION_DEFAULT_POINTS); const int8_t probe_points = parser.intval('P', DELTA_CALIBRATION_DEFAULT_POINTS);
if (!WITHIN(probe_points, 0, 10)) { if (!WITHIN(probe_points, 0, 10)) {
SERIAL_ECHOLNPGM("?(P)oints implausible (0-10)."); SERIAL_ECHOLNPGM(GCODE_ERR_MSG("(P)oints implausible (0-10)."));
return; return;
} }
@ -409,19 +409,19 @@ void GcodeSuite::G33() {
const float calibration_precision = parser.floatval('C', 0.0f); const float calibration_precision = parser.floatval('C', 0.0f);
if (calibration_precision < 0) { if (calibration_precision < 0) {
SERIAL_ECHOLNPGM("?(C)alibration precision implausible (>=0)."); SERIAL_ECHOLNPGM(GCODE_ERR_MSG("(C)alibration precision implausible (>=0)."));
return; return;
} }
const int8_t force_iterations = parser.intval('F', 0); const int8_t force_iterations = parser.intval('F', 0);
if (!WITHIN(force_iterations, 0, 30)) { if (!WITHIN(force_iterations, 0, 30)) {
SERIAL_ECHOLNPGM("?(F)orce iteration implausible (0-30)."); SERIAL_ECHOLNPGM(GCODE_ERR_MSG("(F)orce iteration implausible (0-30)."));
return; return;
} }
const int8_t verbose_level = parser.byteval('V', 1); const int8_t verbose_level = parser.byteval('V', 1);
if (!WITHIN(verbose_level, 0, 3)) { if (!WITHIN(verbose_level, 0, 3)) {
SERIAL_ECHOLNPGM("?(V)erbose level implausible (0-3)."); SERIAL_ECHOLNPGM(GCODE_ERR_MSG("(V)erbose level implausible (0-3)."));
return; return;
} }

View file

@ -110,19 +110,19 @@ void GcodeSuite::G34() {
const int8_t z_auto_align_iterations = parser.intval('I', Z_STEPPER_ALIGN_ITERATIONS); const int8_t z_auto_align_iterations = parser.intval('I', Z_STEPPER_ALIGN_ITERATIONS);
if (!WITHIN(z_auto_align_iterations, 1, 30)) { if (!WITHIN(z_auto_align_iterations, 1, 30)) {
SERIAL_ECHOLNPGM("?(I)teration out of bounds (1-30)."); SERIAL_ECHOLNPGM(GCODE_ERR_MSG("(I)teration out of bounds (1-30)."));
break; break;
} }
const float z_auto_align_accuracy = parser.floatval('T', Z_STEPPER_ALIGN_ACC); const float z_auto_align_accuracy = parser.floatval('T', Z_STEPPER_ALIGN_ACC);
if (!WITHIN(z_auto_align_accuracy, 0.01f, 1.0f)) { if (!WITHIN(z_auto_align_accuracy, 0.01f, 1.0f)) {
SERIAL_ECHOLNPGM("?(T)arget accuracy out of bounds (0.01-1.0)."); SERIAL_ECHOLNPGM(GCODE_ERR_MSG("(T)arget accuracy out of bounds (0.01-1.0)."));
break; break;
} }
const float z_auto_align_amplification = TERN(HAS_Z_STEPPER_ALIGN_STEPPER_XY, Z_STEPPER_ALIGN_AMP, parser.floatval('A', Z_STEPPER_ALIGN_AMP)); const float z_auto_align_amplification = TERN(HAS_Z_STEPPER_ALIGN_STEPPER_XY, Z_STEPPER_ALIGN_AMP, parser.floatval('A', Z_STEPPER_ALIGN_AMP));
if (!WITHIN(ABS(z_auto_align_amplification), 0.5f, 2.0f)) { if (!WITHIN(ABS(z_auto_align_amplification), 0.5f, 2.0f)) {
SERIAL_ECHOLNPGM("?(A)mplification out of bounds (0.5-2.0)."); SERIAL_ECHOLNPGM(GCODE_ERR_MSG("(A)mplification out of bounds (0.5-2.0)."));
break; break;
} }
@ -450,7 +450,7 @@ void GcodeSuite::M422() {
const bool is_probe_point = parser.seen_test('S'); const bool is_probe_point = parser.seen_test('S');
if (TERN0(HAS_Z_STEPPER_ALIGN_STEPPER_XY, is_probe_point && parser.seen_test('W'))) { if (TERN0(HAS_Z_STEPPER_ALIGN_STEPPER_XY, is_probe_point && parser.seen_test('W'))) {
SERIAL_ECHOLNPGM("?(S) and (W) may not be combined."); SERIAL_ECHOLNPGM(GCODE_ERR_MSG("(S) and (W) may not be combined."));
return; return;
} }
@ -460,7 +460,7 @@ void GcodeSuite::M422() {
); );
if (!is_probe_point && TERN1(HAS_Z_STEPPER_ALIGN_STEPPER_XY, !parser.seen_test('W'))) { if (!is_probe_point && TERN1(HAS_Z_STEPPER_ALIGN_STEPPER_XY, !parser.seen_test('W'))) {
SERIAL_ECHOLNPGM("?(S)" TERN_(HAS_Z_STEPPER_ALIGN_STEPPER_XY, " or (W)") " is required."); SERIAL_ECHOLNPGM(GCODE_ERR_MSG("(S)" TERN_(HAS_Z_STEPPER_ALIGN_STEPPER_XY, " or (W)") " is required."));
return; return;
} }
@ -490,11 +490,11 @@ void GcodeSuite::M422() {
if (is_probe_point) { if (is_probe_point) {
if (!probe.can_reach(pos.x, Y_CENTER)) { if (!probe.can_reach(pos.x, Y_CENTER)) {
SERIAL_ECHOLNPGM("?(X) out of bounds."); SERIAL_ECHOLNPGM(GCODE_ERR_MSG("(X) out of bounds."));
return; return;
} }
if (!probe.can_reach(pos)) { if (!probe.can_reach(pos)) {
SERIAL_ECHOLNPGM("?(Y) out of bounds."); SERIAL_ECHOLNPGM(GCODE_ERR_MSG("(Y) out of bounds."));
return; return;
} }
} }
@ -503,6 +503,8 @@ void GcodeSuite::M422() {
} }
void GcodeSuite::M422_report(const bool forReplay/*=true*/) { void GcodeSuite::M422_report(const bool forReplay/*=true*/) {
TERN_(MARLIN_SMALL_BUILD, return);
report_heading(forReplay, F(STR_Z_AUTO_ALIGN)); report_heading(forReplay, F(STR_Z_AUTO_ALIGN));
for (uint8_t i = 0; i < NUM_Z_STEPPERS; ++i) { for (uint8_t i = 0; i < NUM_Z_STEPPERS; ++i) {
report_echo_start(forReplay); report_echo_start(forReplay);

View file

@ -106,6 +106,8 @@ void GcodeSuite::M425() {
} }
void GcodeSuite::M425_report(const bool forReplay/*=true*/) { void GcodeSuite::M425_report(const bool forReplay/*=true*/) {
TERN_(MARLIN_SMALL_BUILD, return);
report_heading_etc(forReplay, F(STR_BACKLASH_COMPENSATION)); report_heading_etc(forReplay, F(STR_BACKLASH_COMPENSATION));
SERIAL_ECHOLNPGM_P( SERIAL_ECHOLNPGM_P(
PSTR(" M425 F"), backlash.get_correction() PSTR(" M425 F"), backlash.get_correction()

View file

@ -62,13 +62,13 @@ void GcodeSuite::M48() {
const int8_t verbose_level = parser.byteval('V', 1); const int8_t verbose_level = parser.byteval('V', 1);
if (!WITHIN(verbose_level, 0, 4)) { if (!WITHIN(verbose_level, 0, 4)) {
SERIAL_ECHOLNPGM("?(V)erbose level implausible (0-4)."); SERIAL_ECHOLNPGM(GCODE_ERR_MSG("(V)erbose level implausible (0-4)."));
return; return;
} }
const int8_t n_samples = parser.byteval('P', 10); const int8_t n_samples = parser.byteval('P', 10);
if (!WITHIN(n_samples, 4, 50)) { if (!WITHIN(n_samples, 4, 50)) {
SERIAL_ECHOLNPGM("?Sample size not plausible (4-50)."); SERIAL_ECHOLNPGM(GCODE_ERR_MSG("Sample size not plausible (4-50)."));
return; return;
} }
@ -82,7 +82,7 @@ void GcodeSuite::M48() {
if (!probe.can_reach(test_position)) { if (!probe.can_reach(test_position)) {
LCD_MESSAGE_MAX(MSG_M48_OUT_OF_BOUNDS); LCD_MESSAGE_MAX(MSG_M48_OUT_OF_BOUNDS);
SERIAL_ECHOLNPGM("? (X,Y) out of bounds."); SERIAL_ECHOLNPGM(GCODE_ERR_MSG(" (X,Y) out of bounds."));
return; return;
} }
@ -90,7 +90,7 @@ void GcodeSuite::M48() {
bool seen_L = parser.seen('L'); bool seen_L = parser.seen('L');
uint8_t n_legs = seen_L ? parser.value_byte() : 0; uint8_t n_legs = seen_L ? parser.value_byte() : 0;
if (n_legs > 15) { if (n_legs > 15) {
SERIAL_ECHOLNPGM("?Legs of movement implausible (0-15)."); SERIAL_ECHOLNPGM(GCODE_ERR_MSG("Legs of movement implausible (0-15)."));
return; return;
} }
if (n_legs == 1) n_legs = 2; if (n_legs == 1) n_legs = 2;

View file

@ -62,6 +62,8 @@
} }
void GcodeSuite::M665_report(const bool forReplay/*=true*/) { void GcodeSuite::M665_report(const bool forReplay/*=true*/) {
TERN_(MARLIN_SMALL_BUILD, return);
report_heading_etc(forReplay, F(STR_DELTA_SETTINGS)); report_heading_etc(forReplay, F(STR_DELTA_SETTINGS));
SERIAL_ECHOLNPGM_P( SERIAL_ECHOLNPGM_P(
PSTR(" M665 L"), LINEAR_UNIT(delta_diagonal_rod) PSTR(" M665 L"), LINEAR_UNIT(delta_diagonal_rod)
@ -132,6 +134,8 @@
} }
void GcodeSuite::M665_report(const bool forReplay/*=true*/) { void GcodeSuite::M665_report(const bool forReplay/*=true*/) {
TERN_(MARLIN_SMALL_BUILD, return);
report_heading_etc(forReplay, F(STR_SCARA_SETTINGS " (" STR_S_SEG_PER_SEC TERN_(HAS_SCARA_OFFSET, " " STR_SCARA_P_T_Z) ")")); report_heading_etc(forReplay, F(STR_SCARA_SETTINGS " (" STR_S_SEG_PER_SEC TERN_(HAS_SCARA_OFFSET, " " STR_SCARA_P_T_Z) ")"));
SERIAL_ECHOLNPGM_P( SERIAL_ECHOLNPGM_P(
PSTR(" M665 S"), segments_per_second PSTR(" M665 S"), segments_per_second
@ -170,6 +174,8 @@
} }
void GcodeSuite::M665_report(const bool forReplay/*=true*/) { void GcodeSuite::M665_report(const bool forReplay/*=true*/) {
TERN_(MARLIN_SMALL_BUILD, return);
report_heading_etc(forReplay, F(STR_POLARGRAPH_SETTINGS)); report_heading_etc(forReplay, F(STR_POLARGRAPH_SETTINGS));
SERIAL_ECHOLNPGM_P( SERIAL_ECHOLNPGM_P(
PSTR(" M665 S"), LINEAR_UNIT(segments_per_second), PSTR(" M665 S"), LINEAR_UNIT(segments_per_second),
@ -196,10 +202,11 @@
} }
void GcodeSuite::M665_report(const bool forReplay/*=true*/) { void GcodeSuite::M665_report(const bool forReplay/*=true*/) {
TERN_(MARLIN_SMALL_BUILD, return);
report_heading_etc(forReplay, F(STR_POLAR_SETTINGS)); report_heading_etc(forReplay, F(STR_POLAR_SETTINGS));
SERIAL_ECHOLNPGM_P(PSTR(" M665 S"), segments_per_second); SERIAL_ECHOLNPGM_P(PSTR(" M665 S"), segments_per_second);
} }
#endif #endif // POLAR
#endif // IS_KINEMATIC #endif // IS_KINEMATIC

View file

@ -56,11 +56,13 @@
} }
} }
} }
if (is_err) SERIAL_ECHOLNPGM("?M666 offsets must be <= 0"); if (is_err) SERIAL_ECHOLNPGM(GCODE_ERR_MSG("M666 offsets must be <= 0"));
if (!is_set) M666_report(); if (!is_set) M666_report();
} }
void GcodeSuite::M666_report(const bool forReplay/*=true*/) { void GcodeSuite::M666_report(const bool forReplay/*=true*/) {
TERN_(MARLIN_SMALL_BUILD, return);
report_heading_etc(forReplay, F(STR_ENDSTOP_ADJUSTMENT)); report_heading_etc(forReplay, F(STR_ENDSTOP_ADJUSTMENT));
SERIAL_ECHOLNPGM_P( SERIAL_ECHOLNPGM_P(
PSTR(" M666 X"), LINEAR_UNIT(delta_endstop_adj.a) PSTR(" M666 X"), LINEAR_UNIT(delta_endstop_adj.a)
@ -105,6 +107,8 @@
} }
void GcodeSuite::M666_report(const bool forReplay/*=true*/) { void GcodeSuite::M666_report(const bool forReplay/*=true*/) {
TERN_(MARLIN_SMALL_BUILD, return);
report_heading_etc(forReplay, F(STR_ENDSTOP_ADJUSTMENT)); report_heading_etc(forReplay, F(STR_ENDSTOP_ADJUSTMENT));
SERIAL_ECHOPGM(" M666"); SERIAL_ECHOPGM(" M666");
#if ENABLED(X_DUAL_ENDSTOPS) #if ENABLED(X_DUAL_ENDSTOPS)

View file

@ -92,6 +92,8 @@ void GcodeSuite::M852() {
} }
void GcodeSuite::M852_report(const bool forReplay/*=true*/) { void GcodeSuite::M852_report(const bool forReplay/*=true*/) {
TERN_(MARLIN_SMALL_BUILD, return);
report_heading_etc(forReplay, F(STR_SKEW_FACTOR)); report_heading_etc(forReplay, F(STR_SKEW_FACTOR));
SERIAL_ECHOPGM(" M852 I", p_float_t(planner.skew_factor.xy, 6)); SERIAL_ECHOPGM(" M852 I", p_float_t(planner.skew_factor.xy, 6));
#if ENABLED(SKEW_CORRECTION_FOR_Z) #if ENABLED(SKEW_CORRECTION_FOR_Z)

View file

@ -67,7 +67,7 @@
if (WITHIN(lval, 0, VOLUMETRIC_EXTRUDER_LIMIT_MAX)) if (WITHIN(lval, 0, VOLUMETRIC_EXTRUDER_LIMIT_MAX))
planner.set_volumetric_extruder_limit(target_extruder, lval); planner.set_volumetric_extruder_limit(target_extruder, lval);
else else
SERIAL_ECHOLNPGM("?L value out of range (0-" STRINGIFY(VOLUMETRIC_EXTRUDER_LIMIT_MAX) ")."); SERIAL_ECHOLNPGM(GCODE_ERR_MSG("L value out of range (0-" STRINGIFY(VOLUMETRIC_EXTRUDER_LIMIT_MAX) ")."));
} }
#endif #endif
@ -75,6 +75,8 @@
} }
void GcodeSuite::M200_report(const bool forReplay/*=true*/) { void GcodeSuite::M200_report(const bool forReplay/*=true*/) {
TERN_(MARLIN_SMALL_BUILD, return);
if (!forReplay) { if (!forReplay) {
report_heading(forReplay, F(STR_FILAMENT_SETTINGS), false); report_heading(forReplay, F(STR_FILAMENT_SETTINGS), false);
if (!parser.volumetric_enabled) SERIAL_ECHOPGM(" (Disabled):"); if (!parser.volumetric_enabled) SERIAL_ECHOPGM(" (Disabled):");
@ -142,6 +144,8 @@ void GcodeSuite::M201() {
} }
void GcodeSuite::M201_report(const bool forReplay/*=true*/) { void GcodeSuite::M201_report(const bool forReplay/*=true*/) {
TERN_(MARLIN_SMALL_BUILD, return);
report_heading_etc(forReplay, F(STR_MAX_ACCELERATION)); report_heading_etc(forReplay, F(STR_MAX_ACCELERATION));
#if NUM_AXES #if NUM_AXES
SERIAL_ECHOPGM_P( SERIAL_ECHOPGM_P(
@ -198,6 +202,8 @@ void GcodeSuite::M203() {
} }
void GcodeSuite::M203_report(const bool forReplay/*=true*/) { void GcodeSuite::M203_report(const bool forReplay/*=true*/) {
TERN_(MARLIN_SMALL_BUILD, return);
report_heading_etc(forReplay, F(STR_MAX_FEEDRATES)); report_heading_etc(forReplay, F(STR_MAX_FEEDRATES));
#if NUM_AXES #if NUM_AXES
SERIAL_ECHOPGM_P( SERIAL_ECHOPGM_P(
@ -255,6 +261,8 @@ void GcodeSuite::M204() {
} }
void GcodeSuite::M204_report(const bool forReplay/*=true*/) { void GcodeSuite::M204_report(const bool forReplay/*=true*/) {
TERN_(MARLIN_SMALL_BUILD, return);
report_heading_etc(forReplay, F(STR_ACCELERATION_P_R_T)); report_heading_etc(forReplay, F(STR_ACCELERATION_P_R_T));
SERIAL_ECHOLNPGM_P( SERIAL_ECHOLNPGM_P(
PSTR(" M204 P"), LINEAR_UNIT(planner.settings.acceleration) PSTR(" M204 P"), LINEAR_UNIT(planner.settings.acceleration)
@ -329,6 +337,8 @@ void GcodeSuite::M205() {
} }
void GcodeSuite::M205_report(const bool forReplay/*=true*/) { void GcodeSuite::M205_report(const bool forReplay/*=true*/) {
TERN_(MARLIN_SMALL_BUILD, return);
report_heading_etc(forReplay, F( report_heading_etc(forReplay, F(
"Advanced (" M205_MIN_SEG_TIME_STR "<min_segment_time_us> S<min_feedrate> T<min_travel_feedrate>" "Advanced (" M205_MIN_SEG_TIME_STR "<min_segment_time_us> S<min_feedrate> T<min_travel_feedrate>"
TERN_(HAS_JUNCTION_DEVIATION, " J<junc_dev>") TERN_(HAS_JUNCTION_DEVIATION, " J<junc_dev>")

View file

@ -164,6 +164,8 @@ void GcodeSuite::M217() {
} }
void GcodeSuite::M217_report(const bool forReplay/*=true*/) { void GcodeSuite::M217_report(const bool forReplay/*=true*/) {
TERN_(MARLIN_SMALL_BUILD, return);
report_heading_etc(forReplay, F(STR_TOOL_CHANGING)); report_heading_etc(forReplay, F(STR_TOOL_CHANGING));
SERIAL_ECHOPGM(" M217"); SERIAL_ECHOPGM(" M217");

View file

@ -63,6 +63,8 @@ void GcodeSuite::M218() {
} }
void GcodeSuite::M218_report(const bool forReplay/*=true*/) { void GcodeSuite::M218_report(const bool forReplay/*=true*/) {
TERN_(MARLIN_SMALL_BUILD, return);
report_heading_etc(forReplay, F(STR_HOTEND_OFFSETS)); report_heading_etc(forReplay, F(STR_HOTEND_OFFSETS));
for (uint8_t e = 1; e < HOTENDS; ++e) { for (uint8_t e = 1; e < HOTENDS; ++e) {
report_echo_start(forReplay); report_echo_start(forReplay);

View file

@ -55,6 +55,8 @@ void GcodeSuite::M281() {
} }
void GcodeSuite::M281_report(const bool forReplay/*=true*/) { void GcodeSuite::M281_report(const bool forReplay/*=true*/) {
TERN_(MARLIN_SMALL_BUILD, return);
report_heading_etc(forReplay, F(STR_SERVO_ANGLES)); report_heading_etc(forReplay, F(STR_SERVO_ANGLES));
for (uint8_t i = 0; i < NUM_SERVOS; ++i) { for (uint8_t i = 0; i < NUM_SERVOS; ++i) {
switch (i) { switch (i) {

View file

@ -78,6 +78,8 @@ void GcodeSuite::M301() {
} }
void GcodeSuite::M301_report(const bool forReplay/*=true*/ E_OPTARG(const int8_t eindex/*=-1*/)) { void GcodeSuite::M301_report(const bool forReplay/*=true*/ E_OPTARG(const int8_t eindex/*=-1*/)) {
TERN_(MARLIN_SMALL_BUILD, return);
report_heading(forReplay, F(STR_HOTEND_PID)); report_heading(forReplay, F(STR_HOTEND_PID));
IF_DISABLED(HAS_MULTI_EXTRUDER, constexpr int8_t eindex = -1); IF_DISABLED(HAS_MULTI_EXTRUDER, constexpr int8_t eindex = -1);
HOTEND_LOOP() { HOTEND_LOOP() {

View file

@ -42,6 +42,8 @@ void GcodeSuite::M304() {
} }
void GcodeSuite::M304_report(const bool forReplay/*=true*/) { void GcodeSuite::M304_report(const bool forReplay/*=true*/) {
TERN_(MARLIN_SMALL_BUILD, return);
report_heading_etc(forReplay, F(STR_BED_PID)); report_heading_etc(forReplay, F(STR_BED_PID));
SERIAL_ECHOLNPGM(" M304" SERIAL_ECHOLNPGM(" M304"
" P", thermalManager.temp_bed.pid.p() " P", thermalManager.temp_bed.pid.p()

View file

@ -42,6 +42,8 @@ void GcodeSuite::M309() {
} }
void GcodeSuite::M309_report(const bool forReplay/*=true*/) { void GcodeSuite::M309_report(const bool forReplay/*=true*/) {
TERN_(MARLIN_SMALL_BUILD, return);
report_heading_etc(forReplay, F(STR_CHAMBER_PID)); report_heading_etc(forReplay, F(STR_CHAMBER_PID));
SERIAL_ECHOLNPGM(" M309" SERIAL_ECHOLNPGM(" M309"
" P", thermalManager.temp_chamber.pid.p() " P", thermalManager.temp_chamber.pid.p()

View file

@ -96,6 +96,8 @@ void GcodeSuite::M92() {
} }
void GcodeSuite::M92_report(const bool forReplay/*=true*/, const int8_t e/*=-1*/) { void GcodeSuite::M92_report(const bool forReplay/*=true*/, const int8_t e/*=-1*/) {
TERN_(MARLIN_SMALL_BUILD, return);
report_heading_etc(forReplay, F(STR_STEPS_PER_UNIT)); report_heading_etc(forReplay, F(STR_STEPS_PER_UNIT));
#if NUM_AXES #if NUM_AXES
#define PRINT_EOL #define PRINT_EOL

View file

@ -40,6 +40,8 @@ void GcodeSuite::M211() {
} }
void GcodeSuite::M211_report(const bool forReplay/*=true*/) { void GcodeSuite::M211_report(const bool forReplay/*=true*/) {
TERN_(MARLIN_SMALL_BUILD, return);
report_heading_etc(forReplay, F(STR_SOFT_ENDSTOPS)); report_heading_etc(forReplay, F(STR_SOFT_ENDSTOPS));
SERIAL_ECHOPGM(" M211 S", AS_DIGIT(soft_endstop._enabled), " ; "); SERIAL_ECHOPGM(" M211 S", AS_DIGIT(soft_endstop._enabled), " ; ");
serialprintln_onoff(soft_endstop._enabled); serialprintln_onoff(soft_endstop._enabled);

View file

@ -79,7 +79,7 @@ void GcodeSuite::M42() {
#ifdef OUTPUT_OPEN_DRAIN #ifdef OUTPUT_OPEN_DRAIN
case 5: pinMode(pin, OUTPUT_OPEN_DRAIN); break; case 5: pinMode(pin, OUTPUT_OPEN_DRAIN); break;
#endif #endif
default: SERIAL_ECHOLNPGM("Invalid Pin Mode"); return; default: SERIAL_ECHOLNPGM(GCODE_ERR_MSG("Invalid Pin Mode")); return;
} }
} }
@ -94,7 +94,7 @@ void GcodeSuite::M42() {
#endif #endif
if (avoidWrite) { if (avoidWrite) {
SERIAL_ECHOLNPGM("?Cannot write to INPUT"); SERIAL_ECHOLNPGM(GCODE_ERR_MSG("Cannot write to INPUT"));
return; return;
} }

View file

@ -32,11 +32,16 @@ void GcodeSuite::M85() {
const millis_t ms = parser.value_millis_from_seconds(); const millis_t ms = parser.value_millis_from_seconds();
#if LASER_SAFETY_TIMEOUT_MS > 0 #if LASER_SAFETY_TIMEOUT_MS > 0
if (ms && ms <= LASER_SAFETY_TIMEOUT_MS) { if (ms && ms <= LASER_SAFETY_TIMEOUT_MS) {
SERIAL_ECHO_MSG("M85 timeout must be > ", MS_TO_SEC(LASER_SAFETY_TIMEOUT_MS + 999), " s for laser safety."); SERIAL_ECHO_MSG(GCODE_ERR_MSG("M85 timeout must be > ", MS_TO_SEC(LASER_SAFETY_TIMEOUT_MS + 999), " s for laser safety."));
return; return;
} }
#endif #endif
max_inactive_time = ms; max_inactive_time = ms;
} }
else {
#if DISABLED(MARLIN_SMALL_BUILD)
SERIAL_ECHOLNPGM("Inactivity timeout ", MS_TO_SEC(max_inactive_time), " s.");
#endif
}
} }

View file

@ -141,6 +141,8 @@ void GcodeSuite::M900() {
} }
void GcodeSuite::M900_report(const bool forReplay/*=true*/) { void GcodeSuite::M900_report(const bool forReplay/*=true*/) {
TERN_(MARLIN_SMALL_BUILD, return);
report_heading(forReplay, F(STR_LINEAR_ADVANCE)); report_heading(forReplay, F(STR_LINEAR_ADVANCE));
#if DISTINCT_E < 2 #if DISTINCT_E < 2
report_echo_start(forReplay); report_echo_start(forReplay);

View file

@ -67,6 +67,8 @@ void GcodeSuite::M710() {
} }
void GcodeSuite::M710_report(const bool forReplay/*=true*/) { void GcodeSuite::M710_report(const bool forReplay/*=true*/) {
TERN_(MARLIN_SMALL_BUILD, return);
report_heading_etc(forReplay, F(STR_CONTROLLER_FAN)); report_heading_etc(forReplay, F(STR_CONTROLLER_FAN));
SERIAL_ECHOLNPGM(" M710" SERIAL_ECHOLNPGM(" M710"
" S", int(controllerFan.settings.active_speed), " S", int(controllerFan.settings.active_speed),

View file

@ -126,6 +126,8 @@ void GcodeSuite::M907() {
#if HAS_MOTOR_CURRENT_SPI || HAS_MOTOR_CURRENT_PWM #if HAS_MOTOR_CURRENT_SPI || HAS_MOTOR_CURRENT_PWM
void GcodeSuite::M907_report(const bool forReplay/*=true*/) { void GcodeSuite::M907_report(const bool forReplay/*=true*/) {
TERN_(MARLIN_SMALL_BUILD, return);
report_heading_etc(forReplay, F(STR_STEPPER_MOTOR_CURRENTS)); report_heading_etc(forReplay, F(STR_STEPPER_MOTOR_CURRENTS));
#if HAS_MOTOR_CURRENT_PWM #if HAS_MOTOR_CURRENT_PWM
SERIAL_ECHOLNPGM_P( // PWM-based has 3 values: SERIAL_ECHOLNPGM_P( // PWM-based has 3 values:

View file

@ -104,6 +104,8 @@ void say_shaping() {
} }
void GcodeSuite::M493_report(const bool forReplay/*=true*/) { void GcodeSuite::M493_report(const bool forReplay/*=true*/) {
TERN_(MARLIN_SMALL_BUILD, return);
report_heading_etc(forReplay, F(STR_FT_MOTION)); report_heading_etc(forReplay, F(STR_FT_MOTION));
const ft_config_t &c = ftMotion.cfg; const ft_config_t &c = ftMotion.cfg;
SERIAL_ECHOPGM(" M493 S", c.mode); SERIAL_ECHOPGM(" M493 S", c.mode);

View file

@ -38,6 +38,8 @@
void GcodeSuite::M207() { fwretract.M207(); } void GcodeSuite::M207() { fwretract.M207(); }
void GcodeSuite::M207_report(const bool forReplay/*=true*/) { void GcodeSuite::M207_report(const bool forReplay/*=true*/) {
TERN_(MARLIN_SMALL_BUILD, return);
report_heading_etc(forReplay, F(STR_RETRACT_S_F_Z)); report_heading_etc(forReplay, F(STR_RETRACT_S_F_Z));
fwretract.M207_report(); fwretract.M207_report();
} }
@ -53,6 +55,8 @@ void GcodeSuite::M207_report(const bool forReplay/*=true*/) {
void GcodeSuite::M208() { fwretract.M208(); } void GcodeSuite::M208() { fwretract.M208(); }
void GcodeSuite::M208_report(const bool forReplay/*=true*/) { void GcodeSuite::M208_report(const bool forReplay/*=true*/) {
TERN_(MARLIN_SMALL_BUILD, return);
report_heading_etc(forReplay, F(STR_RECOVER_S_F)); report_heading_etc(forReplay, F(STR_RECOVER_S_F));
fwretract.M208_report(); fwretract.M208_report();
} }
@ -68,6 +72,8 @@ void GcodeSuite::M208_report(const bool forReplay/*=true*/) {
void GcodeSuite::M209() { fwretract.M209(); } void GcodeSuite::M209() { fwretract.M209(); }
void GcodeSuite::M209_report(const bool forReplay/*=true*/) { void GcodeSuite::M209_report(const bool forReplay/*=true*/) {
TERN_(MARLIN_SMALL_BUILD, return);
report_heading_etc(forReplay, F(STR_AUTO_RETRACT_S)); report_heading_etc(forReplay, F(STR_AUTO_RETRACT_S));
fwretract.M209_report(); fwretract.M209_report();
} }

View file

@ -28,6 +28,8 @@
#include "../../../module/stepper.h" #include "../../../module/stepper.h"
void GcodeSuite::M593_report(const bool forReplay/*=true*/) { void GcodeSuite::M593_report(const bool forReplay/*=true*/) {
TERN_(MARLIN_SMALL_BUILD, return);
report_heading_etc(forReplay, F("Input Shaping")); report_heading_etc(forReplay, F("Input Shaping"));
#if ENABLED(INPUT_SHAPING_X) #if ENABLED(INPUT_SHAPING_X)
SERIAL_ECHOLNPGM(" M593 X" SERIAL_ECHOLNPGM(" M593 X"
@ -78,7 +80,7 @@ void GcodeSuite::M593() {
if (for_Y) stepper.set_shaping_frequency(Y_AXIS, freq); if (for_Y) stepper.set_shaping_frequency(Y_AXIS, freq);
} }
else else
SERIAL_ECHOLNPGM("?Frequency (F) must be greater than ", min_freq, " or 0 to disable"); SERIAL_ECHOLNPGM(GCODE_ERR_MSG("Frequency (F) must be greater than ", min_freq, " or 0 to disable"));
} }
} }

View file

@ -97,6 +97,7 @@ void GcodeSuite::M552() {
} }
void GcodeSuite::M552_report() { void GcodeSuite::M552_report() {
TERN_(MARLIN_SMALL_BUILD, return);
ip_report(552, F("ip address"), Ethernet.linkStatus() == LinkON ? Ethernet.localIP() : ethernet.ip); ip_report(552, F("ip address"), Ethernet.linkStatus() == LinkON ? Ethernet.localIP() : ethernet.ip);
} }
@ -111,6 +112,7 @@ void GcodeSuite::M553() {
} }
void GcodeSuite::M553_report() { void GcodeSuite::M553_report() {
TERN_(MARLIN_SMALL_BUILD, return);
ip_report(553, F("subnet mask"), Ethernet.linkStatus() == LinkON ? Ethernet.subnetMask() : ethernet.subnet); ip_report(553, F("subnet mask"), Ethernet.linkStatus() == LinkON ? Ethernet.subnetMask() : ethernet.subnet);
} }
@ -125,6 +127,7 @@ void GcodeSuite::M554() {
} }
void GcodeSuite::M554_report() { void GcodeSuite::M554_report() {
TERN_(MARLIN_SMALL_BUILD, return);
ip_report(554, F("gateway"), Ethernet.linkStatus() == LinkON ? Ethernet.gatewayIP() : ethernet.gateway); ip_report(554, F("gateway"), Ethernet.linkStatus() == LinkON ? Ethernet.gatewayIP() : ethernet.gateway);
} }

View file

@ -28,6 +28,7 @@
#include "../../../module/stepper.h" #include "../../../module/stepper.h"
void GcodeSuite::M592_report(const bool forReplay/*=true*/) { void GcodeSuite::M592_report(const bool forReplay/*=true*/) {
TERN_(MARLIN_SMALL_BUILD, return);
report_heading(forReplay, F(STR_NONLINEAR_EXTRUSION)); report_heading(forReplay, F(STR_NONLINEAR_EXTRUSION));
SERIAL_ECHOLNPGM(" M592 A", stepper.ne.A, " B", stepper.ne.B, " C", stepper.ne.C); SERIAL_ECHOLNPGM(" M592 A", stepper.ne.A, " B", stepper.ne.B, " C", stepper.ne.C);
} }

View file

@ -61,6 +61,8 @@ void GcodeSuite::M603() {
} }
void GcodeSuite::M603_report(const bool forReplay/*=true*/) { void GcodeSuite::M603_report(const bool forReplay/*=true*/) {
TERN_(MARLIN_SMALL_BUILD, return);
report_heading(forReplay, F(STR_FILAMENT_LOAD_UNLOAD)); report_heading(forReplay, F(STR_FILAMENT_LOAD_UNLOAD));
#if EXTRUDERS == 1 #if EXTRUDERS == 1

View file

@ -64,6 +64,8 @@ void GcodeSuite::M413() {
} }
void GcodeSuite::M413_report(const bool forReplay/*=true*/) { void GcodeSuite::M413_report(const bool forReplay/*=true*/) {
TERN_(MARLIN_SMALL_BUILD, return);
report_heading_etc(forReplay, F(STR_POWER_LOSS_RECOVERY)); report_heading_etc(forReplay, F(STR_POWER_LOSS_RECOVERY));
SERIAL_ECHOPGM(" M413 S", AS_DIGIT(recovery.enabled) SERIAL_ECHOPGM(" M413 S", AS_DIGIT(recovery.enabled)
#if HAS_PLR_BED_THRESHOLD #if HAS_PLR_BED_THRESHOLD

View file

@ -67,6 +67,8 @@ void GcodeSuite::M412() {
} }
void GcodeSuite::M412_report(const bool forReplay/*=true*/) { void GcodeSuite::M412_report(const bool forReplay/*=true*/) {
TERN_(MARLIN_SMALL_BUILD, return);
report_heading_etc(forReplay, F(STR_FILAMENT_RUNOUT_SENSOR)); report_heading_etc(forReplay, F(STR_FILAMENT_RUNOUT_SENSOR));
SERIAL_ECHOPGM( SERIAL_ECHOPGM(
" M412 S", runout.enabled " M412 S", runout.enabled

View file

@ -155,6 +155,8 @@ void GcodeSuite::M569() {
} }
void GcodeSuite::M569_report(const bool forReplay/*=true*/) { void GcodeSuite::M569_report(const bool forReplay/*=true*/) {
TERN_(MARLIN_SMALL_BUILD, return);
report_heading(forReplay, F(STR_DRIVER_STEPPING_MODE)); report_heading(forReplay, F(STR_DRIVER_STEPPING_MODE));
auto say_M569 = [](const bool forReplay, FSTR_P const etc=nullptr, const bool eol=false) { auto say_M569 = [](const bool forReplay, FSTR_P const etc=nullptr, const bool eol=false) {

View file

@ -231,6 +231,8 @@ void GcodeSuite::M906() {
} }
void GcodeSuite::M906_report(const bool forReplay/*=true*/) { void GcodeSuite::M906_report(const bool forReplay/*=true*/) {
TERN_(MARLIN_SMALL_BUILD, return);
report_heading(forReplay, F(STR_STEPPER_DRIVER_CURRENT)); report_heading(forReplay, F(STR_STEPPER_DRIVER_CURRENT));
auto say_M906 = [](const bool forReplay) { auto say_M906 = [](const bool forReplay) {

View file

@ -378,6 +378,8 @@
} }
void GcodeSuite::M913_report(const bool forReplay/*=true*/) { void GcodeSuite::M913_report(const bool forReplay/*=true*/) {
TERN_(MARLIN_SMALL_BUILD, return);
report_heading(forReplay, F(STR_HYBRID_THRESHOLD)); report_heading(forReplay, F(STR_HYBRID_THRESHOLD));
auto say_M913 = [](const bool forReplay) { auto say_M913 = [](const bool forReplay) {
@ -565,6 +567,8 @@
} }
void GcodeSuite::M914_report(const bool forReplay/*=true*/) { void GcodeSuite::M914_report(const bool forReplay/*=true*/) {
TERN_(MARLIN_SMALL_BUILD, return);
report_heading(forReplay, F(STR_STALLGUARD_THRESHOLD)); report_heading(forReplay, F(STR_STALLGUARD_THRESHOLD));
auto say_M914 = [](const bool forReplay) { auto say_M914 = [](const bool forReplay) {

View file

@ -64,7 +64,7 @@ void GcodeSuite::M919() {
if (WITHIN(toff, 1, 15)) if (WITHIN(toff, 1, 15))
DEBUG_ECHOLNPGM(".toff: ", toff); DEBUG_ECHOLNPGM(".toff: ", toff);
else { else {
SERIAL_ECHOLNPGM("?O out of range (1..15)"); SERIAL_ECHOLNPGM(GCODE_ERR_MSG("O out of range (1..15)"));
err = true; err = true;
} }
} }
@ -74,7 +74,7 @@ void GcodeSuite::M919() {
if (WITHIN(hend, -3, 12)) if (WITHIN(hend, -3, 12))
DEBUG_ECHOLNPGM(".hend: ", hend); DEBUG_ECHOLNPGM(".hend: ", hend);
else { else {
SERIAL_ECHOLNPGM("?P out of range (-3..12)"); SERIAL_ECHOLNPGM(GCODE_ERR_MSG("P out of range (-3..12)"));
err = true; err = true;
} }
} }
@ -84,7 +84,7 @@ void GcodeSuite::M919() {
if (WITHIN(hstrt, 1, 8)) if (WITHIN(hstrt, 1, 8))
DEBUG_ECHOLNPGM(".hstrt: ", hstrt); DEBUG_ECHOLNPGM(".hstrt: ", hstrt);
else { else {
SERIAL_ECHOLNPGM("?S out of range (1..8)"); SERIAL_ECHOLNPGM(GCODE_ERR_MSG("S out of range (1..8)"));
err = true; err = true;
} }
} }
@ -118,7 +118,7 @@ void GcodeSuite::M919() {
// Get the chopper timing for the specified axis and index // Get the chopper timing for the specified axis and index
switch (i) { switch (i) {
default: // A specified axis isn't Trinamic default: // A specified axis isn't Trinamic
SERIAL_ECHOLNPGM("?Axis ", C(AXIS_CHAR(i)), " has no TMC drivers."); SERIAL_ECHOLNPGM(GCODE_ERR_MSG("Axis ", C(AXIS_CHAR(i)), " has no TMC drivers."));
break; break;
#if AXIS_IS_TMC(X) || AXIS_IS_TMC(X2) #if AXIS_IS_TMC(X) || AXIS_IS_TMC(X2)

View file

@ -341,6 +341,12 @@
#define HAS_FAST_MOVES 1 #define HAS_FAST_MOVES 1
#endif #endif
#if ENABLED(MARLIN_SMALL_BUILD)
#define GCODE_ERR_MSG(V...) "?"
#else
#define GCODE_ERR_MSG(V...) "?" V
#endif
enum AxisRelative : uint8_t { enum AxisRelative : uint8_t {
LOGICAL_AXIS_LIST(REL_E, REL_X, REL_Y, REL_Z, REL_I, REL_J, REL_K, REL_U, REL_V, REL_W) LOGICAL_AXIS_LIST(REL_E, REL_X, REL_Y, REL_Z, REL_I, REL_J, REL_K, REL_U, REL_V, REL_W)
#if HAS_EXTRUDERS #if HAS_EXTRUDERS

View file

@ -48,6 +48,8 @@ void GcodeSuite::M206() {
} }
void GcodeSuite::M206_report(const bool forReplay/*=true*/) { void GcodeSuite::M206_report(const bool forReplay/*=true*/) {
TERN_(MARLIN_SMALL_BUILD, return);
report_heading_etc(forReplay, F(STR_HOME_OFFSET)); report_heading_etc(forReplay, F(STR_HOME_OFFSET));
SERIAL_ECHOLNPGM_P( SERIAL_ECHOLNPGM_P(
#if IS_CARTESIAN #if IS_CARTESIAN

View file

@ -61,6 +61,8 @@ void GcodeSuite::M145() {
} }
void GcodeSuite::M145_report(const bool forReplay/*=true*/) { void GcodeSuite::M145_report(const bool forReplay/*=true*/) {
TERN_(MARLIN_SMALL_BUILD, return);
report_heading(forReplay, F(STR_MATERIAL_HEATUP)); report_heading(forReplay, F(STR_MATERIAL_HEATUP));
for (uint8_t i = 0; i < PREHEAT_COUNT; ++i) { for (uint8_t i = 0; i < PREHEAT_COUNT; ++i) {
report_echo_start(forReplay); report_echo_start(forReplay);

View file

@ -38,6 +38,7 @@ void GcodeSuite::M250() {
} }
void GcodeSuite::M250_report(const bool forReplay/*=true*/) { void GcodeSuite::M250_report(const bool forReplay/*=true*/) {
TERN_(MARLIN_SMALL_BUILD, return);
report_heading_etc(forReplay, F(STR_LCD_CONTRAST)); report_heading_etc(forReplay, F(STR_LCD_CONTRAST));
SERIAL_ECHOLNPGM(" M250 C", ui.contrast); SERIAL_ECHOLNPGM(" M250 C", ui.contrast);
} }

View file

@ -44,6 +44,7 @@ void GcodeSuite::M255() {
} }
void GcodeSuite::M255_report(const bool forReplay/*=true*/) { void GcodeSuite::M255_report(const bool forReplay/*=true*/) {
TERN_(MARLIN_SMALL_BUILD, return);
report_heading_etc(forReplay, F(STR_DISPLAY_SLEEP)); report_heading_etc(forReplay, F(STR_DISPLAY_SLEEP));
SERIAL_ECHOLNPGM(" M255 S", SERIAL_ECHOLNPGM(" M255 S",
TERN(HAS_DISPLAY_SLEEP, ui.sleep_timeout_minutes, ui.backlight_timeout_minutes), TERN(HAS_DISPLAY_SLEEP, ui.sleep_timeout_minutes, ui.backlight_timeout_minutes),

View file

@ -37,6 +37,7 @@ void GcodeSuite::M256() {
} }
void GcodeSuite::M256_report(const bool forReplay/*=true*/) { void GcodeSuite::M256_report(const bool forReplay/*=true*/) {
TERN_(MARLIN_SMALL_BUILD, return);
report_heading_etc(forReplay, F(STR_LCD_BRIGHTNESS)); report_heading_etc(forReplay, F(STR_LCD_BRIGHTNESS));
SERIAL_ECHOLNPGM(" M256 B", ui.brightness); SERIAL_ECHOLNPGM(" M256 B", ui.brightness);
} }

View file

@ -44,6 +44,7 @@ void GcodeSuite::M414() {
} }
void GcodeSuite::M414_report(const bool forReplay/*=true*/) { void GcodeSuite::M414_report(const bool forReplay/*=true*/) {
TERN_(MARLIN_SMALL_BUILD, return);
report_heading_etc(forReplay, F(STR_UI_LANGUAGE)); report_heading_etc(forReplay, F(STR_UI_LANGUAGE));
SERIAL_ECHOLNPGM(" M414 S", ui.language); SERIAL_ECHOLNPGM(" M414 S", ui.language);
} }

View file

@ -72,12 +72,12 @@ void GcodeSuite::M423() {
do_report = false; do_report = false;
const int8_t x = parser.value_int(); const int8_t x = parser.value_int();
if (!WITHIN(x, 0, XATC_MAX_POINTS - 1)) if (!WITHIN(x, 0, XATC_MAX_POINTS - 1))
SERIAL_ECHOLNPGM("?(X) out of range (0..", XATC_MAX_POINTS - 1, ")."); SERIAL_ECHOLNPGM(GCODE_ERR_MSG("(X) out of range (0..", XATC_MAX_POINTS - 1, ")."));
else { else {
if (parser.seenval('Z')) if (parser.seenval('Z'))
xatc.z_offset[x] = parser.value_linear_units(); xatc.z_offset[x] = parser.value_linear_units();
else else
SERIAL_ECHOLNPGM("?(Z) required."); SERIAL_ECHOLNPGM(GCODE_ERR_MSG("(Z) required."));
} }
} }
@ -86,6 +86,8 @@ void GcodeSuite::M423() {
} }
void GcodeSuite::M423_report(const bool forReplay/*=true*/) { void GcodeSuite::M423_report(const bool forReplay/*=true*/) {
TERN_(MARLIN_SMALL_BUILD, return);
report_heading(forReplay, F("X-Twist Correction")); report_heading(forReplay, F("X-Twist Correction"));
SERIAL_ECHOLNPGM(" M423 A", xatc.start, " I", xatc.spacing); SERIAL_ECHOLNPGM(" M423 A", xatc.start, " I", xatc.spacing);
for (uint8_t x = 0; x < XATC_MAX_POINTS; ++x) { for (uint8_t x = 0; x < XATC_MAX_POINTS; ++x) {

View file

@ -47,11 +47,11 @@ void GcodeSuite::M851() {
if (WITHIN(x, PROBE_OFFSET_XMIN, PROBE_OFFSET_XMAX)) if (WITHIN(x, PROBE_OFFSET_XMIN, PROBE_OFFSET_XMAX))
offs.x = x; offs.x = x;
else { else {
SERIAL_ECHOLNPGM("?X out of range (", PROBE_OFFSET_XMIN, " to ", PROBE_OFFSET_XMAX, ")"); SERIAL_ECHOLNPGM(GCODE_ERR_MSG("X out of range (", PROBE_OFFSET_XMIN, " to ", PROBE_OFFSET_XMAX, ")"));
ok = false; ok = false;
} }
#else #else
if (x) SERIAL_ECHOLNPGM("?X must be 0 (NOZZLE_AS_PROBE)."); // ...but let 'ok' stay true if (x) SERIAL_ECHOLNPGM(GCODE_ERR_MSG("X must be 0 (NOZZLE_AS_PROBE).")); // ...but let 'ok' stay true
#endif #endif
} }
@ -61,11 +61,11 @@ void GcodeSuite::M851() {
if (WITHIN(y, PROBE_OFFSET_YMIN, PROBE_OFFSET_YMAX)) if (WITHIN(y, PROBE_OFFSET_YMIN, PROBE_OFFSET_YMAX))
offs.y = y; offs.y = y;
else { else {
SERIAL_ECHOLNPGM("?Y out of range (", PROBE_OFFSET_YMIN, " to ", PROBE_OFFSET_YMAX, ")"); SERIAL_ECHOLNPGM(GCODE_ERR_MSG("Y out of range (", PROBE_OFFSET_YMIN, " to ", PROBE_OFFSET_YMAX, ")"));
ok = false; ok = false;
} }
#else #else
if (y) SERIAL_ECHOLNPGM("?Y must be 0 (NOZZLE_AS_PROBE)."); // ...but let 'ok' stay true if (y) SERIAL_ECHOLNPGM(GCODE_ERR_MSG("Y must be 0 (NOZZLE_AS_PROBE).")); // ...but let 'ok' stay true
#endif #endif
} }
@ -74,7 +74,7 @@ void GcodeSuite::M851() {
if (WITHIN(z, PROBE_OFFSET_ZMIN, PROBE_OFFSET_ZMAX)) if (WITHIN(z, PROBE_OFFSET_ZMIN, PROBE_OFFSET_ZMAX))
offs.z = z; offs.z = z;
else { else {
SERIAL_ECHOLNPGM("?Z out of range (", PROBE_OFFSET_ZMIN, " to ", PROBE_OFFSET_ZMAX, ")"); SERIAL_ECHOLNPGM(GCODE_ERR_MSG("Z out of range (", PROBE_OFFSET_ZMIN, " to ", PROBE_OFFSET_ZMAX, ")"));
ok = false; ok = false;
} }
} }
@ -84,6 +84,8 @@ void GcodeSuite::M851() {
} }
void GcodeSuite::M851_report(const bool forReplay/*=true*/) { void GcodeSuite::M851_report(const bool forReplay/*=true*/) {
TERN_(MARLIN_SMALL_BUILD, return);
report_heading_etc(forReplay, F(STR_Z_PROBE_OFFSET)); report_heading_etc(forReplay, F(STR_Z_PROBE_OFFSET));
SERIAL_ECHOPGM_P( SERIAL_ECHOPGM_P(
#if HAS_PROBE_XY_OFFSET #if HAS_PROBE_XY_OFFSET

View file

@ -88,6 +88,8 @@ void GcodeSuite::M306() {
} }
void GcodeSuite::M306_report(const bool forReplay/*=true*/) { void GcodeSuite::M306_report(const bool forReplay/*=true*/) {
TERN_(MARLIN_SMALL_BUILD, return);
report_heading(forReplay, F("Model predictive control")); report_heading(forReplay, F("Model predictive control"));
HOTEND_LOOP() { HOTEND_LOOP() {
report_echo_start(forReplay); report_echo_start(forReplay);

View file

@ -34,6 +34,8 @@
#include "../../feature/hotend_idle.h" #include "../../feature/hotend_idle.h"
void GcodeSuite::M86_report(const bool forReplay/*=true*/) { void GcodeSuite::M86_report(const bool forReplay/*=true*/) {
TERN_(MARLIN_SMALL_BUILD, return);
hotend_idle_settings_t &c = hotend_idle.cfg; hotend_idle_settings_t &c = hotend_idle.cfg;
report_heading(forReplay, F("Hotend Idle Timeout")); report_heading(forReplay, F("Hotend Idle Timeout"));
SERIAL_ECHOLNPGM(" M86" SERIAL_ECHOLNPGM(" M86"

View file

@ -37,6 +37,8 @@ void GcodeSuite::M149() {
} }
void GcodeSuite::M149_report(const bool forReplay/*=true*/) { void GcodeSuite::M149_report(const bool forReplay/*=true*/) {
TERN_(MARLIN_SMALL_BUILD, return);
report_heading_etc(forReplay, F(STR_TEMPERATURE_UNITS)); report_heading_etc(forReplay, F(STR_TEMPERATURE_UNITS));
SERIAL_ECHOLN(F(" M149 "), C(parser.temp_units_code()), F(" ; Units in "), parser.temp_units_name()); SERIAL_ECHOLN(F(" M149 "), C(parser.temp_units_code()), F(" ; Units in "), parser.temp_units_name());
} }

View file

@ -26,6 +26,12 @@
* Conditionals set before pins.h and which depend on Configuration_adv.h. * Conditionals set before pins.h and which depend on Configuration_adv.h.
*/ */
#if ENABLED(MARLIN_SMALL_BUILD)
#undef EEPROM_CHITCHAT
#undef CAPABILITIES_REPORT
#define DISABLE_M503
#endif
#ifndef AXIS_RELATIVE_MODES #ifndef AXIS_RELATIVE_MODES
#define AXIS_RELATIVE_MODES {} #define AXIS_RELATIVE_MODES {}
#endif #endif

View file

@ -3957,7 +3957,7 @@ static_assert(_PLUS_TEST(3), "DEFAULT_MAX_ACCELERATION values must be positive."
* Sanity Check for Slim LCD Menus and Probe Offset Wizard * Sanity Check for Slim LCD Menus and Probe Offset Wizard
*/ */
#if ALL(SLIM_LCD_MENUS, PROBE_OFFSET_WIZARD) #if ALL(SLIM_LCD_MENUS, PROBE_OFFSET_WIZARD)
#error "SLIM_LCD_MENUS disables \"Advanced Settings > Probe Offsets > PROBE_OFFSET_WIZARD.\"" #error "SLIM_LCD_MENUS disables 'Advanced Settings > Probe Offsets > PROBE_OFFSET_WIZARD.'"
#endif #endif
/** /**

View file

@ -2271,6 +2271,8 @@ void Temperature::task() {
} }
void Temperature::M305_report(const uint8_t t_index, const bool forReplay/*=true*/) { void Temperature::M305_report(const uint8_t t_index, const bool forReplay/*=true*/) {
TERN_(MARLIN_SMALL_BUILD, return);
gcode.report_heading_etc(forReplay, F(STR_USER_THERMISTORS)); gcode.report_heading_etc(forReplay, F(STR_USER_THERMISTORS));
SERIAL_ECHOPGM(" M305 P", AS_DIGIT(t_index)); SERIAL_ECHOPGM(" M305 P", AS_DIGIT(t_index));