Skip to content

Commit

Permalink
Allow TMC2209 to save/restore spreadCycle (MarlinFirmware#16153)
Browse files Browse the repository at this point in the history
Co-Authored-By: teemuatlut <teemu.mantykallio@live.fi>
  • Loading branch information
2 people authored and griehsler committed Jan 30, 2020
1 parent 90dd87c commit e18f351
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Marlin/src/feature/tmc_util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1038,9 +1038,10 @@

bool tmc_enable_stallguard(TMC2209Stepper &st) {
st.TCOOLTHRS(0xFFFFF);
return true;
return stealthchop_was_enabled;
}
void tmc_disable_stallguard(TMC2209Stepper &st, const bool restore_stealth _UNUSED) {
void tmc_disable_stallguard(TMC2209Stepper &st, const bool restore_stealth) {
st.en_spreadCycle(!restore_stealth);
st.TCOOLTHRS(0);
}

Expand Down

0 comments on commit e18f351

Please sign in to comment.