diff --git a/src/ESPUIcontrol.cpp b/src/ESPUIcontrol.cpp index 309fa61..e348553 100644 --- a/src/ESPUIcontrol.cpp +++ b/src/ESPUIcontrol.cpp @@ -1,11 +1,11 @@ #include "ESPUI.h" -static uint16_t idCounter = 0; static const String ControlError = "*** ESPUI ERROR: Could not transfer control ***"; -Control::Control(Control::Type type, const char* label, std::function callback, - const String& value, Control::Color color, bool visible, uint16_t parentControl) - : type(type), +Control::Control(Control::ControlId_t id, Control::Type type, const char* label, std::function callback, + const String& value, Control::Color color, bool visible, ControlId_t parentControl) + : id(id), + type(type), label(label), callback(callback), value(value), @@ -14,24 +14,21 @@ Control::Control(Control::Type type, const char* label, std::function