From aaf5bf0218a3c20d27a9aeab064b0a6090052b1f Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 17 Apr 2022 21:19:33 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=91=E2=80=8D=F0=9F=92=BB=20Add=20RESET?= =?UTF-8?q?=5FSTEPPERS=5FON=5FMEDIA=5FINSERT=20flag?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/pins/stm32f1/pins_FYSETC_AIO_II.h | 2 +- Marlin/src/pins/stm32f1/pins_FYSETC_CHEETAH.h | 2 +- Marlin/src/sd/cardreader.cpp | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Marlin/src/pins/stm32f1/pins_FYSETC_AIO_II.h b/Marlin/src/pins/stm32f1/pins_FYSETC_AIO_II.h index de91db22d554..fe6fd6fa5733 100644 --- a/Marlin/src/pins/stm32f1/pins_FYSETC_AIO_II.h +++ b/Marlin/src/pins/stm32f1/pins_FYSETC_AIO_II.h @@ -27,7 +27,7 @@ #define BOARD_WEBSITE_URL "fysetc.com" #define BOARD_NO_NATIVE_USB - +#define RESET_STEPPERS_ON_MEDIA_INSERT #define DISABLE_JTAG #define pins_v2_20190128 // new pins define diff --git a/Marlin/src/pins/stm32f1/pins_FYSETC_CHEETAH.h b/Marlin/src/pins/stm32f1/pins_FYSETC_CHEETAH.h index e0f906bf9ecc..08aeca8c5b59 100644 --- a/Marlin/src/pins/stm32f1/pins_FYSETC_CHEETAH.h +++ b/Marlin/src/pins/stm32f1/pins_FYSETC_CHEETAH.h @@ -32,7 +32,7 @@ //#define BOGUS_TEMPERATURE_GRACE_PERIOD 2000 #define BOARD_NO_NATIVE_USB - +#define RESET_STEPPERS_ON_MEDIA_INSERT #define DISABLE_JTAG #if EITHER(NO_EEPROM_SELECTED, FLASH_EEPROM_EMULATION) diff --git a/Marlin/src/sd/cardreader.cpp b/Marlin/src/sd/cardreader.cpp index bc210ca5556c..966f3bebcf17 100644 --- a/Marlin/src/sd/cardreader.cpp +++ b/Marlin/src/sd/cardreader.cpp @@ -491,12 +491,12 @@ void CardReader::manage_media() { if (stat) { // Media Inserted safe_delay(500); // Some boards need a delay to get settled - if (TERN1(SD_IGNORE_AT_STARTUP, old_stat != 2)) - mount(); // Try to mount the media - #if MB(FYSETC_CHEETAH, FYSETC_CHEETAH_V12, FYSETC_AIO_II) - reset_stepper_drivers(); // Workaround for Cheetah bug - #endif + + // Try to mount the media (only later with SD_IGNORE_AT_STARTUP) + if (TERN1(SD_IGNORE_AT_STARTUP, media_stat.inited)) mount(); if (!isMounted()) stat = 0; // Not mounted? + + TERN_(RESET_STEPPERS_ON_MEDIA_INSERT, reset_stepper_drivers()); // Workaround for Cheetah bug } else { #if PIN_EXISTS(SD_DETECT)