Skip to content

Commit

Permalink
πŸ§‘β€πŸ’» Add RESET_STEPPERS_ON_MEDIA_INSERT flag
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead committed Apr 18, 2022
1 parent fb54d06 commit aaf5bf0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Marlin/src/pins/stm32f1/pins_FYSETC_AIO_II.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/pins/stm32f1/pins_FYSETC_CHEETAH.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
10 changes: 5 additions & 5 deletions Marlin/src/sd/cardreader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit aaf5bf0

Please sign in to comment.