-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b7799b4
commit bfddd26
Showing
7 changed files
with
99 additions
and
193 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#include <StatefulService.h> | ||
#include <stateful_service_endpoint.h> | ||
#include <FSPersistence.h> | ||
#include <ap_settings.h> | ||
#include <timing.h> | ||
#include <WiFi.h> | ||
|
||
class APService : public StatefulService<APSettings> { | ||
public: | ||
APService(); | ||
~APService(); | ||
|
||
void begin(); | ||
void loop(); | ||
void recoveryMode(); | ||
|
||
esp_err_t getStatus(PsychicRequest *request); | ||
void status(JsonObject &root); | ||
APNetworkStatus getAPNetworkStatus(); | ||
|
||
StatefulHttpEndpoint<APSettings> endpoint; | ||
|
||
private: | ||
PsychicHttpServer *_server; | ||
FSPersistence<APSettings> _fsPersistence; | ||
|
||
DNSServer *_dnsServer; | ||
|
||
volatile unsigned long _lastManaged; | ||
volatile boolean _reconfigureAp; | ||
volatile boolean _recoveryMode = false; | ||
|
||
void reconfigureAP(); | ||
void manageAP(); | ||
void startAP(); | ||
void stopAP(); | ||
void handleDNS(); | ||
}; |
Oops, something went wrong.