mirror of
https://github.com/EyeTrackVR/OpenIris.git
synced 2025-11-04 15:39:42 +08:00
fix: bug in wifi config saving routine
- refactor lib - fix bug in wifi config logic - clean up
This commit is contained in:
parent
a9c6572b6c
commit
edf36aad15
@ -10,6 +10,36 @@
|
||||
}
|
||||
],
|
||||
"settings": {
|
||||
"cSpell.words": [
|
||||
"cctype",
|
||||
"cinttypes",
|
||||
"clocale",
|
||||
"cmath",
|
||||
"cstdarg",
|
||||
"cstddef",
|
||||
"cstdint",
|
||||
"cstdio",
|
||||
"cstdlib",
|
||||
"cstring",
|
||||
"cwchar",
|
||||
"cwctype",
|
||||
"deque",
|
||||
"ESPS",
|
||||
"fstream",
|
||||
"iomanip",
|
||||
"iosfwd",
|
||||
"iostream",
|
||||
"istream",
|
||||
"JTAG",
|
||||
"ostream",
|
||||
"sccb",
|
||||
"sstream",
|
||||
"stdexcept",
|
||||
"streambuf",
|
||||
"txpower",
|
||||
"typeinfo",
|
||||
"XIAO"
|
||||
],
|
||||
"files.associations": {
|
||||
"*.Rmd": "rmd",
|
||||
"array": "cpp",
|
||||
@ -64,7 +94,6 @@
|
||||
"cinttypes": "cpp",
|
||||
"typeinfo": "cpp",
|
||||
"iostream": "cpp"
|
||||
},
|
||||
"cSpell.words": ["ESPS", "JTAG", "sccb", "txpower", "XIAO"]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -280,7 +280,7 @@ void ProjectConfig::setWifiConfig(const std::string& networkName,
|
||||
|
||||
if (shouldNotify) {
|
||||
wifiStateManager.setState(WiFiState_e::WiFiState_Disconnected);
|
||||
WiFi.disconnect();
|
||||
//WiFi.disconnect();
|
||||
this->wifiConfigSave();
|
||||
this->notifyAll(ConfigState_e::networksConfigUpdated);
|
||||
}
|
||||
@ -309,7 +309,7 @@ void ProjectConfig::setWifiConfig(const std::string& networkName,
|
||||
|
||||
if (shouldNotify) {
|
||||
wifiStateManager.setState(WiFiState_e::WiFiState_None);
|
||||
WiFi.disconnect();
|
||||
//WiFi.disconnect();
|
||||
this->wifiConfigSave();
|
||||
this->notifyAll(ConfigState_e::networksConfigUpdated);
|
||||
}
|
||||
|
||||
20
ESP/lib/src/openiris.hpp
Normal file
20
ESP/lib/src/openiris.hpp
Normal file
@ -0,0 +1,20 @@
|
||||
#ifndef OPENIRIS_HPP
|
||||
#define OPENIRIS_HPP
|
||||
|
||||
#include <Arduino.h>
|
||||
|
||||
#include <data/config/project_config.hpp>
|
||||
#include <io/LEDManager/LEDManager.hpp>
|
||||
#include <io/camera/cameraHandler.hpp>
|
||||
#include <logo/logo.hpp>
|
||||
|
||||
#ifndef ETVR_EYE_TRACKER_USB_API
|
||||
#include <network/api/webserverHandler.hpp>
|
||||
#include <network/mDNS/MDNSManager.hpp>
|
||||
#include <network/stream/streamServer.hpp>
|
||||
#include <network/wifihandler/wifihandler.hpp>
|
||||
#else
|
||||
#include <usb/etvr_eye_tracker_usb.hpp>
|
||||
#endif // ETVR_EYE_TRACKER_WEB_API
|
||||
|
||||
#endif // OPENIRIS_HPP
|
||||
@ -1,18 +1,4 @@
|
||||
#include <Arduino.h>
|
||||
|
||||
#include <data/config/project_config.hpp>
|
||||
#include <io/LEDManager/LEDManager.hpp>
|
||||
#include <io/camera/cameraHandler.hpp>
|
||||
#include <logo/logo.hpp>
|
||||
|
||||
#ifndef ETVR_EYE_TRACKER_USB_API
|
||||
#include <network/api/webserverHandler.hpp>
|
||||
#include <network/mDNS/MDNSManager.hpp>
|
||||
#include <network/stream/streamServer.hpp>
|
||||
#include <network/wifihandler/wifihandler.hpp>
|
||||
#else
|
||||
#include <usb/etvr_eye_tracker_usb.hpp>
|
||||
#endif // ETVR_EYE_TRACKER_WEB_API
|
||||
#include <openiris.hpp>
|
||||
|
||||
/**
|
||||
* @brief ProjectConfig object
|
||||
|
||||
Loading…
Reference in New Issue
Block a user