@@ -34,21 +34,24 @@ def mirror(values):
34
34
def _lerp (x , x0 , x1 , y0 , y1 ):
35
35
return y0 + (x - x0 ) * ((y1 - y0 )/ (x1 - x0 ))
36
36
37
+
37
38
# Animation functions:
38
- def blank (config , np , pixel_count ):
39
+ def blank (config , np , pixel_count ): # pylint: disable=unused-argument, redefined-outer-name
39
40
# Turn off all the pixels.
40
41
np .fill ((0 ,0 ,0 ))
41
42
np .write ()
42
43
43
- def solid (config , np , pixel_count ):
44
+
45
+ def solid (config , np , pixel_count ): # pylint: disable=unused-argument, redefined-outer-name
44
46
# Solid pulse of all pixels at the same color.
45
47
colors = config ['colors' ]
46
48
elapsed = utime .ticks_ms () // config ['period_ms' ]
47
49
current = elapsed % len (colors )
48
50
np .fill (colors [current ])
49
51
np .write ()
50
52
51
- def chase (config , np , pixel_count ):
53
+
54
+ def chase (config , np , pixel_count ): # pylint: disable=unused-argument, redefined-outer-name
52
55
# Chasing animation of pixels through different colors.
53
56
colors = config ['colors' ]
54
57
elapsed = utime .ticks_ms () // config ['period_ms' ]
@@ -57,7 +60,8 @@ def chase(config, np, pixel_count):
57
60
np [i ] = colors [current ]
58
61
np .write ()
59
62
60
- def smooth (config , np , pixel_count ):
63
+
64
+ def smooth (config , np , pixel_count ): # pylint: disable=unused-argument, redefined-outer-name
61
65
# Smooth pulse of all pixels at the same color. Interpolates inbetween colors
62
66
# for smoother animation.
63
67
colors = config ['colors' ]
0 commit comments