Skip to content

Commit 560fa1d

Browse files
authored
fixed issue #297 with hardwaremode render (#361)
1 parent 0861997 commit 560fa1d

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

src/FastLEDController.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,8 +200,13 @@ bool FastLEDController::renderColorWave(ChannelData& channelData, LEDGroup& grou
200200
}
201201

202202
bool FastLEDController::renderStatic(ChannelData& channelData, LEDGroup& group, int groupLedCount) {
203-
fill_solid(&channelData.leds[group.ledIndex], groupLedCount, group.color1);
204-
return true;
203+
int duration = applySpeed(100, group.speed);
204+
int count = animation_step_count(duration, 1);
205+
if (count > 0) {
206+
fill_solid(&channelData.leds[group.ledIndex], groupLedCount, group.color1);
207+
return true;
208+
}
209+
return false;
205210
}
206211

207212
bool FastLEDController::renderTemperature(ChannelData& channelData, LEDGroup& group, int groupLedCount) {

0 commit comments

Comments
 (0)