Commit 5a27036 2 people authored and committed
1 parent 6d353df commit 5a27036 Copy full SHA for 5a27036
File tree 1 file changed +2
-15
lines changed
1 file changed +2
-15
lines changed Original file line number Diff line number Diff line change @@ -495,12 +495,7 @@ void CardReader::manage_media() {
495
495
496
496
// Try to mount the media (only later with SD_IGNORE_AT_STARTUP)
497
497
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?
504
499
505
500
TERN_ (RESET_STEPPERS_ON_MEDIA_INSERT, reset_stepper_drivers ()); // Workaround for Cheetah bug
506
501
}
@@ -512,21 +507,13 @@ void CardReader::manage_media() {
512
507
513
508
if (!stat) return ; // Exit if no media is present
514
509
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?
518
511
519
512
DEBUG_ECHOLNPGM (" First mount." );
520
513
521
514
// Load settings the first time media is inserted (not just during init)
522
515
TERN_ (SDCARD_EEPROM_EMULATION, settings.first_load ());
523
516
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
-
530
517
bool do_auto = true ; UNUSED (do_auto);
531
518
532
519
// Check for PLR file.
You can’t perform that action at this time.
0 commit comments