mirror of
https://github.com/MrUnknownDE/OpenIris-ESPIDF.git
synced 2026-04-18 22:13:45 +02:00
Fix compilation issues, change ProjectConfig into a shared_ptr with updated definitions
// todo implement the API and missing features
This commit is contained in:
@@ -36,7 +36,7 @@ void WiFiManagerHelpers::event_handler(void *arg, esp_event_base_t event_base,
|
||||
}
|
||||
}
|
||||
|
||||
WiFiManager::WiFiManager(ProjectConfig &deviceConfig) : deviceConfig(deviceConfig) {}
|
||||
WiFiManager::WiFiManager(std::shared_ptr<ProjectConfig> deviceConfig) : deviceConfig(deviceConfig) {}
|
||||
|
||||
void WiFiManager::SetCredentials(const char *ssid, const char *password)
|
||||
{
|
||||
@@ -84,7 +84,7 @@ void WiFiManager::ConnectWithHardcodedCredentials()
|
||||
|
||||
void WiFiManager::ConnectWithStoredCredentials()
|
||||
{
|
||||
auto networks = this->deviceConfig.getWifiConfigs();
|
||||
auto networks = this->deviceConfig->getWifiConfigs();
|
||||
for (auto network : networks)
|
||||
{
|
||||
xEventGroupClearBits(s_wifi_event_group, WIFI_FAIL_BIT);
|
||||
|
||||
@@ -30,7 +30,7 @@ class WiFiManager
|
||||
{
|
||||
private:
|
||||
uint8_t channel;
|
||||
ProjectConfig &deviceConfig;
|
||||
std::shared_ptr<ProjectConfig> deviceConfig;
|
||||
wifi_init_config_t _wifi_init_cfg = WIFI_INIT_CONFIG_DEFAULT();
|
||||
wifi_config_t _wifi_cfg = {};
|
||||
|
||||
@@ -45,7 +45,7 @@ private:
|
||||
void SetupAccessPoint();
|
||||
|
||||
public:
|
||||
WiFiManager(ProjectConfig &deviceConfig);
|
||||
WiFiManager(std::shared_ptr<ProjectConfig> deviceConfig);
|
||||
void Begin();
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user