Added setDescription(const char *) method to SpanCharacteristic
This allows you to add an optional "description" to a Characteristic. This is not the same as the name of a Service and is generally not used by the Home App. However, it appears to be consumed by the Eve app, which can be helpful in some circumstances when developing custom characteristics.
This commit is contained in:
parent
0aba248888
commit
715adf44f1
|
|
@ -601,6 +601,12 @@ struct SpanCharacteristic{
|
|||
return(setPerms(perms&(~dPerms)));
|
||||
}
|
||||
|
||||
SpanCharacteristic *setDescription(const char *c){
|
||||
desc = (char *)realloc(desc, strlen(c) + 1);
|
||||
strcpy(desc, c);
|
||||
return(this);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
///////////////////////////////
|
||||
|
|
|
|||
Loading…
Reference in New Issue