-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Adding center bin selection to 2D GEQ #4764
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
setting custom3 to 0 gives the "old" behaviour, this is the default. existing presets will have the custom3 slider at the center, changing presets that do not use the full width.
WalkthroughThe Changes
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🧰 Additional context used🧠 Learnings (2)📓 Common learnings
wled00/FX.cpp (7)undefined <retrieved_learning> <retrieved_learning> <retrieved_learning> <retrieved_learning> <retrieved_learning> <retrieved_learning> <retrieved_learning> ⏰ 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). (19)
🔇 Additional comments (3)
✨ Finishing Touches
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
this is the proper implementation of #4760 and replaces that PR. |
@@ -7235,6 +7235,7 @@ uint16_t mode_2DGEQ(void) { // By Will Tatam. Code reduction by Ewoud Wijma. | |||
if (!strip.isMatrix || !SEGMENT.is2D()) return mode_static(); // not a 2D set-up | |||
|
|||
const int NUM_BANDS = map(SEGMENT.custom1, 0, 255, 1, 16); | |||
const int CENTER_BIN = map(SEGMENT.custom3, 0, 31, 0, 15); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use the constant rather than a magic number or is AC missing that constant?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I never came across such a constant if it exists. It could be defined at the top of FX.cpp.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is in the usermod. I have moved AR effects into usremod in my fork which would make such use of constant easier.
setting custom3 to 0 gives the "old" behaviour, this is the default for new presets. Existing presets will have the custom3 slider at the center, changing presets that do not use the full width.
Summary by CodeRabbit