Skip to content
Merged
Changes from all commits
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
22 changes: 11 additions & 11 deletions libraries/Update/examples/SD_Update/SD_Update.ino
Original file line number Diff line number Diff line change
Expand Up @@ -88,25 +88,25 @@ void setup() {

//first init and check SD card
if (!SD_MMC.begin()) {
Serial.println("Card Mount Failed");
goto end;
rebootEspWithReason("Card Mount Failed");
}

cardType = SD_MMC.cardType();

if (cardType == CARD_NONE) {
Serial.println("No SD_MMC card attached");
goto end;
}

updateFromFS(SD_MMC);
rebootEspWithReason("No SD_MMC card attached");
}else{
updateFromFS(SD_MMC);
}
}

end:
delay(1000);
ESP.restart();
void rebootEspWithReason(String reason){
Serial.println(reason);
delay(1000);
ESP.restart();
}

//will not be reached
void loop() {

}
}