V14.1 backport to rolling (#2058)

* Migrate parameters to v14.1 branch (#2023)

* Migrated parameters

* -

* .

* .

* .

* .

* .

* Remove unneeded checkboxes for true/false

* Remove ";"

* Correct MaintTopic

* Added missing parameters to UI: FlipImageSize, InitialMirror
Removed checkbox in UI for ErrorMessage
Added migration of pboolean parameters: enable them if they where disabled, set them to their default value, then enable them
Switch SetRetainFlag internally to a boolean

* .

* CamImages -> RawImages

* CamImages -> RawImages

* catch error on unknown parameter

* fix missing case insensitivity

* fix typo

* fixmissing rename

* fix migration of ExtendedResolution

* Delete ClassFlowMakeImage.cpp

* Delete ClassFlowMakeImage.h

---------

Co-authored-by: CaCO3 <caco@ruinelli.ch>
Co-authored-by: jomjol <30766535+jomjol@users.noreply.github.com>

* Update Changelog.md

---------

Co-authored-by: CaCO3 <caco@ruinelli.ch>
Co-authored-by: jomjol <30766535+jomjol@users.noreply.github.com>
This commit is contained in:
CaCO3
2023-02-21 23:18:24 +01:00
committed by GitHub
parent 3d92860c5e
commit 025f4af9f2
32 changed files with 658 additions and 394 deletions

View File

@@ -63,7 +63,7 @@ std::string hostname = "";
std::string std_hostname = "watermeter";
std::string ipadress = "";
std::string ssid = "";
int RSSIThreashold;
int RSSIThreshold;
/////////////////////////////////
/////////////////////////////////
@@ -403,9 +403,9 @@ void strinttoip4(const char *ip, int &a, int &b, int &c, int &d) {
}
void wifi_init_sta(const char *_ssid, const char *_password, const char *_hostname, const char *_ipadr, const char *_gw, const char *_netmask, const char *_dns, int _rssithreashold)
void wifi_init_sta(const char *_ssid, const char *_password, const char *_hostname, const char *_ipadr, const char *_gw, const char *_netmask, const char *_dns, int _rssithreshold)
{
RSSI_Threshold = _rssithreashold;
RSSI_Threshold = _rssithreshold;
s_wifi_event_group = xEventGroupCreate();
ESP_ERROR_CHECK(esp_netif_init());

View File

@@ -5,7 +5,7 @@
#include <string>
void wifi_init_sta(const char *_ssid, const char *_password, const char *_hostname, const char *_ipadr, const char *_gw, const char *_netmask, const char *_dns, int _rssithreashold);
void wifi_init_sta(const char *_ssid, const char *_password, const char *_hostname, const char *_ipadr, const char *_gw, const char *_netmask, const char *_dns, int _rssithreshold);
void wifi_init_sta(const char *_ssid, const char *_password, const char *_hostname);
void wifi_init_sta(const char *_ssid, const char *_password);
@@ -17,6 +17,6 @@ void WIFIDestroy();
extern std::string hostname;
extern std::string std_hostname;
extern int RSSIThreashold;
extern int RSSIThreshold;
#endif //CONNECT_WLAN_H

View File

@@ -41,7 +41,7 @@ std::vector<string> ZerlegeZeileWLAN(std::string input, std::string _delimiter =
bool LoadWlanFromFile(std::string fn, char *&_ssid, char *&_password, char *&_hostname, char *&_ipadr, char *&_gw, char *&_netmask, char *&_dns, int &_rssithreashold)
bool LoadWlanFromFile(std::string fn, char *&_ssid, char *&_password, char *&_hostname, char *&_ipadr, char *&_gw, char *&_netmask, char *&_dns, int &_rssithreshold)
{
std::string ssid = "";
std::string passphrase = "";
@@ -91,7 +91,7 @@ bool LoadWlanFromFile(std::string fn, char *&_ssid, char *&_password, char *&_ho
}
}
if ((splitted.size() > 1) && (toUpper(splitted[0]) == "RSSITHREASHOLD")){
if ((splitted.size() > 1) && (toUpper(splitted[0]) == "RSSITHRESHOLD")){
string _s = trim(splitted[1]);
if ((_s[0] == '"') && (_s[_s.length()-1] == '"')){
_s = _s.substr(1, ssid.length()-2);
@@ -194,8 +194,8 @@ bool LoadWlanFromFile(std::string fn, char *&_ssid, char *&_password, char *&_ho
else
_dns = NULL;
_rssithreashold = rssithreshold;
RSSIThreashold = rssithreshold;
_rssithreshold = rssithreshold;
RSSIThreshold = rssithreshold;
return true;
}
@@ -274,9 +274,9 @@ bool ChangeHostName(std::string fn, std::string _newhostname)
}
bool ChangeRSSIThreashold(std::string fn, int _newrssithreashold)
bool ChangeRSSIThreshold(std::string fn, int _newrssithreshold)
{
if (RSSIThreashold == _newrssithreashold)
if (RSSIThreshold == _newrssithreshold)
return false;
string line = "";
@@ -305,8 +305,8 @@ bool ChangeRSSIThreashold(std::string fn, int _newrssithreashold)
splitted = ZerlegeZeileWLAN(line, "=");
splitted[0] = trim(splitted[0], " ");
if ((splitted.size() > 1) && (toUpper(splitted[0]) == "RSSITHREASHOLD")){
line = "RSSIThreashold = " + to_string(_newrssithreashold) + "\n";
if ((splitted.size() > 1) && (toUpper(splitted[0]) == "RSSITHRESHOLD")){
line = "RSSIThreshold = " + to_string(_newrssithreshold) + "\n";
found = true;
}
@@ -324,7 +324,7 @@ bool ChangeRSSIThreashold(std::string fn, int _newrssithreashold)
if (!found)
{
line = "RSSIThreashold = " + to_string(_newrssithreashold) + "\n";
line = "RSSIThreshold = " + to_string(_newrssithreshold) + "\n";
neuesfile.push_back(line);
}
@@ -340,7 +340,7 @@ bool ChangeRSSIThreashold(std::string fn, int _newrssithreashold)
fclose(pFile);
ESP_LOGD(TAG, "*** RSSIThreashold update done ***");
ESP_LOGD(TAG, "*** RSSIThreshold update done ***");
return true;
}

View File

@@ -5,10 +5,10 @@
#include <string>
bool LoadWlanFromFile(std::string fn, char *&_ssid, char *&_password, char *&_hostname, char *&_ipadr, char *&_gw, char *&_netmask, char *&_dns, int &_rssithreashold);
bool LoadWlanFromFile(std::string fn, char *&_ssid, char *&_password, char *&_hostname, char *&_ipadr, char *&_gw, char *&_netmask, char *&_dns, int &_rssithreshold);
bool ChangeHostName(std::string fn, std::string _newhostname);
bool ChangeRSSIThreashold(std::string fn, int _newrssithreashold);
bool ChangeRSSIThreshold(std::string fn, int _newrssithreshold);
#endif //READ_WLANINI_H