mirror of
https://github.com/jomjol/AI-on-the-edge-device.git
synced 2025-12-10 05:26:52 +03:00
Update WLAN
This commit is contained in:
@@ -29,11 +29,18 @@ A 3d-printable housing can be found here: https://www.thingiverse.com/thing:4571
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
##### Rolling - (2020-09-10)
|
##### Rolling - (2020-09-11)
|
||||||
|
|
||||||
|
* Support of spaces in WLan SSID or password
|
||||||
|
|
||||||
|
2020-09-10
|
||||||
|
|
||||||
* Optimization of "DELETE ALL" - Autoreload of directory after delete, protection of wlan.ini
|
* Optimization of "DELETE ALL" - Autoreload of directory after delete, protection of wlan.ini
|
||||||
|
|
||||||
* Internal Optimization (removal of unnessary error messages, restructure CTfLiteClass)
|
* Internal Optimization (removal of unnessary error messages, restructure CTfLiteClass)
|
||||||
|
|
||||||
* additional parameter in `wasserzahler.html?noerror=true` to suppress an potential error message in case of consitency check (is equal to `ErrorMessage` = False in `config.ini`)
|
* additional parameter in `wasserzahler.html?noerror=true` to suppress an potential error message in case of consitency check (is equal to `ErrorMessage` = False in `config.ini`)
|
||||||
|
|
||||||
* update ROI-configurator, in case of no ROIs defined
|
* update ROI-configurator, in case of no ROIs defined
|
||||||
|
|
||||||
2020-09-09
|
2020-09-09
|
||||||
|
|||||||
@@ -28,10 +28,13 @@ static EventGroupHandle_t wifi_event_group;
|
|||||||
#define BLINK_GPIO GPIO_NUM_33
|
#define BLINK_GPIO GPIO_NUM_33
|
||||||
|
|
||||||
|
|
||||||
std::vector<string> ZerlegeZeile(std::string input)
|
std::vector<string> ZerlegeZeile(std::string input, std::string _delimiter = "")
|
||||||
{
|
{
|
||||||
std::vector<string> Output;
|
std::vector<string> Output;
|
||||||
std::string delimiter = " =,";
|
std::string delimiter = " =,";
|
||||||
|
if (_delimiter.length() > 0){
|
||||||
|
delimiter = _delimiter;
|
||||||
|
}
|
||||||
|
|
||||||
input = trim(input, delimiter);
|
input = trim(input, delimiter);
|
||||||
size_t pos = findDelimiterPos(input, delimiter);
|
size_t pos = findDelimiterPos(input, delimiter);
|
||||||
@@ -140,11 +143,21 @@ void LoadWlanFromFile(std::string fn, std::string &_ssid, std::string &_passphra
|
|||||||
while ((line.size() > 0) || !(feof(pFile)))
|
while ((line.size() > 0) || !(feof(pFile)))
|
||||||
{
|
{
|
||||||
// printf("%s", line.c_str());
|
// printf("%s", line.c_str());
|
||||||
zerlegt = ZerlegeZeile(line);
|
zerlegt = ZerlegeZeile(line, "=");
|
||||||
if ((zerlegt.size() > 1) && (toUpper(zerlegt[0]) == "SSID"))
|
zerlegt[0] = trim(zerlegt[0], " ");
|
||||||
|
zerlegt[1] = trim(zerlegt[1], " ");
|
||||||
|
if ((zerlegt.size() > 1) && (toUpper(zerlegt[0]) == "SSID")){
|
||||||
_ssid = zerlegt[1];
|
_ssid = zerlegt[1];
|
||||||
if ((zerlegt.size() > 1) && (toUpper(zerlegt[0]) == "PASSWORD"))
|
if ((_ssid[0] == '"') && (_ssid[_ssid.length()-1] == '"')){
|
||||||
|
_ssid = _ssid.substr(1, _ssid.length()-2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ((zerlegt.size() > 1) && (toUpper(zerlegt[0]) == "PASSWORD")){
|
||||||
_passphrase = zerlegt[1];
|
_passphrase = zerlegt[1];
|
||||||
|
if ((_passphrase[0] == '"') && (_passphrase[_passphrase.length()-1] == '"')){
|
||||||
|
_passphrase = _passphrase.substr(1, _passphrase.length()-2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (fgets(zw, 1024, pFile) == NULL)
|
if (fgets(zw, 1024, pFile) == NULL)
|
||||||
{
|
{
|
||||||
|
|||||||
Binary file not shown.
@@ -1,2 +1,2 @@
|
|||||||
ssid = SSID
|
ssid = "SSID"
|
||||||
password = PASSWORD
|
password = "PASSWORD"
|
||||||
Reference in New Issue
Block a user