Handle disabled HYBRID_THRESHOLD in EEPROM (#10274)
This commit is contained in:
parent
885ad70c8b
commit
6b150bfc40
@ -747,7 +747,7 @@ void MarlinSettings::postprocess() {
|
||||
_FIELD_TEST(tmc_hybrid_threshold);
|
||||
|
||||
uint32_t tmc_hybrid_threshold[TMC_AXES] = {
|
||||
#if HAS_TRINAMIC
|
||||
#if ENABLED(HYBRID_THRESHOLD)
|
||||
#if X_IS_TRINAMIC
|
||||
TMC_GET_PWMTHRS(X, X),
|
||||
#else
|
||||
@ -1339,7 +1339,7 @@ void MarlinSettings::postprocess() {
|
||||
for (uint8_t q=TMC_AXES; q--;) EEPROM_READ(val);
|
||||
#endif
|
||||
|
||||
#if HAS_TRINAMIC
|
||||
#if ENABLED(HYBRID_THRESHOLD)
|
||||
#define TMC_SET_PWMTHRS(P,Q) tmc_set_pwmthrs(stepper##Q, TMC_##Q, tmc_hybrid_threshold[TMC_##Q], planner.axis_steps_per_mm[P##_AXIS])
|
||||
uint32_t tmc_hybrid_threshold[TMC_AXES];
|
||||
EEPROM_READ(tmc_hybrid_threshold);
|
||||
@ -1892,7 +1892,9 @@ void MarlinSettings::reset() {
|
||||
|
||||
#if HAS_TRINAMIC
|
||||
void say_M906() { SERIAL_ECHOPGM(" M906 "); }
|
||||
#if ENABLED(HYBRID_THRESHOLD)
|
||||
void say_M913() { SERIAL_ECHOPGM(" M913 "); }
|
||||
#endif
|
||||
#if ENABLED(SENSORLESS_HOMING)
|
||||
void say_M914() { SERIAL_ECHOPGM(" M914 "); }
|
||||
#endif
|
||||
@ -2425,6 +2427,7 @@ void MarlinSettings::reset() {
|
||||
/**
|
||||
* TMC2130 / TMC2208 / TRAMS Hybrid Threshold
|
||||
*/
|
||||
#if ENABLED(HYBRID_THRESHOLD)
|
||||
if (!forReplay) {
|
||||
CONFIG_ECHO_START;
|
||||
SERIAL_ECHOLNPGM("Hybrid Threshold:");
|
||||
@ -2475,6 +2478,7 @@ void MarlinSettings::reset() {
|
||||
SERIAL_ECHOLNPAIR("T4 E", TMC_GET_PWMTHRS(E, E4));
|
||||
#endif
|
||||
SERIAL_EOL();
|
||||
#endif // HYBRID_THRESHOLD
|
||||
|
||||
/**
|
||||
* TMC2130 Sensorless homing thresholds
|
||||
|
Loading…
Reference in New Issue
Block a user