Autodiscovery improvements

This commit is contained in:
cschwinne
2021-03-09 16:23:19 +01:00
parent 6c997f573a
commit ea3358ecb2
8 changed files with 165 additions and 162 deletions

View File

@@ -1,5 +1,5 @@
#ifndef DATASTRUCTS_NODESTRUCT_H
#define DATASTRUCTS_NODESTRUCT_H
#ifndef WLED_NODESTRUCT_H
#define WLED_NODESTRUCT_H
/*********************************************************************************************\
* NodeStruct from the ESP Easy project (https://github.com/letscontrolit/ESPEasy)
@@ -8,27 +8,27 @@
#include <map>
#include <IPAddress.h>
#define NODE_TYPE_ID_UNDEFINED 0
#define NODE_TYPE_ID_ESP8266 1
#define NODE_TYPE_ID_ESP32 2
String getNodeTypeDisplayString(uint8_t nodeType);
#define NODE_TYPE_ID_ESP8266 8266
#define NODE_TYPE_ID_ESP32 32
/*********************************************************************************************\
* NodeStruct
\*********************************************************************************************/
struct NodeStruct
{
NodeStruct();
String nodeName;
IPAddress ip;
uint8_t unit;
uint8_t age;
uint8_t nodeType;
uint32_t build;
NodeStruct() : age(0), nodeType(0), build(0)
{
for (uint8_t i = 0; i < 4; ++i) { ip[i] = 0; }
}
};
typedef std::map<uint8_t, NodeStruct> NodesMap;
#endif // DATASTRUCTS_NODESTRUCT_H
#endif // WLED_NODESTRUCT_H