rgb matrix now can work out what side its on using the drive name

This commit is contained in:
Cole Smith
2022-05-28 08:15:44 -07:00
committed by Kyle Brown
parent 08d3386643
commit b91974bce2
2 changed files with 7 additions and 1 deletions

View File

@@ -3,6 +3,7 @@ import neopixel
from kmk.extensions import Extension
from kmk.handlers.stock import passthrough as handler_passthrough
from kmk.keys import make_key
from storage import getmount
class Color:
@@ -46,10 +47,15 @@ class Rgb_matrix(Extension):
split=False,
rightSide=False,
):
name = str(getmount('/').label)
self.rgb_order = rgb_order
self.disable_auto_write = disable_auto_write
self.split = split
self.rightSide = rightSide
if name.endswith('L'):
self.rightSide = False
elif name.endswith('R'):
self.rightSide = True
if type(ledDisplay) is Rgb_matrix_data:
self.ledDisplay = ledDisplay.data
else: