This repository was archived by the owner on May 6, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +21
-4
lines changed Expand file tree Collapse file tree 1 file changed +21
-4
lines changed Original file line number Diff line number Diff line change @@ -112,14 +112,31 @@ int main(int argc, char** argv)
112
112
const std::string effectName = effectConfig[" effect" ].asString ();
113
113
const unsigned duration_ms = effectConfig[" duration_ms" ].asUInt ();
114
114
const int priority = 0 ;
115
-
116
- if (hyperion. setEffect (effectName, priority, duration_ms) == 0 )
115
+
116
+ if (effectConfig. isMember ( " args " ) )
117
117
{
118
- std::cout << " Boot sequence(" << effectName << " ) created and started" << std::endl;
118
+ const Json::Value effectConfigArgs = effectConfig[" args" ];
119
+ if (hyperion.setEffect (effectName, effectConfigArgs, priority, duration_ms) == 0 )
120
+ {
121
+ std::cout << " Boot sequence(" << effectName << " ) with user-defined arguments created and started" << std::endl;
122
+ }
123
+ else
124
+ {
125
+ std::cout << " Failed to start boot sequence: " << effectName << " with user-defined arguments" << std::endl;
126
+ }
127
+
119
128
}
120
129
else
121
130
{
122
- std::cout << " Failed to start boot sequence: " << effectName << std::endl;
131
+
132
+ if (hyperion.setEffect (effectName, priority, duration_ms) == 0 )
133
+ {
134
+ std::cout << " Boot sequence(" << effectName << " ) created and started" << std::endl;
135
+ }
136
+ else
137
+ {
138
+ std::cout << " Failed to start boot sequence: " << effectName << std::endl;
139
+ }
123
140
}
124
141
}
125
142
You can’t perform that action at this time.
0 commit comments