Skip to content
This repository was archived by the owner on May 6, 2021. It is now read-only.

Commit 9eedf27

Browse files
committed
Started on adding a configurable delay in case leds are ahead of picture
1 parent 34dbcca commit 9eedf27

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

config/hyperion.config.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,8 @@
8080
{
8181
"type" : "none",
8282
"time_ms" : 200,
83-
"updateFrequency" : 20.0000
83+
"updateFrequency" : 20.0000,
84+
"framesDelay" : 0
8485
}
8586
},
8687

libsrc/hyperion/Hyperion.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,7 @@ LedDevice * Hyperion::createColorSmoothing(const Json::Value & smoothingConfig,
243243
}
244244
else
245245
{
246+
// const unsigned framesDelay = smoothingConfig.get("framesDelay", Json::Value(0u)).asUInt();
246247
std::cout << "Creating linear smoothing" << std::endl;
247248
return new LinearColorSmoothing(ledDevice, smoothingConfig["updateFrequency"].asDouble(), smoothingConfig["time_ms"].asInt());
248249
}

src/hyperiond/hyperiond.cpp

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -119,18 +119,16 @@ int main(int argc, char** argv)
119119
{
120120
const Json::Value effectConfigArgs = effectConfig["args"];
121121
if (hyperion.setEffect(effectName, effectConfigArgs, priority, duration_ms) == 0)
122-
{
123-
std::cout << "Boot sequence(" << effectName << ") with user-defined arguments created and started" << std::endl;
124-
}
125-
else
126-
{
127-
std::cout << "Failed to start boot sequence: " << effectName << " with user-defined arguments" << std::endl;
128-
}
129-
122+
{
123+
std::cout << "Boot sequence(" << effectName << ") with user-defined arguments created and started" << std::endl;
124+
}
125+
else
126+
{
127+
std::cout << "Failed to start boot sequence: " << effectName << " with user-defined arguments" << std::endl;
128+
}
130129
}
131130
else
132131
{
133-
134132
if (hyperion.setEffect(effectName, priority, duration_ms) == 0)
135133
{
136134
std::cout << "Boot sequence(" << effectName << ") created and started" << std::endl;

0 commit comments

Comments
 (0)