Extend SERIAL_CHAR to take multiple arguments
This commit is contained in:
@ -238,12 +238,12 @@ inline int check_for_free_memory_corruption(PGM_P const title) {
|
||||
SERIAL_ECHOLNPGM("\nMemory Corruption detected in free memory area.");
|
||||
|
||||
if (block_cnt == 0) // Make sure the special case of no free blocks shows up as an
|
||||
block_cnt = -1; // error to the calling code!
|
||||
block_cnt = -1; // error to the calling code!
|
||||
|
||||
SERIAL_ECHOPGM(" return=");
|
||||
if (block_cnt == 1) {
|
||||
SERIAL_CHAR('0'); // if the block_cnt is 1, nothing has broken up the free memory
|
||||
SERIAL_EOL(); // area and it is appropriate to say 'no corruption'.
|
||||
SERIAL_CHAR('0'); // If the block_cnt is 1, nothing has broken up the free memory
|
||||
SERIAL_EOL(); // area and it is appropriate to say 'no corruption'.
|
||||
return 0;
|
||||
}
|
||||
SERIAL_ECHOLNPGM("true");
|
||||
|
@ -75,8 +75,7 @@ void GcodeSuite::M425() {
|
||||
SERIAL_ECHOLNPAIR(" Correction Amount/Fade-out: F", backlash.get_correction(), " (F1.0 = full, F0.0 = none)");
|
||||
SERIAL_ECHOPGM(" Backlash Distance (mm): ");
|
||||
LOOP_XYZ(a) {
|
||||
SERIAL_CHAR(' ');
|
||||
SERIAL_CHAR(axis_codes[a]);
|
||||
SERIAL_CHAR(' ', axis_codes[a]);
|
||||
SERIAL_ECHO(backlash.distance_mm[a]);
|
||||
SERIAL_EOL();
|
||||
}
|
||||
@ -89,8 +88,7 @@ void GcodeSuite::M425() {
|
||||
SERIAL_ECHOPGM(" Average measured backlash (mm):");
|
||||
if (backlash.has_any_measurement()) {
|
||||
LOOP_XYZ(a) if (backlash.has_measurement(AxisEnum(a))) {
|
||||
SERIAL_CHAR(' ');
|
||||
SERIAL_CHAR(axis_codes[a]);
|
||||
SERIAL_CHAR(' ', axis_codes[a]);
|
||||
SERIAL_ECHO(backlash.get_measurement(AxisEnum(a)));
|
||||
}
|
||||
}
|
||||
|
@ -39,8 +39,7 @@ void GcodeSuite::M221() {
|
||||
}
|
||||
else {
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_CHAR('E');
|
||||
SERIAL_CHAR('0' + target_extruder);
|
||||
SERIAL_CHAR('E', '0' + target_extruder);
|
||||
SERIAL_ECHOPAIR(" Flow: ", planner.flow_percentage[target_extruder]);
|
||||
SERIAL_CHAR('%');
|
||||
SERIAL_EOL();
|
||||
|
@ -39,9 +39,7 @@
|
||||
void report_xyze(const xyze_pos_t &pos, const uint8_t n=4, const uint8_t precision=3) {
|
||||
char str[12];
|
||||
for (uint8_t a = 0; a < n; a++) {
|
||||
SERIAL_CHAR(' ');
|
||||
SERIAL_CHAR(axis_codes[a]);
|
||||
SERIAL_CHAR(':');
|
||||
SERIAL_CHAR(' ', axis_codes[a], ':');
|
||||
SERIAL_ECHO(dtostrf(pos[a], 1, precision, str));
|
||||
}
|
||||
SERIAL_EOL();
|
||||
@ -50,9 +48,7 @@
|
||||
void report_xyz(const xyz_pos_t &pos, const uint8_t precision=3) {
|
||||
char str[12];
|
||||
for (uint8_t a = X_AXIS; a <= Z_AXIS; a++) {
|
||||
SERIAL_CHAR(' ');
|
||||
SERIAL_CHAR(axis_codes[a]);
|
||||
SERIAL_CHAR(':');
|
||||
SERIAL_CHAR(' ', axis_codes[a], ':');
|
||||
SERIAL_ECHO(dtostrf(pos[a], 1, precision, str));
|
||||
}
|
||||
SERIAL_EOL();
|
||||
@ -150,9 +146,7 @@
|
||||
|
||||
SERIAL_ECHOPGM("Stepper:");
|
||||
LOOP_XYZE(i) {
|
||||
SERIAL_CHAR(' ');
|
||||
SERIAL_CHAR(axis_codes[i]);
|
||||
SERIAL_CHAR(':');
|
||||
SERIAL_CHAR(' ', axis_codes[i], ':');
|
||||
SERIAL_ECHO(stepper.position((AxisEnum)i));
|
||||
}
|
||||
SERIAL_EOL();
|
||||
|
@ -346,7 +346,7 @@ void GCodeParser::unknown_command_error() {
|
||||
SERIAL_ECHOLNPGM(")");
|
||||
#if ENABLED(FASTER_GCODE_PARSER)
|
||||
SERIAL_ECHOPGM(" args: { ");
|
||||
for (char c = 'A'; c <= 'Z'; ++c) if (seen(c)) { SERIAL_CHAR(c); SERIAL_CHAR(' '); }
|
||||
for (char c = 'A'; c <= 'Z'; ++c) if (seen(c)) SERIAL_CHAR(c, ' ');
|
||||
SERIAL_CHAR('}');
|
||||
#else
|
||||
SERIAL_ECHOPAIR(" args: { ", command_args, " }");
|
||||
|
Reference in New Issue
Block a user