mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
Check type case insensitive
Former-commit-id: 07cebb35933bba53012b7f05bc467f11a28bcc8c
This commit is contained in:
parent
d2738ef5f6
commit
d07ddc8009
@ -1,3 +1,6 @@
|
||||
// stl includes
|
||||
#include <cctype>
|
||||
#include <algorithm>
|
||||
|
||||
// Bootsequence includes
|
||||
#include <bootsequence/BootSequenceFactory.h>
|
||||
@ -8,7 +11,8 @@
|
||||
|
||||
BootSequence * BootSequenceFactory::createBootSequence(Hyperion * hyperion, const Json::Value & jsonConfig)
|
||||
{
|
||||
const std::string type = jsonConfig["type"].asString();
|
||||
std::string type = jsonConfig["type"].asString();
|
||||
std::transform(type.begin(), type.end(), type.begin(), std::tolower);
|
||||
|
||||
if (type == "none")
|
||||
{
|
||||
@ -19,7 +23,7 @@ BootSequence * BootSequenceFactory::createBootSequence(Hyperion * hyperion, cons
|
||||
const unsigned duration_ms = jsonConfig["duration_ms"].asUInt();
|
||||
return new RainbowBootSequence(hyperion, duration_ms);
|
||||
}
|
||||
else if (type == "knightrider")
|
||||
else if (type == "knightrider" || type == "knight rider")
|
||||
{
|
||||
const unsigned duration_ms = jsonConfig["duration_ms"].asUInt();
|
||||
return new KittBootSequence(hyperion, duration_ms);
|
||||
|
Loading…
Reference in New Issue
Block a user