Browse Source

Merge pull request #9189 from psavva/tmc_debug_compile_fix

[2.0.x] Fixes TMC_DEBUG compilation error
Scott Lahteine 7 years ago
parent
commit
4d2f277d43
No account linked to committer's email address
1 changed files with 4 additions and 1 deletions
  1. 4
    1
      Marlin/src/feature/tmc_util.cpp

+ 4
- 1
Marlin/src/feature/tmc_util.cpp View File

@@ -376,7 +376,10 @@ void _tmc_say_sgt(const char name[], const uint32_t sgt) {
376 376
         break;
377 377
       case TMC_TPWMTHRS_MMS: {
378 378
           uint32_t tpwmthrs_val = st.TPWMTHRS();
379
-          tpwmthrs_val ? SERIAL_ECHO(12650000UL * st.microsteps() / (256 * tpwmthrs_val * spmm)) : SERIAL_CHAR('-');
379
+          if (tpwmthrs_val)
380
+            SERIAL_ECHO(12650000UL * st.microsteps() / (256 * tpwmthrs_val * spmm));
381
+          else
382
+            SERIAL_CHAR('-');
380 383
         }
381 384
         break;
382 385
       case TMC_OTPW: serialprintPGM(st.otpw() ? PSTR("true") : PSTR("false")); break;

Loading…
Cancel
Save