SD debug, commentaires errorCode, change include wire.h
This commit is contained in:
parent
534afa72ec
commit
d31492a0de
|
@ -4,7 +4,7 @@
|
||||||
#include "SD.h"
|
#include "SD.h"
|
||||||
#include "SPI.h"
|
#include "SPI.h"
|
||||||
#include "RTClib.h"
|
#include "RTClib.h"
|
||||||
#include <Wire.h>
|
#include "Wire.h"
|
||||||
#include "driver/pcnt.h"
|
#include "driver/pcnt.h"
|
||||||
#include <WiFi.h>
|
#include <WiFi.h>
|
||||||
#include <ESPAsyncWebServer.h>
|
#include <ESPAsyncWebServer.h>
|
||||||
|
@ -233,7 +233,7 @@ void writeFile(fs::FS &fs, const char * path, const char * message){
|
||||||
File file = fs.open(path, FILE_WRITE);
|
File file = fs.open(path, FILE_WRITE);
|
||||||
if(!file){
|
if(!file){
|
||||||
Serial.println("Failed to open file for writing");
|
Serial.println("Failed to open file for writing");
|
||||||
errorCode(2);
|
//errorCode(2);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(file.print(message)){
|
if(file.print(message)){
|
||||||
|
@ -317,14 +317,14 @@ void sd_init() {
|
||||||
|
|
||||||
if(cardType == CARD_NONE){
|
if(cardType == CARD_NONE){
|
||||||
Serial.println("No SD card attached");
|
Serial.println("No SD card attached");
|
||||||
errorCode(4);
|
//errorCode(4);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if(!SD.begin()){
|
if(!SD.begin()){
|
||||||
Serial.println("Card Mount Failed");
|
Serial.println("Card Mount Failed");
|
||||||
errorCode(3);
|
//errorCode(3);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue