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:
brindosch
2019-08-25 16:32:19 +02:00
committed by GitHub
parent 24495bbc65
commit b1fa085d64
11 changed files with 466 additions and 624 deletions

View File

@@ -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;