Skip to content

Fix uninitialized pwm_ variable in led.cpp - #721

Merged
stephenhensley merged 2 commits into
daisyaudio:masterfrom
spamatica:LED-pwm-uninitalized
Oct 14, 2026
Merged

stephenhensley merged 2 commits into
daisyaudio:masterfrom
spamatica:LED-pwm-uninitalized

Conversation

@spamatica

Copy link
Copy Markdown
Contributor

pwm_ was not initialized and would cause LEDs to not work in bkshepherd project when compiled with a more recent compiler than 2020 (gcc 10).

Verified with this branch and the bkshepherd project.

pwm_ could have an illegal value in which case the LEDs would not work.
@github-actions

github-actions Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Test Results

167 tests  ±0   167 ✅ ±0   0s ⏱️ ±0s
  1 suites ±0     0 💤 ±0 
  1 files   ±0     0 ❌ ±0 

Results for commit a7ec081. ± Comparison against base commit 0808720.

♻️ This comment has been updated with latest results.

@stephenhensley

Copy link
Copy Markdown
Collaborator

Looks good to me! Thanks for the fix!

The style fix should be simple to fix.
You can resolve it by either manually adjusting the line you changed to match the suggestion in the github action, or if you have clang-format installed you can run the fix_style.sh script at the root of the repo.
That script may change a number of other files (it did the last time I ran it). If that's the case, feel free to discard any changes and only commit your pwm.cpp line :)

The build CI failure is not your fault, and I'll be resolving that today.

@stephenhensley

Copy link
Copy Markdown
Collaborator

LGTM! Thanks for the contribution!! :)

@stephenhensley
stephenhensley merged commit c1ddfc9 into daisyaudio:master Oct 14, 2026
7 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants