mirror of
https://github.com/KevinMidboe/python-gpiozero.git
synced 2025-10-29 17:50:37 +00:00
Tidying up...
Dunno how many commits this PR is now!
This commit is contained in:
@@ -562,12 +562,8 @@ class RGBLED(SourceMixin, Device):
|
||||
raise GPIOPinMissing('red, green, and blue pins must be provided')
|
||||
LEDClass = PWMLED if pwm else LED
|
||||
super(RGBLED, self).__init__()
|
||||
try:
|
||||
self._leds = tuple(LEDClass(pin, active_high) for pin in (red, green, blue))
|
||||
self.value = initial_value
|
||||
except:
|
||||
self.close()
|
||||
raise
|
||||
self._leds = tuple(LEDClass(pin, active_high) for pin in (red, green, blue))
|
||||
self.value = initial_value
|
||||
|
||||
red = _led_property(0)
|
||||
green = _led_property(1)
|
||||
|
||||
Reference in New Issue
Block a user