@@ -39,12 +39,12 @@ def set_range_rgb(self, index_from, index_to, r, g, b, brightness=100):
3939 Sets the color of the LEDs in the given range to the given RGB values.
4040
4141 Parameters:
42- index_from (int): The starting index of the range.
43- index_to (int): The ending index (inclusive) of the range.
44- r (int): The red value of the color.
45- g (int): The green value of the color.
46- b (int): The blue value of the color.
47- brightness (int): The brightness of the LED. It should be a value between 0 and 100.
42+ index_from (int): The starting index of the range.
43+ index_to (int): The ending index (inclusive) of the range.
44+ r (int): The red value of the color.
45+ g (int): The green value of the color.
46+ b (int): The blue value of the color.
47+ brightness (int): The brightness of the LED. It should be a value between 0 and 100.
4848 """
4949 self .set_range_color (index_from , index_to , ModulinoColor (r , g , b ), brightness )
5050
@@ -53,10 +53,10 @@ def set_range_color(self, index_from, index_to, color, brightness=100):
5353 Sets the color of the LEDs in the given range to the given color.
5454
5555 Parameters:
56- index_from (int): The starting index of the range.
57- index_to (int): The ending index (inclusive) of the range.
58- color (ModulinoColor): The color of the LEDs.
59- brightness (int): The brightness of the LED. It should be a value between 0 and 100.
56+ index_from (int): The starting index of the range.
57+ index_to (int): The ending index (inclusive) of the range.
58+ color (ModulinoColor): The color of the LEDs.
59+ brightness (int): The brightness of the LED. It should be a value between 0 and 100.
6060 """
6161 for i in range (index_from , index_to + 1 ):
6262 self .set_color (i , color , brightness )
@@ -66,10 +66,10 @@ def set_all_rgb(self, r, g, b, brightness=100):
6666 Sets the color of all the LEDs to the given RGB values.
6767
6868 Parameters:
69- r (int): The red value of the color.
70- g (int): The green value of the color.
71- b (int): The blue value of the color.
72- brightness (int): The brightness of the LED. It should be a value between 0 and 100.
69+ r (int): The red value of the color.
70+ g (int): The green value of the color.
71+ b (int): The blue value of the color.
72+ brightness (int): The brightness of the LED. It should be a value between 0 and 100.
7373 """
7474 self .set_all_color (ModulinoColor (r , g , b ), brightness )
7575
@@ -78,8 +78,8 @@ def set_all_color(self, color, brightness=100):
7878 Sets the color of all the LEDs to the given color.
7979
8080 Parameters:
81- color (ModulinoColor): The color of the LEDs.
82- brightness (int): The brightness of the LED. It should be a value between 0 and 100.
81+ color (ModulinoColor): The color of the LEDs.
82+ brightness (int): The brightness of the LED. It should be a value between 0 and 100.
8383 """
8484 self .set_range_color (0 , NUM_LEDS - 1 , color , brightness )
8585
@@ -88,9 +88,9 @@ def set_color(self, idx, rgb : ModulinoColor , brightness=100):
8888 Sets the color of the given LED index to the given color.
8989
9090 Parameters:
91- idx (int): The index of the LED.
92- rgb (ModulinoColor): The color of the LED.
93- brightness (int): The brightness of the LED. It should be a value between 0 and 100.
91+ idx (int): The index of the LED.
92+ rgb (ModulinoColor): The color of the LED.
93+ brightness (int): The brightness of the LED. It should be a value between 0 and 100.
9494 """
9595 if idx < 0 or idx >= NUM_LEDS :
9696 raise ValueError (f"LED index out of range { idx } (Valid: 0..{ NUM_LEDS - 1 } )" )
@@ -105,11 +105,11 @@ def set_rgb(self, idx, r, g, b, brightness=100):
105105 Set the color of the given LED index to the given RGB values.
106106
107107 Parameters:
108- idx (int): The index of the LED.
109- r (int): The red value of the color.
110- g (int): The green value of the color.
111- b (int): The blue value of the color.
112- brightness (int): The brightness of the LED. It should be a value between 0 and 100.
108+ idx (int): The index of the LED.
109+ r (int): The red value of the color.
110+ g (int): The green value of the color.
111+ b (int): The blue value of the color.
112+ brightness (int): The brightness of the LED. It should be a value between 0 and 100.
113113 """
114114 self .set_color (idx , ModulinoColor (r , g , b ), brightness )
115115
@@ -118,7 +118,7 @@ def clear(self, idx):
118118 Turns off the LED at the given index.
119119
120120 Parameters:
121- idx (int): The index of the LED.
121+ idx (int): The index of the LED.
122122 """
123123 self .set_color (idx , ModulinoColor (0 , 0 , 0 ), 0 )
124124
@@ -131,7 +131,7 @@ def clear_all(self):
131131 Turns all the LEDs off.
132132
133133 Parameters:
134- idx (int): The index of the LED
134+ idx (int): The index of the LED
135135 """
136136 self .data = bytearray ([0xE0 ] * NUM_LEDS * 4 )
137137
0 commit comments