mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2024-11-23 20:18:52 +00:00
Disable spreadcycle in tmc_enable_stallguard<2209> (#16890)
This commit is contained in:
parent
68de12acbf
commit
f30897500d
@ -1096,8 +1096,11 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool tmc_enable_stallguard(TMC2209Stepper &st) {
|
bool tmc_enable_stallguard(TMC2209Stepper &st) {
|
||||||
|
const bool stealthchop_was_enabled = !st.en_spreadCycle();
|
||||||
|
|
||||||
st.TCOOLTHRS(0xFFFFF);
|
st.TCOOLTHRS(0xFFFFF);
|
||||||
return !st.en_spreadCycle();
|
st.en_spreadCycle(false);
|
||||||
|
return stealthchop_was_enabled;
|
||||||
}
|
}
|
||||||
void tmc_disable_stallguard(TMC2209Stepper &st, const bool restore_stealth) {
|
void tmc_disable_stallguard(TMC2209Stepper &st, const bool restore_stealth) {
|
||||||
st.en_spreadCycle(!restore_stealth);
|
st.en_spreadCycle(!restore_stealth);
|
||||||
|
Loading…
Reference in New Issue
Block a user