move wifi and sd init functions to cpp file

This commit is contained in:
StrangeD0s
2024-07-24 00:37:00 +02:00
parent 2dd26918df
commit 5c2968eead
3 changed files with 87 additions and 7 deletions
+7 -7
View File
@@ -46,6 +46,7 @@
#include <IRremote.hpp>
#include "secrets.h"
#include "defines.h"
#include "initfunctions.h"
//------------------------------------------------
@@ -144,7 +145,6 @@ bool wasNumber = false;
// Create AsyncWebServer object on port 80
AsyncWebServer server(80);
// WiFiServer server(80);
const char *PARAM_MESSAGE = "message";
@@ -155,7 +155,7 @@ void notFound(AsyncWebServerRequest *request)
//------------------------------------------------
//-------------- SD-Card Functions ---------------
void initSDCard()
/* void initSDCard()
{
if (!SD.begin())
{
@@ -188,9 +188,9 @@ void initSDCard()
}
uint64_t cardSize = SD.cardSize() / (1024 * 1024);
Serial.printf("SD Card Size: %lluMB\n", cardSize);
}
} */
void listDir(fs::FS &fs, const char *dirname, uint8_t levels)
/* void listDir(fs::FS &fs, const char *dirname, uint8_t levels)
{
Serial.printf("Listing directory: %s\n", dirname);
@@ -227,7 +227,7 @@ void listDir(fs::FS &fs, const char *dirname, uint8_t levels)
}
file = root.openNextFile();
}
}
} */
//------------------------------------------------
//--------------- IR Functions -------------------
@@ -342,7 +342,7 @@ void nameAllTracks(String message)
//------------------------------------------------
//------------- Webserver Functions --------------
void initWiFi()
/* void initWiFi()
{
WiFi.mode(WIFI_STA);
WiFi.begin(SSID, PASSWORD);
@@ -353,7 +353,7 @@ void initWiFi()
delay(1000);
}
Serial.println(WiFi.localIP());
}
} */
//------------------------------------------------
//-------------------- Setup ---------------------