Add DiyProIndoorV4_2.ino example

This commit is contained in:
Phat Nguyen
2024-06-15 15:40:50 +07:00
parent 227a4f76f7
commit bd237ed95d
14 changed files with 1214 additions and 78 deletions

View File

@ -12,13 +12,10 @@
class WifiConnector : public PrintLog {
private:
AirGradient *ag;
#ifdef ESP32
OledDisplay &disp;
StateMachine &sm;
Configuration &config;
#else
void displayShowText(String ln1, String ln2, String ln3);
#endif
String ssid;
void *wifi = NULL;
bool hasConfig;
@ -30,23 +27,21 @@ private:
public:
void setAirGradient(AirGradient *ag);
#ifdef ESP32
WifiConnector(OledDisplay &disp, Stream &log, StateMachine &sm, Configuration& config);
#else
WifiConnector(Stream &log);
#ifdef ESP8266
// WifiConnector(Stream &log);
#endif
~WifiConnector();
bool connect(void);
void disconnect(void);
void handle(void);
#ifdef ESP32
void _wifiApCallback(void);
void _wifiSaveConfig(void);
void _wifiSaveParamCallback(void);
bool _wifiConfigPortalActive(void);
void _wifiTimeoutCallback(void);
#endif
void _wifiProcess();
bool isConnected(void);
void reset(void);