From cead93713fcdecd9a3722fad8b374f60722ff036 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Tue, 28 Jul 2020 00:09:26 +0000 Subject: [PATCH 1/4] [cron] Bump distribution date (2020-07-28) --- Marlin/src/inc/Version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index 4007997de8..aea45c24c5 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2020-07-27" + #define STRING_DISTRIBUTION_DATE "2020-07-28" #endif /** From a63ad32f71201b01e08f4f01a2088065587e6c32 Mon Sep 17 00:00:00 2001 From: ellensp Date: Tue, 28 Jul 2020 13:12:30 +1200 Subject: [PATCH 2/4] Fix WiFi / ESP32 sanity check (#18808) --- Marlin/src/inc/SanityCheck.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index 2cba0fecf2..9fde639b0f 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -3047,8 +3047,8 @@ static_assert( _ARR_TEST(3,0) && _ARR_TEST(3,1) && _ARR_TEST(3,2) /** * Sanity check for WIFI */ -#if ENABLED(ESP3D_WIFISUPPORT) && DISABLED(ARDUINO_ARCH_ESP32) - #error "ESP3D_WIFISUPPORT requires an ESP32 controller. Use WIFISUPPORT for standalone ESP3D modules." +#if EITHER(ESP3D_WIFISUPPORT, WIFISUPPORT) && DISABLED(ARDUINO_ARCH_ESP32) + #error "ESP3D_WIFISUPPORT or WIFISUPPORT requires an ESP32 controller." #endif // Misc. Cleanup From b5ece63778cb3f1b5eb8f173643a9de621764820 Mon Sep 17 00:00:00 2001 From: Victor Tseng Date: Tue, 28 Jul 2020 09:13:27 +0800 Subject: [PATCH 3/4] Fix garbled print_xyz output (#18810) --- Marlin/src/core/serial.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/src/core/serial.cpp b/Marlin/src/core/serial.cpp index 77854d0f80..0d22f7bfc0 100644 --- a/Marlin/src/core/serial.cpp +++ b/Marlin/src/core/serial.cpp @@ -68,7 +68,7 @@ void print_bin(uint16_t val) { extern const char SP_X_STR[], SP_Y_STR[], SP_Z_STR[]; void print_xyz(const float &x, const float &y, const float &z, PGM_P const prefix/*=nullptr*/, PGM_P const suffix/*=nullptr*/) { - serialprintPGM(prefix); + if (prefix) serialprintPGM(prefix); SERIAL_ECHOPAIR_P(SP_X_STR, x, SP_Y_STR, y, SP_Z_STR, z); if (suffix) serialprintPGM(suffix); else SERIAL_EOL(); } From 5d14c3712f96e0800cfe30e85036f4941a5a21ee Mon Sep 17 00:00:00 2001 From: Victor Tseng Date: Tue, 28 Jul 2020 09:15:14 +0800 Subject: [PATCH 4/4] Fix DELTA + TMC sensorless homing + SPI endstops (#18811) --- Marlin/src/module/delta.cpp | 14 ++++++-------- Marlin/src/module/motion.h | 6 ++++++ 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/Marlin/src/module/delta.cpp b/Marlin/src/module/delta.cpp index 9361729462..df6cae6e0a 100644 --- a/Marlin/src/module/delta.cpp +++ b/Marlin/src/module/delta.cpp @@ -242,11 +242,9 @@ void home_delta() { // Disable stealthChop if used. Enable diag1 pin on driver. #if ENABLED(SENSORLESS_HOMING) - sensorless_t stealth_states { - tmc_enable_stallguard(stepperX), - tmc_enable_stallguard(stepperY), - tmc_enable_stallguard(stepperZ) - }; + TERN_(X_SENSORLESS, sensorless_t stealth_states_x = start_sensorless_homing_per_axis(X_AXIS)); + TERN_(Y_SENSORLESS, sensorless_t stealth_states_y = start_sensorless_homing_per_axis(Y_AXIS)); + TERN_(Z_SENSORLESS, sensorless_t stealth_states_z = start_sensorless_homing_per_axis(Z_AXIS)); #endif // Move all carriages together linearly until an endstop is hit. @@ -256,9 +254,9 @@ void home_delta() { // Re-enable stealthChop if used. Disable diag1 pin on driver. #if ENABLED(SENSORLESS_HOMING) - tmc_disable_stallguard(stepperX, stealth_states.x); - tmc_disable_stallguard(stepperY, stealth_states.y); - tmc_disable_stallguard(stepperZ, stealth_states.z); + TERN_(X_SENSORLESS, end_sensorless_homing_per_axis(X_AXIS, stealth_states_x)); + TERN_(Y_SENSORLESS, end_sensorless_homing_per_axis(Y_AXIS, stealth_states_y)); + TERN_(Z_SENSORLESS, end_sensorless_homing_per_axis(Z_AXIS, stealth_states_z)); #endif endstops.validate_homing_move(); diff --git a/Marlin/src/module/motion.h b/Marlin/src/module/motion.h index d33ce623a4..38ce980dae 100644 --- a/Marlin/src/module/motion.h +++ b/Marlin/src/module/motion.h @@ -395,3 +395,9 @@ void homeaxis(const AxisEnum axis); #if HAS_M206_COMMAND void set_home_offset(const AxisEnum axis, const float v); #endif + +#if USE_SENSORLESS + struct sensorless_t; + sensorless_t start_sensorless_homing_per_axis(const AxisEnum axis); + void end_sensorless_homing_per_axis(const AxisEnum axis, sensorless_t enable_stealth); +#endif