1
0
mirror of https://github.com/s00500/ESPUI.git synced 2024-11-25 14:10:54 +00:00

Closes #11 Bugfix for retrun values on error

This commit is contained in:
Lukas Bachschwell 2018-05-13 19:39:21 +02:00
parent 40b13430cb
commit cc633a7c85

View File

@ -257,7 +257,7 @@ int ESPUIClass::label(const char *label, int color, String value) {
if (debug)
Serial.println("UI ERROR: Element " + String(label) +
" exists, skipping creating element!");
return;
return -1;
}
Control *newL = new Control();
@ -282,7 +282,7 @@ int ESPUIClass::slider(const char *label, void (*callBack)(Control, int),
if (debug)
Serial.println("UI ERROR: Element " + String(label) +
" exists, skipping creating element!");
return;
return -1;
}
Control *newSL = new Control();
@ -306,7 +306,7 @@ int ESPUIClass::button(const char *label, void (*callBack)(Control, int),
if (debug)
Serial.println("UI ERROR: Element " + String(label) +
" exists, skipping creating element!");
return;
return -1;
}
Control *newB = new Control();
@ -332,7 +332,7 @@ int ESPUIClass::switcher(const char *label, bool startState,
if (debug)
Serial.println("UI ERROR: Element " + String(label) +
" exists, skipping creating element!");
return;
return -1;
}
Control *newS = new Control();
@ -353,7 +353,7 @@ int ESPUIClass::pad(const char *label, bool center,
if (debug)
Serial.println("UI ERROR: Element " + String(label) +
" exists, skipping creating element!");
return;
return -1;
}
Control *newP = new Control();