From 7c50d5e37579479a1cc263d0d673eed7211aa8f8 Mon Sep 17 00:00:00 2001 From: spamatica Date: Tue, 13 Oct 2026 10:08:12 +0200 Subject: [PATCH 1/2] Fix uninitialized pwm_ variable in led.cpp pwm_ could have an illegal value in which case the LEDs would not work. --- src/hid/led.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/hid/led.cpp b/src/hid/led.cpp index 6a3b28e3a..f65eff7bf 100644 --- a/src/hid/led.cpp +++ b/src/hid/led.cpp @@ -13,6 +13,7 @@ void Led::Init(Pin pin, bool invert, float samplerate) // Set internal stuff. bright_ = 0.0f; pwm_cnt_ = 0; + pwm_ = 0.0f; Set(bright_); invert_ = invert; samplerate_ = samplerate; From a7ec081d838fce15068d33c79b96fee2ca768433 Mon Sep 17 00:00:00 2001 From: Robert Jonsson Date: Wed, 14 Oct 2026 12:29:31 +0200 Subject: [PATCH 2/2] fix formatting with fix_style.sh --- src/hid/led.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hid/led.cpp b/src/hid/led.cpp index f65eff7bf..b9017c715 100644 --- a/src/hid/led.cpp +++ b/src/hid/led.cpp @@ -13,7 +13,7 @@ void Led::Init(Pin pin, bool invert, float samplerate) // Set internal stuff. bright_ = 0.0f; pwm_cnt_ = 0; - pwm_ = 0.0f; + pwm_ = 0.0f; Set(bright_); invert_ = invert; samplerate_ = samplerate;