mirror of
https://github.com/jomjol/AI-on-the-edge-device.git
synced 2025-12-14 15:36:56 +03:00
.
This commit is contained in:
@@ -10,7 +10,9 @@
|
||||
#include <sstream>
|
||||
#include <iostream>
|
||||
#include <string.h>
|
||||
#include "esp_log.h"
|
||||
|
||||
static const char *TAG = "read_wlanini";
|
||||
|
||||
std::vector<string> ZerlegeZeileWLAN(std::string input, std::string _delimiter = "")
|
||||
{
|
||||
@@ -55,7 +57,7 @@ void LoadWlanFromFile(std::string fn, char *&_ssid, char *&_password, char *&_ho
|
||||
fn = FormatFileName(fn);
|
||||
|
||||
pFile = OpenFileAndWait(fn.c_str(), "r");
|
||||
printf("file loaded\n");
|
||||
ESP_LOGD(TAG, "file loaded");
|
||||
|
||||
if (pFile == NULL)
|
||||
return;
|
||||
@@ -66,7 +68,7 @@ void LoadWlanFromFile(std::string fn, char *&_ssid, char *&_password, char *&_ho
|
||||
|
||||
while ((line.size() > 0) || !(feof(pFile)))
|
||||
{
|
||||
// printf("%s", line.c_str());
|
||||
// ESP_LOGD(TAG, "%s", line.c_str());
|
||||
zerlegt = ZerlegeZeileWLAN(line, "=");
|
||||
zerlegt[0] = trim(zerlegt[0], " ");
|
||||
|
||||
@@ -198,7 +200,7 @@ bool ChangeHostName(std::string fn, std::string _newhostname)
|
||||
fn = FormatFileName(fn);
|
||||
pFile = OpenFileAndWait(fn.c_str(), "r");
|
||||
|
||||
printf("file loaded\n");
|
||||
ESP_LOGD(TAG, "file loaded\n");
|
||||
|
||||
if (pFile == NULL)
|
||||
return false;
|
||||
@@ -248,7 +250,7 @@ bool ChangeHostName(std::string fn, std::string _newhostname)
|
||||
|
||||
fclose(pFile);
|
||||
|
||||
printf("*** Hostname update done ***\n");
|
||||
ESP_LOGD(TAG, "*** Hostname update done ***");
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user