Add mandatory refresh capability to remove type dependency.
This commit is contained in:
@@ -830,7 +830,7 @@ static String LEDTypesToJson(const std::vector<LEDType>& types) {
|
||||
String json;
|
||||
for (const auto &type : types) {
|
||||
// capabilities follows similar pattern as JSON API
|
||||
int capabilities = Bus::hasRGB(type.id) | Bus::hasWhite(type.id)<<1 | Bus::hasCCT(type.id)<<2 | Bus::is16bit(type.id)<<4;
|
||||
int capabilities = Bus::hasRGB(type.id) | Bus::hasWhite(type.id)<<1 | Bus::hasCCT(type.id)<<2 | Bus::is16bit(type.id)<<4 | Bus::mustRefresh(type.id)<<5;
|
||||
char str[256];
|
||||
sprintf_P(str, PSTR("{i:%d,c:%d,t:\"%s\",n:\"%s\"},"), type.id, capabilities, type.type, type.name);
|
||||
json += str;
|
||||
|
||||
Reference in New Issue
Block a user