mirror of
https://github.com/thooge/esp32-nmea2000-obp60.git
synced 2025-12-16 15:33:05 +01:00
intermediate: move to ldf none mode
This commit is contained in:
30
lib/gwwifi/GWWifi.h
Normal file
30
lib/gwwifi/GWWifi.h
Normal file
@@ -0,0 +1,30 @@
|
||||
#ifndef _GWWIFI_H
|
||||
#define _GWWIFI_H
|
||||
#include <WiFi.h>
|
||||
#include <GWConfig.h>
|
||||
class GwWifi{
|
||||
private:
|
||||
const GwConfigHandler *config;
|
||||
GwLog *logger;
|
||||
const GwConfigInterface *wifiClient;
|
||||
const GwConfigInterface *wifiSSID;
|
||||
const GwConfigInterface *wifiPass;
|
||||
bool connectInternal();
|
||||
long lastConnectStart=0;
|
||||
unsigned long lastApAccess=0;
|
||||
unsigned long apShutdownTime=0;
|
||||
bool apActive=false;
|
||||
bool fixedApPass=true;
|
||||
bool clientIsConnected=false;
|
||||
public:
|
||||
const char *AP_password = "esp32nmea2k";
|
||||
GwWifi(const GwConfigHandler *config,GwLog *log, bool fixedApPass=true);
|
||||
void setup();
|
||||
void loop();
|
||||
bool clientConnected();
|
||||
bool connectClient();
|
||||
String apIP();
|
||||
bool isApActive(){return apActive;}
|
||||
bool isClientActive(){return wifiClient->asBoolean();}
|
||||
};
|
||||
#endif
|
||||
Reference in New Issue
Block a user