From 877d305f2c897b54010e1ffd8139b6d86558e3f5 Mon Sep 17 00:00:00 2001 From: Oliver Seiler Date: Sun, 31 Jul 2022 17:40:38 +1200 Subject: [PATCH] fix LEDs startup sequence --- src/trafficLight.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/trafficLight.cpp b/src/trafficLight.cpp index a4fc2e1..480be3c 100644 --- a/src/trafficLight.cpp +++ b/src/trafficLight.cpp @@ -39,9 +39,11 @@ TrafficLight::TrafficLight(Model* _model, uint8_t _pinRed, uint8_t _pinYellow, u delay(500); ledcDetachPin(pinRed); ledcAttachPin(pinYellow, PWM_CHANNEL_LEDS); + ledcWrite(PWM_CHANNEL_LEDS, config.brightness); delay(500); ledcDetachPin(pinYellow); ledcAttachPin(pinGreen, PWM_CHANNEL_LEDS); + ledcWrite(PWM_CHANNEL_LEDS, config.brightness); delay(500); ledcDetachPin(pinGreen); ledcWrite(PWM_CHANNEL_LEDS, 0);