test
This commit is contained in:
parent
d31492a0de
commit
b4196e696c
20
src/main.cpp
20
src/main.cpp
|
@ -233,7 +233,7 @@ void writeFile(fs::FS &fs, const char * path, const char * message){
|
|||
File file = fs.open(path, FILE_WRITE);
|
||||
if(!file){
|
||||
Serial.println("Failed to open file for writing");
|
||||
//errorCode(2);
|
||||
errorCode(2);
|
||||
return;
|
||||
}
|
||||
if(file.print(message)){
|
||||
|
@ -313,22 +313,22 @@ void testFileIO(fs::FS &fs, const char * path){
|
|||
|
||||
void sd_init() {
|
||||
|
||||
if(!SD.begin()){
|
||||
Serial.println("Card Mount Failed");
|
||||
errorCode(3);
|
||||
return;
|
||||
}
|
||||
|
||||
uint8_t cardType = SD.cardType();
|
||||
|
||||
if(cardType == CARD_NONE){
|
||||
Serial.println("No SD card attached");
|
||||
//errorCode(4);
|
||||
errorCode(4);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if(!SD.begin()){
|
||||
Serial.println("Card Mount Failed");
|
||||
//errorCode(3);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
uint64_t cardSize = SD.cardSize() / (1024 * 1024);
|
||||
Serial.printf("SD Card Size: %lluMB\n", cardSize);
|
||||
|
||||
now = rtc.now();
|
||||
char date_format[] = "DDhhmm";
|
||||
|
|
Loading…
Reference in a new issue