Fix TMC-related compile issues. (#12971)

- `STEALTHOP_[XYZE]` configuration options now set the default state.
This commit is contained in:
teemuatlut
2019-01-21 07:54:57 +02:00
committed by Scott Lahteine
parent bb30927549
commit e5801b75f8
3 changed files with 7 additions and 14 deletions

View File

@ -838,18 +838,14 @@
bool stealthchop_was_enabled = st.en_pwm_mode();
st.TCOOLTHRS(0xFFFFF);
#if STEALTHCHOP_ENABLED
st.en_pwm_mode(false);
#endif
st.en_pwm_mode(false);
st.diag1_stall(true);
return stealthchop_was_enabled;
}
void tmc_disable_stallguard(TMC2130Stepper &st, const bool restore_stealth) {
st.TCOOLTHRS(0);
#if STEALTHCHOP_ENABLED
st.en_pwm_mode(restore_stealth);
#endif
st.en_pwm_mode(restore_stealth);
st.diag1_stall(false);
}
bool tmc_enable_stallguard(TMC2660Stepper) {