Fixed led-ordering based on their indices

Former-commit-id: 835a9cede81fb717bf4862e318b673e9ebfb7cb5
This commit is contained in:
T. van der Zwan 2013-11-05 15:05:00 +00:00
parent f434b398c3
commit 263bf93e0f

View File

@ -147,6 +147,10 @@ LedString Hyperion::createLedString(const Json::Value& ledsConfig)
ledString.leds().push_back(led);
}
// Make sure the leds are sorted (on their indices)
std::sort(ledString.leds().begin(), ledString.leds().end(), [](const Led& lhs, const Led& rhs){ return lhs.index < rhs.index; });
return ledString;
}