-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
add "awm" JSON command to set temporary auto white mode #5153
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
only active if global AWM is not enabled
WalkthroughThis PR introduces a temporary auto-white mode override system. New static methods and a member variable enable temporary global auto-white mode overrides. The calculation logic implements a priority chain: global disabled → temp global → per-bus. JSON deserialization now supports the new "awm" field to set the temporary mode and refresh light capabilities. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes
Suggested reviewers
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (4)
🧰 Additional context used📓 Path-based instructions (2)wled00/**/*.cpp📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
wled00/**/!(html_*)*.h📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
🧠 Learnings (11)📓 Common learnings📚 Learning: 2025-08-26T11:51:21.817ZApplied to files:
📚 Learning: 2025-09-16T18:08:42.848ZApplied to files:
📚 Learning: 2025-09-18T03:17:30.107ZApplied to files:
📚 Learning: 2025-09-18T03:17:30.107ZApplied to files:
📚 Learning: 2025-11-27T06:33:11.436ZApplied to files:
📚 Learning: 2025-09-18T03:17:30.107ZApplied to files:
📚 Learning: 2025-09-12T17:29:43.826ZApplied to files:
📚 Learning: 2025-05-09T18:43:15.355ZApplied to files:
📚 Learning: 2025-11-16T19:40:46.260ZApplied to files:
📚 Learning: 2025-09-11T04:36:42.869ZApplied to files:
🧬 Code graph analysis (1)wled00/FX_fcn.cpp (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (20)
🔇 Additional comments (6)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
I have read the user request but am not fond of the change. I would have not implemented this. |
|
why? |
|
No particular reason, apart from the fact that I do not like the idea of changing AWM using a bus "hack" (which is needed here, no objection). Perhaps it might be better to forgo However, I'm not sure that this functionality is really needed (brighter mode will wash out colors due to light-bleed, not make them "crisper and more vivid"). There's also a second aspect I'm considering regarding White channel. No effects use explicit W and none of the palettes employ W which means it is mostly unused except in Solid effect (and a handful of others) with particular color created using Hex input. However people with RGBW strips want W channel to be used and will most likely do so using Brighter or Accurate AWM modes (Dual will confuse them and None may not behave the way they want (except a few that know its purpose)). Hence I would reduce AWM to Brighter and Accurate only. |
|
Those are good inputs, thanks. I do not know the history of white modes and only recently got a full WS2805 RGBCCT and it was fun but confusing to figure out the white modes, I do leave it at fully manual but I can understand people wanting auto modes, I agree that two are probably enough. If _gAWM has no real purpose except historical reasons, it would be better to remove it. Having the (temporary) global override is something that can be useful for presets, the implementation from this PR however has one flaw IMO: if it is used in one preset, you need to add it to all other presets too to disable it. So not really sure there is not a better implementation. |
I had a chat with a few of my users that do use RGBW (most of them since 0.12). Indeed all of them use I have sketched the update that will move |
|
It would be prudent to invite @Aircoookie into discussion as global AWM was originally his addition. |
this allows presets or external commands to change the AWM on-the-fly. The value is applied temporary until revoked and not saved in config.
only active if global AWM is not enabled
Same logic as in config:
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.