mirror of
https://github.com/EyeTrackVR/OpenIris.git
synced 2025-11-04 15:39:42 +08:00
update
- Fix potential bug in config read and write after 10 iterations through the for loop
This commit is contained in:
parent
9b965c224b
commit
3c1f3312e7
@ -74,6 +74,11 @@ void ProjectConfig::wifiConfigSave()
|
|||||||
putString(ssid.c_str(), this->config.networks[i].ssid.c_str());
|
putString(ssid.c_str(), this->config.networks[i].ssid.c_str());
|
||||||
putString(password.c_str(), this->config.networks[i].password.c_str());
|
putString(password.c_str(), this->config.networks[i].password.c_str());
|
||||||
putInt(channel.c_str(), this->config.networks[i].channel);
|
putInt(channel.c_str(), this->config.networks[i].channel);
|
||||||
|
|
||||||
|
name = "name";
|
||||||
|
ssid = "ssid";
|
||||||
|
password = "pass";
|
||||||
|
channel = "channel";
|
||||||
}
|
}
|
||||||
|
|
||||||
/* AP Config */
|
/* AP Config */
|
||||||
@ -145,6 +150,11 @@ void ProjectConfig::load()
|
|||||||
const std::string &temp_3 = getString(password.c_str()).c_str();
|
const std::string &temp_3 = getString(password.c_str()).c_str();
|
||||||
uint8_t temp_4 = getUInt(channel.c_str());
|
uint8_t temp_4 = getUInt(channel.c_str());
|
||||||
|
|
||||||
|
name = "name";
|
||||||
|
ssid = "ssid";
|
||||||
|
password = "pass";
|
||||||
|
channel = "channel";
|
||||||
|
|
||||||
//! push_back creates a copy of the object, so we need to use emplace_back
|
//! push_back creates a copy of the object, so we need to use emplace_back
|
||||||
this->config.networks.emplace_back(
|
this->config.networks.emplace_back(
|
||||||
temp_1,
|
temp_1,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user