init
This commit is contained in:
29
src/wifi_manager.h
Normal file
29
src/wifi_manager.h
Normal file
@@ -0,0 +1,29 @@
|
||||
#ifndef WIFI_MANAGER_H
|
||||
#define WIFI_MANAGER_H
|
||||
|
||||
#include <ESP8266WiFi.h>
|
||||
#include <EEPROM.h>
|
||||
#include "config.h"
|
||||
|
||||
class WiFiManager {
|
||||
private:
|
||||
String savedSSID;
|
||||
String savedPassword;
|
||||
bool isAPMode;
|
||||
|
||||
public:
|
||||
WiFiManager();
|
||||
bool begin();
|
||||
void setupAP();
|
||||
bool connectToWiFi(const String& ssid, const String& password);
|
||||
void saveWiFiCredentials(const String& ssid, const String& password);
|
||||
String loadWiFiSSID();
|
||||
String loadWiFiPassword();
|
||||
bool isConnected();
|
||||
bool isInAPMode();
|
||||
String getLocalIP();
|
||||
String getAPIP();
|
||||
void handleWiFiConnection();
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user