File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -495,12 +495,7 @@ void CardReader::manage_media() {
495495
496496 // Try to mount the media (only later with SD_IGNORE_AT_STARTUP)
497497 if (TERN1 (SD_IGNORE_AT_STARTUP, old_stat != 2 )) mount ();
498- if (!isMounted ()) { // Not mounted?
499- stat = 0 ;
500- #if HAS_SD_DETECT && DISABLED(SD_IGNORE_AT_STARTUP)
501- prev_stat = 0 ;
502- #endif
503- }
498+ if (!isMounted ()) stat = 0 ; // Not mounted?
504499
505500 TERN_ (RESET_STEPPERS_ON_MEDIA_INSERT, reset_stepper_drivers ()); // Workaround for Cheetah bug
506501 }
@@ -512,21 +507,13 @@ void CardReader::manage_media() {
512507
513508 if (!stat) return ; // Exit if no media is present
514509
515- static bool did_first_insert = false ;
516- if (did_first_insert) return ; // Did a media insert already happen?
517- did_first_insert = true ; // Definitely handling this media insert...
510+ if (old_stat != 2 ) return ; // First mount?
518511
519512 DEBUG_ECHOLNPGM (" First mount." );
520513
521514 // Load settings the first time media is inserted (not just during init)
522515 TERN_ (SDCARD_EEPROM_EMULATION, settings.first_load ());
523516
524- #if HAS_USB_FLASH_DRIVE
525- const millis_t ms = millis ();
526- DEBUG_ECHOLNPGM (" USB mount waiting time = " , ms);
527- if (ms > 5000 ) return ; // Too late to be considered "already inserted"?
528- #endif
529-
530517 bool do_auto = true ; UNUSED (do_auto);
531518
532519 // Check for PLR file.
You can’t perform that action at this time.
0 commit comments