mirror of
https://github.com/tzapu/WiFiManager.git
synced 2026-04-27 00:55:52 +03:00
[GH-ISSUE #1452] No way to tell if Exit has been pressed when using (non-)blocking startWebPortal() #1242
Labels
No labels
📶 WiFi
🕸️ HTTP
Branch
DEV Help Wanted
Discussion
Documentation
ESP32
Example
Good First Issue
Hotfix
In Progress
Incomplete
Needs Feeback
Priority
QA
Question
Task
Upstream/Dependancy
bug
duplicate
enhancement
invalid
pull-request
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/WiFiManager#1242
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @nullstalgia on GitHub (Jul 13, 2022).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/1452
Basic Infos
Hardware
WiFimanager Branch/Release: Master
Esp8266/Esp32: ESP32
Hardware: ESP32-WROOM
Core Version: ESP32 PlatformIO Core V5.0.0
Description
After the user clicks Exit on the UI,
wifiManager.getWebPortalActive()stays true, andwifiManager.getConfigPortalActive()stays false.abortseems to be the only variable that does change in line, but it is private. I threw in a getAbort() so I could get my project working the way I intend, but hopefully these issues can be addressed in a smarter way. :)@tablatronix commented on GitHub (Jul 14, 2022):
Yeah makes sense, exit for webportal is undefined
#1353
@tablatronix commented on GitHub (Jul 14, 2022):
I added a WebPortalActive=false fix, as it seemed to be missing, and should get stopped
Another workaround is to override the
server->on(WM_G(R_exit),callback.I guess the ideal solution is to add a exit callback and disable this stuff in non blocking, not sure
@tablatronix commented on GitHub (Jul 14, 2022):
Another solution would be to add enum returns to process() instead of a bool.. for more useful states. I might do this anyway
@nullstalgia commented on GitHub (Jul 14, 2022):
Great, this seems to work! I think once I had it stuck on 0 across reboots before this patch, but a quick test did not reproduce that issue... Could be user error there.
I'll let you close the issue if you wish to use it as a marker for the process() enums.
But I had a quick question: Is there a reason the parameters can not be set in the web portal? It does not affect my use case, so I don't mind, but I was just wondering.
@tablatronix commented on GitHub (Jul 14, 2022):
Not sure I understand, can you elaborate what is not working with parameters?
@nullstalgia commented on GitHub (Jul 15, 2022):
When connecting to the AP from autoConnect(), the parameters appear in the Setup WiFi page.
When connecting via the local IP when using startWebPortal(), the parameters do not appear in the Setup WiFi page. I assumed this was intentional.
@tablatronix commented on GitHub (Jul 15, 2022):
Are you sure its not just because your params are out of scope?
@nullstalgia commented on GitHub (Jul 15, 2022):
You are 100% right. That totally went over my head.
Thanks again for the quick help and great library!