Fixed led-ordering based on their indices
Former-commit-id: 835a9cede81fb717bf4862e318b673e9ebfb7cb5
This commit is contained in:
parent
f434b398c3
commit
263bf93e0f
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue