Read from backup TMC StealthChop state (#19364)

This commit is contained in:
ManuelMcLure authored and Scott Lahteine committed 2021-04-29 08:44:59 -05:00
1 parent c517c2ea65
commit 4d14667266
2 files changed
+35 -32

No files matched your search

+3
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)