From 46246c8db6b42d48aa1452866e2f326abb21bed7 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 10 Mar 2021 11:35:19 -0600 Subject: [PATCH] Clean up spaces and words --- Marlin/src/MarlinCore.cpp | 10 +++++----- Marlin/src/gcode/host/M115.cpp | 2 +- Marlin/src/gcode/queue.cpp | 18 ++++++++++-------- Marlin/src/inc/SanityCheck.h | 3 +-- Marlin/src/pins/stm32f1/pins_MKS_ROBIN.h | 18 +++++++++--------- 5 files changed, 26 insertions(+), 25 deletions(-) diff --git a/Marlin/src/MarlinCore.cpp b/Marlin/src/MarlinCore.cpp index bce091da5f..e1756af511 100644 --- a/Marlin/src/MarlinCore.cpp +++ b/Marlin/src/MarlinCore.cpp @@ -990,14 +990,14 @@ void setup() { #endif #define SETUP_RUN(C) do{ SETUP_LOG(STRINGIFY(C)); C; }while(0) - MYSERIAL0.begin(BAUDRATE); + MYSERIAL1.begin(BAUDRATE); millis_t serial_connect_timeout = millis() + 1000UL; - while (!MYSERIAL0.connected() && PENDING(millis(), serial_connect_timeout)) { /*nada*/ } + while (!MYSERIAL1.connected() && PENDING(millis(), serial_connect_timeout)) { /*nada*/ } #if HAS_MULTI_SERIAL && !HAS_ETHERNET - MYSERIAL1.begin(BAUDRATE); + MYSERIAL2.begin(BAUDRATE); serial_connect_timeout = millis() + 1000UL; - while (!MYSERIAL1.connected() && PENDING(millis(), serial_connect_timeout)) { /*nada*/ } + while (!MYSERIAL2.connected() && PENDING(millis(), serial_connect_timeout)) { /*nada*/ } #endif SERIAL_ECHOLNPGM("start"); @@ -1053,7 +1053,7 @@ void setup() { #if HAS_FILAMENT_SENSOR SETUP_RUN(runout.setup()); #endif - + #if HAS_TMC220x SETUP_RUN(tmc_serial_begin()); #endif diff --git a/Marlin/src/gcode/host/M115.cpp b/Marlin/src/gcode/host/M115.cpp index 316abc3048..4b7b268688 100644 --- a/Marlin/src/gcode/host/M115.cpp +++ b/Marlin/src/gcode/host/M115.cpp @@ -144,7 +144,7 @@ void GcodeSuite::M115() { // COOLER_TEMPERATURE (M143, M193) cap_line(PSTR("COOLER_TEMPERATURE"), ENABLED(HAS_COOLER)); - // MEATPACK Compresson + // MEATPACK Compression cap_line(PSTR("MEATPACK"), ENABLED(MEATPACK)); // Machine Geometry diff --git a/Marlin/src/gcode/queue.cpp b/Marlin/src/gcode/queue.cpp index 4f676eaeb3..6b48000248 100644 --- a/Marlin/src/gcode/queue.cpp +++ b/Marlin/src/gcode/queue.cpp @@ -272,7 +272,7 @@ void GCodeQueue::flush_and_request_resend(const serial_index_t serial_ind) { SERIAL_ECHOLN(serial_state[serial_ind.index].last_N + 1); } -inline bool serial_data_available(serial_index_t index) { +static bool serial_data_available(serial_index_t index) { const int a = SERIAL_IMPL.available(index); #if BOTH(RX_BUFFER_MONITOR, RX_BUFFER_SIZE) if (a > RX_BUFFER_SIZE - 2) { @@ -283,13 +283,15 @@ inline bool serial_data_available(serial_index_t index) { return a > 0; } -// Multiserial already handles dispatch to/from multiple ports -inline bool any_serial_data_available() { - LOOP_L_N(p, NUM_SERIAL) - if (serial_data_available(p)) - return true; - return false; -} +#if NO_TIMEOUTS > 0 + // Multiserial already handles dispatch to/from multiple ports + static bool any_serial_data_available() { + LOOP_L_N(p, NUM_SERIAL) + if (serial_data_available(p)) + return true; + return false; + } +#endif inline int read_serial(const serial_index_t index) { return SERIAL_IMPL.read(index); } diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index cd9ca84385..8c92cf2c63 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -3337,12 +3337,11 @@ static_assert( _ARR_TEST(3,0) && _ARR_TEST(3,1) && _ARR_TEST(3,2) #endif #endif - /** * Sanity Check for MEATPACK and BINARY_FILE_TRANSFER Features */ #if BOTH(MEATPACK, BINARY_FILE_TRANSFER) - #error "Either enable MEATPACK or enable BINARY_FILE_TRANSFER." + #error "Either enable MEATPACK or BINARY_FILE_TRANSFER, not both." #endif /** diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN.h index 99e0f0be2a..b9f1074c7a 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN.h @@ -237,7 +237,7 @@ * This board does not have dedicated TMC UART pins. Custom wiring is needed. * You may uncomment one of the options below, or add it to your Configuration.h. * - * When using up to four TMC2209 drivers, hardware serial is recommented on + * When using up to four TMC2209 drivers, hardware serial is recommended on * MSerial0 or MSerial1. * * When using TMC2208 or more than four drivers, SoftwareSerial will be needed, @@ -246,14 +246,14 @@ //#define TMC_HARDWARE_SERIAL #if ENABLED(TMC_HARDWARE_SERIAL) - #define X_HARDWARE_SERIAL MSerial0 - #define X2_HARDWARE_SERIAL MSerial0 - #define Y_HARDWARE_SERIAL MSerial0 - #define Y2_HARDWARE_SERIAL MSerial0 - #define Z_HARDWARE_SERIAL MSerial0 - #define Z2_HARDWARE_SERIAL MSerial0 - #define E0_HARDWARE_SERIAL MSerial0 - #define E1_HARDWARE_SERIAL MSerial0 + #define X_HARDWARE_SERIAL MSerial0 + #define X2_HARDWARE_SERIAL MSerial0 + #define Y_HARDWARE_SERIAL MSerial0 + #define Y2_HARDWARE_SERIAL MSerial0 + #define Z_HARDWARE_SERIAL MSerial0 + #define Z2_HARDWARE_SERIAL MSerial0 + #define E0_HARDWARE_SERIAL MSerial0 + #define E1_HARDWARE_SERIAL MSerial0 #endif //#define TMC_SOFTWARE_SERIAL