18
18
from src .articulation import Articulation
19
19
# from src.gamepad import Gamepad
20
20
21
+ LEDS = False
22
+ if LEDS :
23
+ from src .leds import LEDGridDisplay
24
+ print (LEDGridDisplay )
25
+
21
26
with open (os .devnull , "w" ) as devnull :
22
27
# suppress pygame messages (to keep console output clean)
23
28
stdout = sys .stdout
@@ -1836,12 +1841,12 @@ def __init__(self):
1836
1841
# self.test()
1837
1842
1838
1843
self .leds = None
1839
- # try :
1840
- # from src.leds import LEDGridInterface
1841
- # self.leds = LEDGridInterface ()
1842
- # print("LEDs initialized")
1843
- # except Exception as e:
1844
- # print("LEDs not initialized: ", e)
1844
+ if LEDS :
1845
+ try :
1846
+ self .leds = LEDGridDisplay ()
1847
+ print ("LEDs initialized" )
1848
+ except Exception as e :
1849
+ print ("LEDs not initialized: " , e )
1845
1850
1846
1851
def midi_mode_rpn (self , on = True ):
1847
1852
if on :
@@ -2410,7 +2415,7 @@ def render(self):
2410
2415
if self .leds :
2411
2416
if cell :
2412
2417
lit = glm .vec3 (1 ,1 ,1 )
2413
- self .leds .put (lit , x , y )
2418
+ self .leds .put (lit , x , y , 2 )
2414
2419
# self.leds.put(red, x*2+1, y*2)
2415
2420
# self.leds.put(red, x*2+1, y*2+1)
2416
2421
# self.leds.put(red, x*2, y*2+1)
@@ -2425,7 +2430,7 @@ def render(self):
2425
2430
# r, g, b = colorsys.hsv_to_rgb(h, s, v)
2426
2431
# colf = glm.vec3(r, g, b)
2427
2432
2428
- self .leds .put (colf , x , y )
2433
+ self .leds .put (colf , x , y , 2 )
2429
2434
# self.leds.put(colf, x*2+1, y*2)
2430
2435
# self.leds.put(colf / 2, x*2+1, y*2+1)
2431
2436
# self.leds.put(colf / 2, x*2, y*2+1)
0 commit comments