提交 12c858d4 authored 作者: blu's avatar blu

new feature: evwifi

上级 a1553883
...@@ -64,6 +64,8 @@ class WifiMgr { ...@@ -64,6 +64,8 @@ class WifiMgr {
ret["code"] = 0; ret["code"] = 0;
ret["msg"] = "ok"; ret["msg"] = "ok";
this->mode1Cnt = 0;
if( mode == 1) { if( mode == 1) {
// ap // ap
this->mode = 1; this->mode = 1;
...@@ -197,7 +199,7 @@ class WifiMgr { ...@@ -197,7 +199,7 @@ class WifiMgr {
regex passwdReg(password); regex passwdReg(password);
std::smatch results; std::smatch results;
while (getline (wpaCfgFile,line)) while (getline(wpaCfgFile,line))
{ {
if (regex_match(line, results, ssidReg)) { if (regex_match(line, results, ssidReg)) {
if (results.size() == 2) { if (results.size() == 2) {
...@@ -209,12 +211,11 @@ class WifiMgr { ...@@ -209,12 +211,11 @@ class WifiMgr {
this->wifiData["wifi"]["password"] = results[1].str(); this->wifiData["wifi"]["password"] = results[1].str();
flag++; flag++;
} }
} }
} }
wpaCfgFile.close(); wpaCfgFile.close();
} }
if(flag == 2) { if(flag == 2) {
spdlog::info("evwifi {} maybe crashed before, try connect wifi", this->devSn); spdlog::info("evwifi {} maybe crashed before, try connect wifi", this->devSn);
this->enableMode(2); this->enableMode(2);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论