From ad500b01e0224719e9c29bc559484d44847a5e13 Mon Sep 17 00:00:00 2001 From: Panayiotis Savva Date: Mon, 15 Jan 2018 12:24:02 +0200 Subject: [PATCH 1/2] Fixes TMC compilation error --- Marlin/src/feature/tmc_util.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Marlin/src/feature/tmc_util.cpp b/Marlin/src/feature/tmc_util.cpp index f08325855..da1bf6b17 100644 --- a/Marlin/src/feature/tmc_util.cpp +++ b/Marlin/src/feature/tmc_util.cpp @@ -376,7 +376,10 @@ void _tmc_say_sgt(const char name[], const uint32_t sgt) { break; case TMC_TPWMTHRS_MMS: { uint32_t tpwmthrs_val = st.TPWMTHRS(); - tpwmthrs_val ? SERIAL_ECHO(12650000UL * st.microsteps() / (256 * tpwmthrs_val * spmm)) : SERIAL_CHAR('-'); + if (tpwmthrs_val) + SERIAL_ECHO(12650000UL * st.microsteps() / (256 * tpwmthrs_val * spmm)); + else + SERIAL_CHAR('-'); } break; case TMC_OTPW: serialprintPGM(st.otpw() ? PSTR("true") : PSTR("false")); break; From 43d3d024ac68322f8636bc25e7c64b960c90e056 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Mon, 15 Jan 2018 04:51:59 -0600 Subject: [PATCH 2/2] Update tmc_util.cpp --- Marlin/src/feature/tmc_util.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/src/feature/tmc_util.cpp b/Marlin/src/feature/tmc_util.cpp index da1bf6b17..44e8bb649 100644 --- a/Marlin/src/feature/tmc_util.cpp +++ b/Marlin/src/feature/tmc_util.cpp @@ -379,7 +379,7 @@ void _tmc_say_sgt(const char name[], const uint32_t sgt) { if (tpwmthrs_val) SERIAL_ECHO(12650000UL * st.microsteps() / (256 * tpwmthrs_val * spmm)); else - SERIAL_CHAR('-'); + SERIAL_CHAR('-'); } break; case TMC_OTPW: serialprintPGM(st.otpw() ? PSTR("true") : PSTR("false")); break;