A single SERIAL_ECHO macro type (#12557)
This commit is contained in:
@ -40,7 +40,7 @@ void GcodeSuite::M900() {
|
||||
#else
|
||||
const uint8_t tmp_extruder = parser.seenval('T') ? parser.value_int() : active_extruder;
|
||||
if (tmp_extruder >= EXTRUDERS) {
|
||||
SERIAL_PROTOCOLLNPGM("?T value out of range.");
|
||||
SERIAL_ECHOLNPGM("?T value out of range.");
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
@ -52,7 +52,7 @@ void GcodeSuite::M900() {
|
||||
planner.extruder_advance_K[tmp_extruder] = newK;
|
||||
}
|
||||
else
|
||||
SERIAL_PROTOCOLLNPGM("?K value out of range (0-10).");
|
||||
SERIAL_ECHOLNPGM("?K value out of range (0-10).");
|
||||
}
|
||||
else {
|
||||
SERIAL_ECHO_START();
|
||||
|
@ -63,7 +63,6 @@ void GcodeSuite::M355() {
|
||||
else SERIAL_ECHOLNPAIR("Case light: ", case_light_brightness);
|
||||
}
|
||||
#else
|
||||
SERIAL_ERROR_START();
|
||||
SERIAL_ERRORLNPGM(MSG_ERR_M355_NONE);
|
||||
SERIAL_ERROR_MSG(MSG_ERR_M355_NONE);
|
||||
#endif
|
||||
}
|
||||
|
@ -38,10 +38,8 @@ void GcodeSuite::M404() {
|
||||
filament_width_nominal = parser.value_linear_units();
|
||||
planner.volumetric_area_nominal = CIRCLE_AREA(filament_width_nominal * 0.5);
|
||||
}
|
||||
else {
|
||||
SERIAL_PROTOCOLPGM("Filament dia (nominal mm):");
|
||||
SERIAL_PROTOCOLLN(filament_width_nominal);
|
||||
}
|
||||
else
|
||||
SERIAL_ECHOLNPAIR("Filament dia (nominal mm):", filament_width_nominal);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -79,8 +77,7 @@ void GcodeSuite::M406() {
|
||||
* M407: Get measured filament diameter on serial output
|
||||
*/
|
||||
void GcodeSuite::M407() {
|
||||
SERIAL_PROTOCOLPGM("Filament dia (measured mm):");
|
||||
SERIAL_PROTOCOLLN(filament_width_meas);
|
||||
SERIAL_ECHOLNPAIR("Filament dia (measured mm):", filament_width_meas);
|
||||
}
|
||||
|
||||
#endif // FILAMENT_WIDTH_SENSOR
|
||||
|
@ -68,13 +68,10 @@ void GcodeSuite::M261() {
|
||||
|
||||
uint8_t bytes = parser.byteval('B', 1);
|
||||
|
||||
if (i2c.addr && bytes && bytes <= TWIBUS_BUFFER_SIZE) {
|
||||
if (i2c.addr && bytes && bytes <= TWIBUS_BUFFER_SIZE)
|
||||
i2c.relay(bytes);
|
||||
}
|
||||
else {
|
||||
SERIAL_ERROR_START();
|
||||
SERIAL_ERRORLNPGM("Bad i2c request");
|
||||
}
|
||||
else
|
||||
SERIAL_ERROR_MSG("Bad i2c request");
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -45,10 +45,8 @@ void GcodeSuite::M810_819() {
|
||||
|
||||
if (len) {
|
||||
// Set a macro
|
||||
if (len > GCODE_MACROS_SLOT_SIZE) {
|
||||
SERIAL_ERROR_START();
|
||||
SERIAL_ERRORLNPGM("Macro too long.");
|
||||
}
|
||||
if (len > GCODE_MACROS_SLOT_SIZE)
|
||||
SERIAL_ERROR_MSG("Macro too long.");
|
||||
else {
|
||||
char c, *s = parser.string_arg, *d = gcode_macros[index];
|
||||
do {
|
||||
|
Reference in New Issue
Block a user