diff --git a/wled00/NodeStruct.h b/wled00/NodeStruct.h new file mode 100644 index 000000000..a0fd2f634 --- /dev/null +++ b/wled00/NodeStruct.h @@ -0,0 +1,34 @@ +#ifndef WLED_NODESTRUCT_H +#define WLED_NODESTRUCT_H + +/*********************************************************************************************\ +* NodeStruct from the ESP Easy project (https://github.com/letscontrolit/ESPEasy) +\*********************************************************************************************/ + +#include +#include + +#define NODE_TYPE_ID_UNDEFINED 0 +#define NODE_TYPE_ID_ESP8266 82 +#define NODE_TYPE_ID_ESP32 32 + +/*********************************************************************************************\ +* NodeStruct +\*********************************************************************************************/ +struct 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 NodesMap; + +#endif // WLED_NODESTRUCT_H diff --git a/wled00/const.h b/wled00/const.h index 757983326..aeb0e0ede 100644 --- a/wled00/const.h +++ b/wled00/const.h @@ -231,6 +231,13 @@ #define JSON_BUFFER_SIZE 16384 #endif +// Maximum size of node map (list of other WLED instances) +#ifdef ESP8266 + #define WLED_MAX_NODES 15 +#else + #define WLED_MAX_NODES 150 +#endif + //this is merely a default now and can be changed at runtime #ifndef LEDPIN #define LEDPIN 2 diff --git a/wled00/data/index.css b/wled00/data/index.css index 606d69709..0931cc8ca 100644 --- a/wled00/data/index.css +++ b/wled00/data/index.css @@ -90,9 +90,10 @@ button { #namelabel { position: fixed; - bottom: calc(var(--bh) + 5px); + bottom: calc(var(--bh) + 6px); right: 4px; color: var(--c-6); + cursor: pointer; writing-mode: vertical-rl; } @@ -366,10 +367,18 @@ button { z-index: 3; } -#rover { +#rover, #nodes { z-index: 2; } +#ndlt { + margin: 12px 0; +} + +.valtd i { + font-size: 14px; +} + #roverstar { position: fixed; top: calc(var(--th) + 5px); @@ -394,11 +403,15 @@ button { display: inline-block; } -#kv { +#kv, #kn { max-width: 490px; display: inline-block; } +#kn td { + padding-bottom: 12px; +} + #lv { max-width: 600px; display: inline-block; @@ -930,6 +943,12 @@ input[type=number]::-webkit-outer-spin-button { } } +@media all and (max-width: 770px) { + #buttonNodes { + display: none; + } +} + @media all and (max-width: 1249px) { #buttonPcm { display: none; diff --git a/wled00/data/index.htm b/wled00/data/index.htm index 9bdaae865..c981c9dfe 100644 --- a/wled00/data/index.htm +++ b/wled00/data/index.htm @@ -23,9 +23,10 @@ - + + - +

Brightness

@@ -66,17 +67,17 @@
-
-
-
-
-
-

-
-
-
-
-
R
+
+
+
+
+
+

+
+
+
+
+
R
@@ -169,7 +170,7 @@
-
+