web username and password
This commit is contained in:
parent
19cfaf6cba
commit
daaabe5f26
4 changed files with 119 additions and 2 deletions
|
@ -3,8 +3,15 @@
|
|||
#include <ESPAsyncWebServer.h>
|
||||
#include <ESPMegaIoT.hpp>
|
||||
#include <Update.h>
|
||||
#include <FRAM.h>
|
||||
#include <html/all.h>
|
||||
|
||||
|
||||
/**
|
||||
* @brief Provides a web server for ESPMegaPRO
|
||||
*
|
||||
* This class use FRAM address 301-400
|
||||
*/
|
||||
class ESPMegaWebServer
|
||||
{
|
||||
public:
|
||||
|
@ -12,7 +19,20 @@ class ESPMegaWebServer
|
|||
~ESPMegaWebServer();
|
||||
void begin();
|
||||
void loop();
|
||||
void resetCredentials();
|
||||
char* getWebUsername();
|
||||
char* getWebPassword();
|
||||
void setWebUsername(const char* username);
|
||||
void setWebPassword(const char* password);
|
||||
void bindFRAM(FRAM *fram);
|
||||
void loadCredentialsFromFRAM();
|
||||
void saveCredentialsToFRAM();
|
||||
private:
|
||||
// FRAM
|
||||
FRAM *fram;
|
||||
// Credentials
|
||||
char webUsername[32];
|
||||
char webPassword[32];
|
||||
// Web Server
|
||||
AsyncWebServer *server;
|
||||
uint16_t port;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue