@@ -186,14 +186,14 @@ def auto_write(self, value):
186186 self ._pixels .auto_write = value
187187
188188 @classmethod
189- def vertical_lines (cls , pixels , width , height , gridmapper ):
189+ def vertical_lines (cls , pixel_object , width , height , gridmap ):
190190 """
191191 Generate a PixelMap of horizontal lines on a strip arranged in a grid.
192192
193- :param pixels : pixel object
193+ :param pixel_object : pixel object
194194 :param width: width of grid
195195 :param height: height of grid
196- :param gridmapper : a function to map x and y coordinates to the grid
196+ :param gridmap : a function to map x and y coordinates to the grid
197197 see vertical_strip_gridmap and horizontal_strip_gridmap
198198 :return: PixelMap
199199
@@ -205,22 +205,22 @@ def vertical_lines(cls, pixels, width, height, gridmapper):
205205 PixelMap.vertical_lines(pixels, 32, 8, vertical_strip_gridmap(8))
206206
207207 """
208- if len (pixels ) < width * height :
208+ if len (pixel_object ) < width * height :
209209 raise ValueError ("number of pixels is less than width x height" )
210210 mapping = []
211211 for x in range (width ):
212- mapping .append ([gridmapper (x , y ) for y in range (height )])
213- return cls (pixels , mapping , individual_pixels = True )
212+ mapping .append ([gridmap (x , y ) for y in range (height )])
213+ return cls (pixel_object , mapping , individual_pixels = True )
214214
215215 @classmethod
216- def horizontal_lines (cls , pixels , width , height , gridmapper ):
216+ def horizontal_lines (cls , pixel_object , width , height , gridmap ):
217217 """
218218 Generate a PixelMap of horizontal lines on a strip arranged in a grid.
219219
220- :param pixels : pixel object
220+ :param pixel_object : pixel object
221221 :param width: width of grid
222222 :param height: height of grid
223- :param gridmapper : a function to map x and y coordinates to the grid
223+ :param gridmap : a function to map x and y coordinates to the grid
224224 see vertical_strip_gridmap and horizontal_strip_gridmap
225225 :return: PixelMap
226226
@@ -231,20 +231,20 @@ def horizontal_lines(cls, pixels, width, height, gridmapper):
231231
232232 PixelMap.horizontal_lines(pixels, 16, 16, vertical_strip_gridmap(16))
233233 """
234- if len (pixels ) < width * height :
234+ if len (pixel_object ) < width * height :
235235 raise ValueError ("number of pixels is less than width x height" )
236236 mapping = []
237237 for y in range (height ):
238- mapping .append ([gridmapper (x , y ) for x in range (width )])
239- return cls (pixels , mapping , individual_pixels = True )
238+ mapping .append ([gridmap (x , y ) for x in range (width )])
239+ return cls (pixel_object , mapping , individual_pixels = True )
240240
241241
242242def vertical_strip_gridmap (height , alternating = True ):
243243 """
244244 Returns a function that determines the pixel number for a grid with strips arranged vertically.
245245
246- :param height: strip height in pixels
247- :param alternating: strips alternate directions in a zigzag
246+ :param height: grid height in pixels
247+ :param alternating: Whether or not the lines in the grid run alternate directions in a zigzag
248248 :return: mapper(x, y)
249249 """
250250
@@ -260,8 +260,8 @@ def horizontal_strip_gridmap(width, alternating=True):
260260 """
261261 Determines the pixel number for a grid with strips arranged horizontally.
262262
263- :param width: strip width in pixels
264- :param alternating: strips alternate directions in a zigzag
263+ :param width: grid width in pixels
264+ :param alternating: Whether or not the lines in the grid run alternate directions in a zigzag
265265 :return: mapper(x, y)
266266 """
267267
@@ -277,7 +277,7 @@ class PixelSubset:
277277 """
278278 PixelSubset lets you work with a subset of a pixel object.
279279
280- :param strip : An object that implements the Neopixel or Dotstar protocol.
280+ :param pixel_object : An object that implements the Neopixel or Dotstar protocol.
281281 :param int start: Starting pixel number.
282282 :param int end: Ending pixel number.
283283
@@ -294,8 +294,8 @@ class PixelSubset:
294294 pixels.show()
295295 """
296296
297- def __init__ (self , strip , start , end ):
298- self ._pixels = strip
297+ def __init__ (self , pixel_object , start , end ):
298+ self ._pixels = pixel_object
299299 self ._start = start
300300 self ._end = end
301301 self .n = self ._end - self ._start
0 commit comments