generate random mac address on first start
This commit is contained in:
@@ -2,11 +2,12 @@
|
||||
|
||||
#include "NetworkDevice.h"
|
||||
#include <Ethernet.h>
|
||||
#include <Preferences.h>
|
||||
|
||||
class W5500Device : public NetworkDevice
|
||||
{
|
||||
public:
|
||||
explicit W5500Device(const String& hostname);
|
||||
explicit W5500Device(const String& hostname, Preferences* _preferences);
|
||||
~W5500Device();
|
||||
|
||||
virtual void initialize();
|
||||
@@ -18,7 +19,11 @@ public:
|
||||
|
||||
private:
|
||||
void resetDevice();
|
||||
void initializeMacAddress(byte* mac);
|
||||
|
||||
EthernetClient* _ethClient = nullptr;
|
||||
PubSubClient* _mqttClient = nullptr;
|
||||
Preferences* _preferences = nullptr;
|
||||
|
||||
byte _mac[6];
|
||||
};
|
||||
Reference in New Issue
Block a user