mirror of
https://github.com/s00500/ESPUI.git
synced 2024-11-22 09:10:54 +00:00
Closes #11 Bugfix for retrun values on error
This commit is contained in:
parent
40b13430cb
commit
cc633a7c85
@ -257,7 +257,7 @@ int ESPUIClass::label(const char *label, int color, String value) {
|
|||||||
if (debug)
|
if (debug)
|
||||||
Serial.println("UI ERROR: Element " + String(label) +
|
Serial.println("UI ERROR: Element " + String(label) +
|
||||||
" exists, skipping creating element!");
|
" exists, skipping creating element!");
|
||||||
return;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
Control *newL = new Control();
|
Control *newL = new Control();
|
||||||
@ -282,7 +282,7 @@ int ESPUIClass::slider(const char *label, void (*callBack)(Control, int),
|
|||||||
if (debug)
|
if (debug)
|
||||||
Serial.println("UI ERROR: Element " + String(label) +
|
Serial.println("UI ERROR: Element " + String(label) +
|
||||||
" exists, skipping creating element!");
|
" exists, skipping creating element!");
|
||||||
return;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
Control *newSL = new Control();
|
Control *newSL = new Control();
|
||||||
@ -306,7 +306,7 @@ int ESPUIClass::button(const char *label, void (*callBack)(Control, int),
|
|||||||
if (debug)
|
if (debug)
|
||||||
Serial.println("UI ERROR: Element " + String(label) +
|
Serial.println("UI ERROR: Element " + String(label) +
|
||||||
" exists, skipping creating element!");
|
" exists, skipping creating element!");
|
||||||
return;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
Control *newB = new Control();
|
Control *newB = new Control();
|
||||||
@ -332,7 +332,7 @@ int ESPUIClass::switcher(const char *label, bool startState,
|
|||||||
if (debug)
|
if (debug)
|
||||||
Serial.println("UI ERROR: Element " + String(label) +
|
Serial.println("UI ERROR: Element " + String(label) +
|
||||||
" exists, skipping creating element!");
|
" exists, skipping creating element!");
|
||||||
return;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
Control *newS = new Control();
|
Control *newS = new Control();
|
||||||
@ -353,7 +353,7 @@ int ESPUIClass::pad(const char *label, bool center,
|
|||||||
if (debug)
|
if (debug)
|
||||||
Serial.println("UI ERROR: Element " + String(label) +
|
Serial.println("UI ERROR: Element " + String(label) +
|
||||||
" exists, skipping creating element!");
|
" exists, skipping creating element!");
|
||||||
return;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
Control *newP = new Control();
|
Control *newP = new Control();
|
||||||
|
Loading…
Reference in New Issue
Block a user