mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Breaking Change: ledLayout, ledColorsStream (#614)
* Remove clone & index in ledConfig * Additional index correction * Rename ledsConfig maximum and minimum in max and min * Rename ledsConfig hscan and vscan with h and v * Optimize ledColorsStream * tiny correction
This commit is contained in:
@@ -1464,14 +1464,9 @@ void JsonAPI::streamLedcolorsUpdate(const std::vector<ColorRgb>& ledColors)
|
||||
QJsonObject result;
|
||||
QJsonArray leds;
|
||||
|
||||
for(auto color = ledColors.begin(); color != ledColors.end(); ++color)
|
||||
for(const auto & color : ledColors)
|
||||
{
|
||||
QJsonObject item;
|
||||
item["index"] = int(color - ledColors.begin());
|
||||
item["red"] = color->red;
|
||||
item["green"] = color->green;
|
||||
item["blue"] = color->blue;
|
||||
leds.append(item);
|
||||
leds << QJsonValue(color.red) << QJsonValue(color.green) << QJsonValue(color.blue);
|
||||
}
|
||||
|
||||
result["leds"] = leds;
|
||||
|
Reference in New Issue
Block a user