Skip to content

Commit

Permalink
Resolving build CI errors
Browse files Browse the repository at this point in the history
  • Loading branch information
tylerwinfield committed Dec 28, 2023
1 parent 1293a47 commit 786cd80
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
12 changes: 11 additions & 1 deletion adafruit_led_animation/animation/pulse.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,17 @@ class Pulse(Animation):
"""

# pylint: disable=too-many-arguments
def __init__(self, pixel_object, speed, color, period=5, breath=0, min_intensity=0, max_intensity=1, name=None):
def __init__(
self,
pixel_object,
speed,
color,
period=5,
breath=0,
min_intensity=0,
max_intensity=1,
name=None,
):
super().__init__(pixel_object, speed, color, name=name)
self._period = period
self.breath = breath
Expand Down
5 changes: 4 additions & 1 deletion adafruit_led_animation/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,10 @@ def pulse_generator(period: float, animation_object, dotstar_pwm=False):
elif pos > (half_period - half_breath):
intensity = animation_object.max_intensity
else:
intensity = animation_object.min_intensity + (((pos - half_breath) / (half_period - (half_breath * 2))) * (animation_object.max_intensity - animation_object.min_intensity))
intensity = animation_object.min_intensity + (
((pos - half_breath) / (half_period - (half_breath * 2)))
* (animation_object.max_intensity - animation_object.min_intensity)
)
if dotstar_pwm:
fill_color = (
animation_object.color[0],
Expand Down

0 comments on commit 786cd80

Please sign in to comment.