Skip to content

Commit e1898cb

Browse files
committed
Remove extraneous code and run pre-commit
1 parent d934a5a commit e1898cb

File tree

4 files changed

+5
-143
lines changed

4 files changed

+5
-143
lines changed

adafruit_is31fl3731/__init__.py

Lines changed: 0 additions & 135 deletions
Original file line numberDiff line numberDiff line change
@@ -364,138 +364,3 @@ def image(self, img, blink=None, frame=None):
364364
for x in range(self.width): # yes this double loop is slow,
365365
for y in range(self.height): # but these displays are small!
366366
self.pixel(x, y, pixels[(x, y)], blink=blink, frame=frame)
367-
<<<<<<< HEAD:adafruit_is31fl3731.py
368-
369-
370-
class CharlieWing(Matrix):
371-
"""Supports the Charlieplexed feather wing"""
372-
373-
width = 15
374-
height = 7
375-
376-
@staticmethod
377-
def pixel_addr(x, y):
378-
"""Calulate the offset into the device array for x,y pixel"""
379-
if x > 7:
380-
x = 15 - x
381-
y += 8
382-
else:
383-
y = 7 - y
384-
return x * 16 + y
385-
386-
387-
class CharlieBonnet(Matrix):
388-
"""Supports the Charlieplexed bonnet"""
389-
390-
width = 16
391-
height = 8
392-
393-
@staticmethod
394-
def pixel_addr(x, y):
395-
"""Calulate the offset into the device array for x,y pixel"""
396-
if x >= 8:
397-
return (x - 6) * 16 - (y + 1)
398-
return (x + 1) * 16 + (7 - y)
399-
400-
401-
class ScrollPhatHD(Matrix):
402-
"""Supports the Scroll pHAT HD by Pimoroni"""
403-
404-
width = 17
405-
height = 7
406-
407-
@staticmethod
408-
def pixel_addr(x, y):
409-
"""Translate an x,y coordinate to a pixel index."""
410-
if x <= 8:
411-
x = 8 - x
412-
y = 6 - y
413-
else:
414-
x = x - 8
415-
y = y - 8
416-
return x * 16 + y
417-
418-
419-
class LedShim(Matrix):
420-
"""Supports the LED SHIM by Pimoroni"""
421-
422-
width = 28
423-
height = 3
424-
425-
def __init__(self, i2c, address=0x75):
426-
super().__init__(i2c, address)
427-
428-
# pylint: disable-msg=too-many-arguments
429-
def pixelrgb(self, x, r, g, b, blink=None, frame=None):
430-
"""
431-
Blink or brightness for x-pixel
432-
433-
:param x: horizontal pixel position
434-
:param r: red brightness value 0->255
435-
:param g: green brightness value 0->255
436-
:param b: blue brightness value 0->255
437-
:param blink: True to blink
438-
:param frame: the frame to set the pixel
439-
"""
440-
super().pixel(x, 0, r, blink, frame)
441-
super().pixel(x, 1, g, blink, frame)
442-
super().pixel(x, 2, b, blink, frame)
443-
444-
# pylint: disable=inconsistent-return-statements
445-
# pylint: disable=too-many-return-statements
446-
# pylint: disable=too-many-branches
447-
448-
@staticmethod
449-
def pixel_addr(x, y):
450-
"""Translate an x,y coordinate to a pixel index."""
451-
if y == 0:
452-
if x < 7:
453-
return 118 - x
454-
if x < 15:
455-
return 141 - x
456-
if x < 21:
457-
return 106 + x
458-
if x == 21:
459-
return 15
460-
return x - 14
461-
462-
if y == 1:
463-
if x < 2:
464-
return 69 - x
465-
if x < 7:
466-
return 86 - x
467-
if x < 12:
468-
return 28 - x
469-
if x < 14:
470-
return 45 - x
471-
if x == 14:
472-
return 47
473-
if x == 15:
474-
return 41
475-
if x < 21:
476-
return x + 9
477-
if x == 21:
478-
return 95
479-
if x < 26:
480-
return x + 67
481-
return x + 50
482-
483-
if x == 0:
484-
return 85
485-
if x < 7:
486-
return 102 - x
487-
if x < 11:
488-
return 44 - x
489-
if x < 14:
490-
return 61 - x
491-
if x == 14:
492-
return 63
493-
if x < 17:
494-
return 42 + x
495-
if x < 21:
496-
return x + 25
497-
if x == 21:
498-
return 111
499-
if x < 27:
500-
return x + 83
501-
return 93

adafruit_is31fl3731/charlie_wing.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,16 +49,14 @@
4949

5050

5151
class CharlieWing(IS31FL3731):
52-
"""Supports the Charlieplexed feather wing
53-
"""
52+
"""Supports the Charlieplexed feather wing"""
5453

5554
width = 15
5655
height = 7
5756

5857
@staticmethod
5958
def pixel_addr(x, y):
60-
"""Calulate the offset into the device array for x,y pixel
61-
"""
59+
"""Calulate the offset into the device array for x,y pixel"""
6260
if x > 7:
6361
x = 15 - x
6462
y += 8

adafruit_is31fl3731/matrix.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,12 @@
4949

5050

5151
class Matrix(IS31FL3731):
52-
"""Supports the Charlieplexed feather wing
53-
"""
52+
"""Supports the Charlieplexed feather wing"""
5453

5554
width = 16
5655
height = 9
5756

5857
@staticmethod
5958
def pixel_addr(x, y):
60-
"""Calulate the offset into the device array for x,y pixel
61-
"""
59+
"""Calulate the offset into the device array for x,y pixel"""
6260
return x + y * 16

adafruit_is31fl3731/matrix_11x7.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
# imports
4848
from . import IS31FL3731
4949

50+
5051
class Matrix11x7(IS31FL3731):
5152
"""Supports the 11x7 LED Matrix Breakout by Pimoroni"""
5253

0 commit comments

Comments
 (0)