Swapped led colors
This commit is contained in:
parent
f1b90533a8
commit
f500ee02ae
@ -52,15 +52,11 @@ class BlinkenLight:
|
|||||||
|
|
||||||
|
|
||||||
class BlinkenLights(Thread):
|
class BlinkenLights(Thread):
|
||||||
LED_TARGETS = {
|
|
||||||
'red': 23,
|
|
||||||
'green': 24
|
|
||||||
}
|
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self, targets: dict):
|
||||||
super().__init__()
|
super().__init__()
|
||||||
self._led_controllers = {}
|
self._led_controllers = {}
|
||||||
for name, pin in self.LED_TARGETS.items():
|
for name, pin in targets.items():
|
||||||
self._led_controllers[name] = BlinkenLight(pin)
|
self._led_controllers[name] = BlinkenLight(pin)
|
||||||
self._active = True
|
self._active = True
|
||||||
|
|
||||||
@ -82,12 +78,11 @@ class BlinkenLights(Thread):
|
|||||||
|
|
||||||
|
|
||||||
class BirbnetesIoTPlatformStatusDriver:
|
class BirbnetesIoTPlatformStatusDriver:
|
||||||
|
|
||||||
blinken_lights = None
|
blinken_lights = None
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def init(cls):
|
def init(cls):
|
||||||
cls.blinken_lights = BlinkenLights()
|
cls.blinken_lights = BlinkenLights({'red': 24, 'green': 23})
|
||||||
cls.blinken_lights.start()
|
cls.blinken_lights.start()
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
|
Loading…
Reference in New Issue
Block a user