Skip to content

Commit c17aae5

Browse files
committed
0x1337,0xaeae: Add some horror to allow for pixel reordering.
1 parent 1c38976 commit c17aae5

1 file changed

Lines changed: 4 additions & 9 deletions

File tree

0x1337/0xaeae/app.py

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import asyncio
77
from machine import Pin
88
from events.input import Button, BUTTON_TYPES, ButtonDownEvent, ButtonUpEvent
9+
import settings
910

1011
class ArcadeEditionApp(App):
1112
buttons = {
@@ -35,14 +36,7 @@ def __init__(self, config):
3536
self.pin_e = self.init_pin(config.pin[2])
3637
self.pin_f = self.init_pin(config.pin[3])
3738

38-
self._pin_values = {
39-
'A': 1,
40-
'B': 1,
41-
'C': 1,
42-
'D': 1,
43-
'E': 1,
44-
'F': 1
45-
}
39+
self._pin_values = {'A': 1,'B': 1,'C': 1,'D': 1,'E': 1,'F': 1}
4640

4741
def init_pin(self, pin):
4842
pin.init(Pin.IN)
@@ -51,8 +45,9 @@ def init_pin(self, pin):
5145

5246
async def background_task(self):
5347
while True:
48+
_o = settings.get("ae_led_o", "102") # def: grb
5449
for led in range(0, 12):
55-
self._n[led] = (tildagonos.leds[led+1][1], tildagonos.leds[led+1][0], tildagonos.leds[led+1][2])
50+
self._n[led] = (tildagonos.leds[led+1][int(_o[0])], tildagonos.leds[led+1][int(_o[1])], tildagonos.leds[led+1][int(_o[2])])
5651
self._n.write()
5752
await asyncio.sleep(1 / self._fps)
5853

0 commit comments

Comments
 (0)