clarifying method/variable/class names

This commit is contained in:
Phat Nguyen
2024-04-07 16:39:01 +07:00
parent 9a03fb2bd7
commit 4577082731
21 changed files with 1372 additions and 1279 deletions

View File

@ -1,5 +1,3 @@
#ifdef ESP32
#ifndef _AG_WIFI_CONNECTOR_H_
#define _AG_WIFI_CONNECTOR_H_
@ -10,11 +8,15 @@
#include <Arduino.h>
class AgWiFiConnector : public PrintLog {
class WifiConnector : public PrintLog {
private:
AirGradient *ag;
AgOledDisplay &disp;
AgStateMachine &sm;
#ifdef ESP32
OledDisplay &disp;
StateMachine &sm;
#else
void displayShowText(String ln1, String ln2, String ln3);
#endif
String ssid;
void *wifi = NULL;
bool hasConfig;
@ -23,17 +25,23 @@ private:
bool wifiClientConnected(void);
public:
AgWiFiConnector(AgOledDisplay &disp, Stream &log, AgStateMachine &sm);
~AgWiFiConnector();
void setAirGradient(AirGradient *ag);
#ifdef ESP32
WifiConnector(OledDisplay &disp, Stream &log, StateMachine &sm);
#else
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);
#endif
void _wifiProcess();
bool isConnected(void);
void reset(void);
@ -42,6 +50,3 @@ public:
};
#endif /** _AG_WIFI_CONNECTOR_H_ */
#endif