Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: USB_FlashDrive Power Loss Recovery Check #24015

Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Marlin/src/sd/cardreader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,6 @@ void CardReader::manage_media() {
if (ui.detected()) {

uint8_t old_stat = prev_stat;
prev_stat = stat; // Change now to prevent re-entry
thinkyhead marked this conversation as resolved.
Show resolved Hide resolved

if (stat) { // Media Inserted
safe_delay(500); // Some boards need a delay to get settled
Expand All @@ -500,6 +499,9 @@ void CardReader::manage_media() {
#endif
}

if (stat == 0 && prev_stat == 2) return;
prev_stat = stat; // Change now to prevent re-entry

ui.media_changed(old_stat, stat); // Update the UI

if (stat) {
Expand Down