updated setValidValues() to return pointer to self

Allows for chaining methods.
This commit is contained in:
Gregg 2021-09-05 09:14:21 -05:00
parent 6a74ce9283
commit 946819f3d4
2 changed files with 4 additions and 2 deletions

View File

@ -1726,7 +1726,7 @@ unsigned long SpanCharacteristic::timeVal(){
///////////////////////////////
void SpanCharacteristic::setValidValues(int n, ...){
SpanCharacteristic *SpanCharacteristic::setValidValues(int n, ...){
char c[256];
String *s = new String("[");
va_list vl;
@ -1756,6 +1756,7 @@ void SpanCharacteristic::setValidValues(int n, ...){
}
homeSpan.configLog+=c;
return(this);
}
///////////////////////////////

View File

@ -275,7 +275,8 @@ struct SpanCharacteristic{
boolean updated(){return(isUpdated);} // returns isUpdated
unsigned long timeVal(); // returns time elapsed (in millis) since value was last updated
void setValidValues(int n, ...); // sets a list of 'n' valid values allowed for a Characteristic. Only applicable if format=uint8
SpanCharacteristic *setValidValues(int n, ...); // sets a list of 'n' valid values allowed for a Characteristic and returns pointer to self. Only applicable if format=uint8
String uvPrint(UVal &u){
char c[64];