mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
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);
|
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;
|
return ledString;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user