Browse Source

Merge pull request #3569 from leptun/fix_card_removed

Fix "Card removed" on startup
DRracer 2 years ago
parent
commit
2e677ea3ee
1 changed files with 1 additions and 0 deletions
  1. 1 0
      Firmware/ultralcd.cpp

+ 1 - 0
Firmware/ultralcd.cpp

@@ -7916,6 +7916,7 @@ void ultralcd_init()
 #if defined (SDSUPPORT) && defined(SDCARDDETECT) && (SDCARDDETECT > 0)
   SET_INPUT(SDCARDDETECT);
   WRITE(SDCARDDETECT, HIGH);
+  _delay_ms(1); //wait for the pullups to raise the line
   lcd_oldcardstatus = IS_SD_INSERTED;
 #endif//(SDCARDDETECT > 0)
   lcd_encoder_diff = 0;