Skip to content
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

Improve WPS stability and a small lighting fix #116

Closed
wants to merge 5 commits into from

Conversation

bitrot-alpha
Copy link
Contributor

WPS stability has gotten worse since moving from Arduino to PlatformIO. This PR should fix that hopefully.

There's also a small change to the Rainbow lighting pattern to fully turn off the lights when BACKLIGHT_DIMMED_INTENSITY is set to 0.

Issues addressed: #113 #115

@bitrot-alpha
Copy link
Contributor Author

Going to wait a few days to see if these changes prevent the ESP32 from having "amnesia."

@@ -9,7 +9,7 @@
; https://docs.platformio.org/page/projectconf.html

[env:EleksTubeHax]
platform = espressif32
platform = espressif32@5.4.0
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also like to use specific versions, but we want to keep it simpler for beginners, so no specific versions in the "public" version of the platformio.ini please.
I have and use my "private" one, with very specific verisons sometimes for testing.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rolled back since it didn't fix the problem anyways

@@ -19,6 +20,7 @@ double GeoLocTZoffset = 0;
static esp_wps_config_t wps_config;
void wpsInitConfig()
{
memset(&wps_config, 0, sizeof(esp_wps_config_t));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems to be the safest way to init.

We could also just use the macro from Expressif ;)

static esp_wps_config_t wps_config = WPS_CONFIG_INIT_DEFAULT(ESP_WPS_MODE);

Copy link
Contributor Author

@bitrot-alpha bitrot-alpha Jan 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like using vendor specific macros when it literally does the same thing as a standard C function that every good C programmer should know about. This memset call also matches the Arduino WPS example.

VS Code also gave me a weird squiggly for that macro since we don't directly #include whatever header that macro comes from, not that it really matters.

Just being an opinionated C programmer lol

@bitrot-alpha
Copy link
Contributor Author

Closed since similar PR already merged

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