make priority of boot effect adjustable. It is set to 0 to not alter to current behaciour.

A value of 900 could be more feasable, because boot effect with prio 0 isn't overwritable by other effects


Former-commit-id: 1852339e6ade62c86719cfbb47faa46eb8f8d4ed
This commit is contained in:
redpanther 2016-01-31 04:34:13 +01:00
parent 6b860a7e24
commit 8a906b9d01
3 changed files with 9 additions and 5 deletions

View File

@ -364,6 +364,7 @@
/// The configuration of the effect engine, contains the following items: /// The configuration of the effect engine, contains the following items:
/// * paths : An array with absolute location(s) of directories with effects /// * paths : An array with absolute location(s) of directories with effects
/// * bootsequence : The effect selected as 'boot sequence' /// * bootsequence : The effect selected as 'boot sequence'
/// * duration_ms : duration of boot effect in ms. 0 means effect stays forever
"effects" : "effects" :
{ {
"paths" : "paths" :
@ -375,7 +376,8 @@
"bootsequence" : "bootsequence" :
{ {
"effect" : "Rainbow swirl fast", "effect" : "Rainbow swirl fast",
"duration_ms" : 3000 "duration_ms" : 3000,
"priority" : 0
}, },
/// The configuration for the frame-grabber, contains the following items: /// The configuration for the frame-grabber, contains the following items:

View File

@ -359,6 +359,7 @@
/// The configuration of the effect engine, contains the following items: /// The configuration of the effect engine, contains the following items:
/// * paths : An array with absolute location(s) of directories with effects /// * paths : An array with absolute location(s) of directories with effects
/// * bootsequence : The effect selected as 'boot sequence' /// * bootsequence : The effect selected as 'boot sequence'
/// * duration_ms : duration of boot effect in ms. 0 means effect stays forever
"effects" : "effects" :
{ {
"paths" : "paths" :
@ -370,7 +371,8 @@
"bootsequence" : "bootsequence" :
{ {
"effect" : "Rainbow swirl fast", "effect" : "Rainbow swirl fast",
"duration_ms" : 3000 "duration_ms" : 3000,
"priority" : 0
}, },
/// The configuration for the frame-grabber, contains the following items: /// The configuration for the frame-grabber, contains the following items:

View File

@ -126,7 +126,7 @@ int main(int argc, char** argv)
// Get the parameters for the bootsequence // Get the parameters for the bootsequence
const std::string effectName = effectConfig["effect"].asString(); const std::string effectName = effectConfig["effect"].asString();
const unsigned duration_ms = effectConfig["duration_ms"].asUInt(); const unsigned duration_ms = effectConfig["duration_ms"].asUInt();
const int priority = 0; const int priority = effectConfig["priority"].asUInt();
hyperion.setColor(priority+1, ColorRgb::BLACK, duration_ms, false); hyperion.setColor(priority+1, ColorRgb::BLACK, duration_ms, false);