mirror of
https://github.com/s00500/ESPUI.git
synced 2024-11-22 09:10:54 +00:00
udpateSlider implementation with label was missing
This commit is contained in:
parent
a56f5decc7
commit
e9aca78c9c
@ -492,6 +492,16 @@ void ESPUIClass::updateSlider(int id, int nValue, int clientId) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ESPUIClass::updateSlider(String label, int nValue, int clientId) {
|
||||||
|
if (!labelExists(label)) {
|
||||||
|
if (DEBUG_ESPUI)
|
||||||
|
Serial.println("UI ERROR: Element does not " + String(label) +
|
||||||
|
" exist, cannot update!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
updateSlider(getIdByLabel(label), nValue, clientId);
|
||||||
|
}
|
||||||
|
|
||||||
void ESPUIClass::updateSwitcher(int id, bool nValue, int clientId) {
|
void ESPUIClass::updateSwitcher(int id, bool nValue, int clientId) {
|
||||||
if (id < cIndex && controls[id]->type == UI_SWITCHER) {
|
if (id < cIndex && controls[id]->type == UI_SWITCHER) {
|
||||||
controls[id]->value = nValue ? 1 : 0;
|
controls[id]->value = nValue ? 1 : 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user