Merge pull request #9189 from psavva/tmc_debug_compile_fix

[2.0.x] Fixes TMC_DEBUG compilation error
This commit is contained in:
Scott Lahteine 2018-01-15 04:52:21 -06:00 committed by GitHub
commit 4d2f277d43
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -376,7 +376,10 @@ void _tmc_say_sgt(const char name[], const uint32_t sgt) {
break; break;
case TMC_TPWMTHRS_MMS: { case TMC_TPWMTHRS_MMS: {
uint32_t tpwmthrs_val = st.TPWMTHRS(); 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; break;
case TMC_OTPW: serialprintPGM(st.otpw() ? PSTR("true") : PSTR("false")); break; case TMC_OTPW: serialprintPGM(st.otpw() ? PSTR("true") : PSTR("false")); break;