Skip to content

Commit

Permalink
Merge pull request #227 from rschaeuble/master
Browse files Browse the repository at this point in the history
Fix heater effect with effect rate set
  • Loading branch information
julianschill authored Oct 29, 2024
2 parents 56d1d48 + 26ba593 commit 66e2d70
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/led_effect.py
Original file line number Diff line number Diff line change
Expand Up @@ -927,7 +927,7 @@ def nextFrame(self, eventtime):
if heaterTarget > 0.0 and heaterCurrent > 0.0:
if (heaterCurrent >= self.effectRate):
if (heaterCurrent <= heaterTarget-2):
s = int(((heaterCurrent - self.effectRate) / heaterTarget) * 200)
s = int(((heaterCurrent - self.effectRate) / (heaterTarget - self.effectRate)) * 200)
s = min(len(self.thisFrame)-1,s)
return self.thisFrame[s]
elif self.effectCutoff > 0:
Expand Down

0 comments on commit 66e2d70

Please sign in to comment.