Handle disabled HYBRID_THRESHOLD in EEPROM (#10275)

2.0.x
Scott Lahteine 7 years ago committed by GitHub
parent 9ec2c03c5b
commit 02f0f95d40
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -732,7 +732,7 @@ void MarlinSettings::postprocess() {
_FIELD_TEST(tmc_hybrid_threshold); _FIELD_TEST(tmc_hybrid_threshold);
uint32_t tmc_hybrid_threshold[TMC_AXES] = { uint32_t tmc_hybrid_threshold[TMC_AXES] = {
#if HAS_TRINAMIC #if ENABLED(HYBRID_THRESHOLD)
#if X_IS_TRINAMIC #if X_IS_TRINAMIC
TMC_GET_PWMTHRS(X, X), TMC_GET_PWMTHRS(X, X),
#else #else
@ -1325,7 +1325,7 @@ void MarlinSettings::postprocess() {
for (uint8_t q=TMC_AXES; q--;) EEPROM_READ(val); for (uint8_t q=TMC_AXES; q--;) EEPROM_READ(val);
#endif #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]) #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]; uint32_t tmc_hybrid_threshold[TMC_AXES];
EEPROM_READ(tmc_hybrid_threshold); EEPROM_READ(tmc_hybrid_threshold);
@ -1894,7 +1894,9 @@ void MarlinSettings::reset(PORTARG_SOLO) {
#if HAS_TRINAMIC #if HAS_TRINAMIC
void say_M906(PORTARG_SOLO) { SERIAL_ECHOPGM_P(port, " M906 "); } void say_M906(PORTARG_SOLO) { SERIAL_ECHOPGM_P(port, " M906 "); }
#if ENABLED(HYBRID_THRESHOLD)
void say_M913(PORTARG_SOLO) { SERIAL_ECHOPGM_P(port, " M913 "); } void say_M913(PORTARG_SOLO) { SERIAL_ECHOPGM_P(port, " M913 "); }
#endif
#if ENABLED(SENSORLESS_HOMING) #if ENABLED(SENSORLESS_HOMING)
void say_M914(PORTARG_SOLO) { SERIAL_ECHOPGM_P(port, " M914 "); } void say_M914(PORTARG_SOLO) { SERIAL_ECHOPGM_P(port, " M914 "); }
#endif #endif
@ -2430,6 +2432,7 @@ void MarlinSettings::reset(PORTARG_SOLO) {
/** /**
* TMC2130 / TMC2208 / TRAMS Hybrid Threshold * TMC2130 / TMC2208 / TRAMS Hybrid Threshold
*/ */
#if ENABLED(HYBRID_THRESHOLD)
if (!forReplay) { if (!forReplay) {
CONFIG_ECHO_START; CONFIG_ECHO_START;
SERIAL_ECHOLNPGM_P(port, "Hybrid Threshold:"); SERIAL_ECHOLNPGM_P(port, "Hybrid Threshold:");
@ -2480,6 +2483,7 @@ void MarlinSettings::reset(PORTARG_SOLO) {
SERIAL_ECHOLNPAIR_P(port, "T4 E", TMC_GET_PWMTHRS(E, E4)); SERIAL_ECHOLNPAIR_P(port, "T4 E", TMC_GET_PWMTHRS(E, E4));
#endif #endif
SERIAL_EOL_P(port); SERIAL_EOL_P(port);
#endif // HYBRID_THRESHOLD
/** /**
* TMC2130 Sensorless homing thresholds * TMC2130 Sensorless homing thresholds

Loading…
Cancel
Save