Skip to content

Fix default button pin assignment for esp32 - #4074

Closed
PaoloTK wants to merge 24 commits into
wled:0_15from
PaoloTK:fix_default_button_pin_assignement
Closed

PaoloTK wants to merge 24 commits into
wled:0_15from
PaoloTK:fix_default_button_pin_assignement

Conversation

@PaoloTK

@PaoloTK PaoloTK commented Jul 25, 2024

Copy link
Copy Markdown
Contributor

When using the BTNPIN compile flag to assign button pins in 0.15 you must define your pins and then add leading "-1" until WLED_MAX_BUTTONS, which is expected behavior (#3953). However if you don't define BTNPIN at compile a similar issue occurs on ESP32 due to the default def only having 2 pins. I added an if statement to define 4 default pins in case we're compiling for ESP32.

I also changed the BTNTYPE def. It currently has a def for 2 pins with the second being BTN_TYPE_NONE. However since BTN_TYPE_NONE = 0 any type not configured will automatically evaluate to BTN_TYPE_NONE.

@softhack007

Copy link
Copy Markdown
Member

Hi,

I think this solution is not good for the generic case, as it simply "postpones" the problem because users may want WLED_MAX_BUTTONS >4 (12, or maybe even 16). See my comment in #3953.

@softhack007
softhack007 marked this pull request as draft July 25, 2024 13:36
adrianschroeter and others added 22 commits August 10, 2024 20:15
before a x=32 (n times of 16) had not equal sized bars, but first was
a single pixel and later a bar had 3 pixel width. This solves it to
have always 2 pixel sized bars.

I have to admit that I did not test with other pixel dimensions.
Move contants into bus manager
On ESP8266, it isn't permissible to call delay() in system context;
ensure this is legal before waiting.

On ESP32, use an operating system mutex to ensure consistent variable
state in a multicore environment, and manage the wait without needing
to loop.
For debugging, also log who was trying to lock when it was contended.
Tiny code space usage reduction.
Good for measuring quick response performance
Courtesy of @_tvk_ on Discord
* speedup: add functions to only blur rows or columns (50% faster)

* fire2012: tinkering with bur options. Vertical blur only when slider < 64 (faster); extra blur for  slider values >192 (bush burn)
@PaoloTK PaoloTK closed this Aug 10, 2024
@PaoloTK
PaoloTK deleted the fix_default_button_pin_assignement branch August 10, 2024 18:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants