Read from backup TMC StealthChop state (#19364)

This commit is contained in:
ManuelMcLure
2020-09-12 20:59:20 -07:00
committed by Scott Lahteine
parent c517c2ea65
commit 4d14667266
2 changed files with 35 additions and 32 deletions

View File

@ -105,6 +105,7 @@ class TMCMarlin : public TMC, public TMCStorage<AXIS_LETTER, DRIVER_ID> {
#if HAS_STEALTHCHOP
inline void refresh_stepping_mode() { this->en_pwm_mode(this->stored.stealthChop_enabled); }
inline bool get_stealthChop_status() { return this->en_pwm_mode(); }
inline bool get_stored_stealthChop_status() { return this->stored.stealthChop_enabled; }
#endif
#if ENABLED(HYBRID_THRESHOLD)
@ -171,6 +172,7 @@ class TMCMarlin<TMC2208Stepper, AXIS_LETTER, DRIVER_ID, AXIS_ID> : public TMC220
#if HAS_STEALTHCHOP
inline void refresh_stepping_mode() { en_spreadCycle(!this->stored.stealthChop_enabled); }
inline bool get_stealthChop_status() { return !this->en_spreadCycle(); }
inline bool get_stored_stealthChop_status() { return this->stored.stealthChop_enabled; }
#endif
#if ENABLED(HYBRID_THRESHOLD)
@ -216,6 +218,7 @@ class TMCMarlin<TMC2209Stepper, AXIS_LETTER, DRIVER_ID, AXIS_ID> : public TMC220
#if HAS_STEALTHCHOP
inline void refresh_stepping_mode() { en_spreadCycle(!this->stored.stealthChop_enabled); }
inline bool get_stealthChop_status() { return !this->en_spreadCycle(); }
inline bool get_stored_stealthChop_status() { return this->stored.stealthChop_enabled; }
#endif
#if ENABLED(HYBRID_THRESHOLD)