Swapped led colors

This commit is contained in:
Pünkösd Marcell 2020-09-30 05:09:09 +02:00
parent f1b90533a8
commit f500ee02ae
1 changed files with 3 additions and 8 deletions

View File

@ -52,15 +52,11 @@ class BlinkenLight:
class BlinkenLights(Thread):
LED_TARGETS = {
'red': 23,
'green': 24
}
def __init__(self):
def __init__(self, targets: dict):
super().__init__()
self._led_controllers = {}
for name, pin in self.LED_TARGETS.items():
for name, pin in targets.items():
self._led_controllers[name] = BlinkenLight(pin)
self._active = True
@ -82,12 +78,11 @@ class BlinkenLights(Thread):
class BirbnetesIoTPlatformStatusDriver:
blinken_lights = None
@classmethod
def init(cls):
cls.blinken_lights = BlinkenLights()
cls.blinken_lights = BlinkenLights({'red': 24, 'green': 23})
cls.blinken_lights.start()
@classmethod