Skip to content

Commit

Permalink
Cheetah workaround
Browse files Browse the repository at this point in the history
Co-Authored-By: Eric Ptak <trouch@users.noreply.github.com>
  • Loading branch information
thinkyhead and trouch committed Apr 2, 2020
1 parent e4c620b commit 10149c1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Marlin/src/sd/cardreader.cpp
Expand Up @@ -381,6 +381,10 @@ void CardReader::mount() {
/**
* Handle SD card events
*/
#if MB(FYSETC_CHEETAH)
#include "../module/stepper.h"
#endif

void CardReader::manage_media() {
static uint8_t prev_stat = TERN(INIT_SDCARD_ON_BOOT, 2, 0);
uint8_t stat = uint8_t(IS_SD_INSERTED());
Expand All @@ -392,6 +396,9 @@ void CardReader::manage_media() {
if (stat) { // Media Inserted
safe_delay(500); // Some boards need a delay to get settled
mount(); // Try to mount the media
#if MB(FYSETC_CHEETAH)
reset_stepper_drivers(); // Workaround for Cheetah bug
#endif
if (!isMounted()) stat = 0; // Not mounted?
}
else {
Expand Down

0 comments on commit 10149c1

Please sign in to comment.