From 4fa1c52688917b139f1a2a68dd9028a592d4567a Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 2 Feb 2019 23:32:48 -0600 Subject: [PATCH] Tweak serial output code --- Marlin/src/HAL/HAL_STM32F7/TMC2660.cpp | 2 +- Marlin/src/feature/bedlevel/ubl/ubl.cpp | 2 +- Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp | 2 +- Marlin/src/feature/mixing.cpp | 2 +- Marlin/src/feature/pause.cpp | 4 ++-- Marlin/src/gcode/control/M605.cpp | 4 ++-- Marlin/src/gcode/parser.cpp | 4 ++-- Marlin/src/gcode/queue.cpp | 2 +- Marlin/src/module/configuration_store.cpp | 4 ++-- Marlin/src/module/endstops.cpp | 2 +- 10 files changed, 14 insertions(+), 14 deletions(-) diff --git a/Marlin/src/HAL/HAL_STM32F7/TMC2660.cpp b/Marlin/src/HAL/HAL_STM32F7/TMC2660.cpp index e4fa63c8a..ed768b019 100644 --- a/Marlin/src/HAL/HAL_STM32F7/TMC2660.cpp +++ b/Marlin/src/HAL/HAL_STM32F7/TMC2660.cpp @@ -176,7 +176,7 @@ TMC26XStepper::TMC26XStepper(const int16_t in_steps, int16_t cs_pin, int16_t dir void TMC26XStepper::start() { #ifdef TMC_DEBUG1 - SERIAL_ECHOPGM("\n TMC26X stepper library \n"); + SERIAL_ECHOLNPGM("\n TMC26X stepper library"); SERIAL_ECHOPAIR("\n CS pin: ", cs_pin); SERIAL_ECHOPAIR("\n DIR pin: ", dir_pin); SERIAL_ECHOPAIR("\n STEP pin: ", step_pin); diff --git a/Marlin/src/feature/bedlevel/ubl/ubl.cpp b/Marlin/src/feature/bedlevel/ubl/ubl.cpp index e2e281aa5..6a9933fd4 100644 --- a/Marlin/src/feature/bedlevel/ubl/ubl.cpp +++ b/Marlin/src/feature/bedlevel/ubl/ubl.cpp @@ -203,7 +203,7 @@ SERIAL_ECHOPGM("\nBed Topography Report"); if (human) { - SERIAL_ECHOPGM(":\n\n"); + SERIAL_ECHOLNPGM(":\n"); serial_echo_xy(4, MESH_MIN_X, MESH_MAX_Y); serial_echo_xy(twixt, MESH_MAX_X, MESH_MAX_Y); SERIAL_EOL(); diff --git a/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp b/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp index 57f21124b..b0e0adc73 100644 --- a/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp +++ b/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp @@ -1407,7 +1407,7 @@ #endif if (abort_flag) { - SERIAL_ECHOPGM("?Error probing point. Aborting operation.\n"); + SERIAL_ECHOLNPGM("?Error probing point. Aborting operation."); return; } } diff --git a/Marlin/src/feature/mixing.cpp b/Marlin/src/feature/mixing.cpp index 795252ebb..d32d5ca99 100644 --- a/Marlin/src/feature/mixing.cpp +++ b/Marlin/src/feature/mixing.cpp @@ -62,7 +62,7 @@ void Mixer::normalize(const uint8_t tool_index) { SERIAL_ECHO_F(collector[i] / csum, 3); SERIAL_CHAR(' '); } - SERIAL_ECHOPGM("]\n"); + SERIAL_ECHOLNPGM("]"); #endif // Scale all values so their maximum is COLOR_A_MASK diff --git a/Marlin/src/feature/pause.cpp b/Marlin/src/feature/pause.cpp index 867e3b52a..788daeac0 100644 --- a/Marlin/src/feature/pause.cpp +++ b/Marlin/src/feature/pause.cpp @@ -517,11 +517,11 @@ void wait_for_confirmation(const bool is_reload/*=false*/, const int8_t max_beep */ void resume_print(const float &slow_load_length/*=0*/, const float &fast_load_length/*=0*/, const float &purge_length/*=ADVANCED_PAUSE_PURGE_LENGTH*/, const int8_t max_beep_count/*=0*/ DXC_ARGS) { /* - SERIAL_ECHOPGM("start of resume_print()\n"); + SERIAL_ECHOLNPGM("start of resume_print()"); SERIAL_ECHOPAIR("\ndual_x_carriage_mode:", dual_x_carriage_mode); SERIAL_ECHOPAIR("\nextruder_duplication_enabled:", extruder_duplication_enabled); SERIAL_ECHOPAIR("\nactive_extruder:", active_extruder); - SERIAL_ECHOPGM("\n\n"); + SERIAL_ECHOLNPGM("\n"); //*/ if (!did_pause_print) return; diff --git a/Marlin/src/gcode/control/M605.cpp b/Marlin/src/gcode/control/M605.cpp index bcd0cf7b7..2c6d53e31 100644 --- a/Marlin/src/gcode/control/M605.cpp +++ b/Marlin/src/gcode/control/M605.cpp @@ -63,8 +63,8 @@ if (dual_x_carriage_mode == DXC_SCALED_DUPLICATION_MODE) { if (previous_mode != DXC_DUPLICATION_MODE) { - SERIAL_ECHOPGM("Printer must be in DXC_DUPLICATION_MODE prior to \n"); - SERIAL_ECHOPGM("specifying DXC_SCALED_DUPLICATION_MODE.\n"); + SERIAL_ECHOLNPGM("Printer must be in DXC_DUPLICATION_MODE prior to "); + SERIAL_ECHOLNPGM("specifying DXC_SCALED_DUPLICATION_MODE."); dual_x_carriage_mode = DEFAULT_DUAL_X_CARRIAGE_MODE; return; } diff --git a/Marlin/src/gcode/parser.cpp b/Marlin/src/gcode/parser.cpp index 8eee57306..488aef35d 100644 --- a/Marlin/src/gcode/parser.cpp +++ b/Marlin/src/gcode/parser.cpp @@ -357,7 +357,7 @@ void GCodeParser::unknown_command_error() { SERIAL_ECHO(string_arg); SERIAL_CHAR('"'); } - SERIAL_ECHOPGM("\n\n"); + SERIAL_ECHOLNPGM("\n"); for (char c = 'A'; c <= 'Z'; ++c) { if (seen(c)) { SERIAL_ECHOPAIR("Code '", c); SERIAL_ECHOPGM("':"); @@ -376,7 +376,7 @@ void GCodeParser::unknown_command_error() { } else SERIAL_ECHOPGM(" (no value)"); - SERIAL_ECHOPGM("\n\n"); + SERIAL_ECHOLNPGM("\n"); } } } diff --git a/Marlin/src/gcode/queue.cpp b/Marlin/src/gcode/queue.cpp index b0389848c..b11304d12 100644 --- a/Marlin/src/gcode/queue.cpp +++ b/Marlin/src/gcode/queue.cpp @@ -144,7 +144,7 @@ bool enqueue_and_echo_command(const char* cmd) { //SERIAL_ECHOPGM("\") \n"); if (*cmd == 0 || *cmd == '\n' || *cmd == '\r') { - //SERIAL_ECHOPGM("Null command found... Did not queue!\n"); + //SERIAL_ECHOLNPGM("Null command found... Did not queue!"); return true; } diff --git a/Marlin/src/module/configuration_store.cpp b/Marlin/src/module/configuration_store.cpp index cadec09c4..f42cfa215 100644 --- a/Marlin/src/module/configuration_store.cpp +++ b/Marlin/src/module/configuration_store.cpp @@ -1961,7 +1961,7 @@ void MarlinSettings::postprocess() { const bool status = persistentStore.write_data(pos, (uint8_t *)&ubl.z_values, sizeof(ubl.z_values), &crc); persistentStore.access_finish(); - if (status) SERIAL_ECHOPGM("?Unable to save mesh data.\n"); + if (status) SERIAL_ECHOLNPGM("?Unable to save mesh data."); else CHITCHAT_ECHOLNPAIR("Mesh saved in slot ", slot); #else @@ -1990,7 +1990,7 @@ void MarlinSettings::postprocess() { const uint16_t status = persistentStore.read_data(pos, dest, sizeof(ubl.z_values), &crc); persistentStore.access_finish(); - if (status) SERIAL_ECHOPGM("?Unable to load mesh data.\n"); + if (status) SERIAL_ECHOLNPGM("?Unable to load mesh data."); else CHITCHAT_ECHOLNPAIR("Mesh loaded from slot ", slot); EEPROM_FINISH(); diff --git a/Marlin/src/module/endstops.cpp b/Marlin/src/module/endstops.cpp index 41ac8a37d..187578246 100644 --- a/Marlin/src/module/endstops.cpp +++ b/Marlin/src/module/endstops.cpp @@ -872,7 +872,7 @@ void Endstops::update() { #if HAS_Z3_MAX ES_REPORT_CHANGE(Z3_MAX); #endif - SERIAL_ECHOPGM("\n\n"); + SERIAL_ECHOLNPGM("\n"); analogWrite(LED_PIN, local_LED_status); local_LED_status ^= 255; old_live_state_local = live_state_local;