-
Notifications
You must be signed in to change notification settings - Fork 51
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
Conversation
Going to wait a few days to see if these changes prevent the ESP32 from having "amnesia." |
EleksTubeHAX_pio/platformio.ini
Outdated
@@ -9,7 +9,7 @@ | |||
; https://docs.platformio.org/page/projectconf.html | |||
|
|||
[env:EleksTubeHax] | |||
platform = espressif32 | |||
platform = espressif32@5.4.0 |
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 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.
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.
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)); |
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.
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);
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 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
Closed since similar PR already merged |
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