fix W5500 reconnect

This commit is contained in:
technyon
2022-04-30 19:59:07 +02:00
parent d38ed9b983
commit 490bff20c5
8 changed files with 84 additions and 13 deletions

View File

@@ -11,8 +11,11 @@ public:
~W5500Device();
virtual void initialize();
virtual bool reconnect();
virtual void reconfigure();
virtual void update();
virtual bool isConnected();
virtual PubSubClient *mqttClient();
@@ -20,10 +23,16 @@ public:
private:
void resetDevice();
void initializeMacAddress(byte* mac);
void nwDelay(unsigned long ms);
bool _fromTask = false;
EthernetClient* _ethClient = nullptr;
PubSubClient* _mqttClient = nullptr;
Preferences* _preferences = nullptr;
int _maintainResult = 0;
bool _hasDHCPAddress = false;
byte _mac[6];
};