mirror of
https://github.com/s00500/ESPUI.git
synced 2024-11-22 04:00:55 +00:00
Merge pull request #42 from don41382/patch-2
udpateSlider implementation with label was missing
This commit is contained in:
commit
980e20818f
@ -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