mirror of
https://github.com/tzapu/WiFiManager.git
synced 2026-04-27 00:55:52 +03:00
[GH-ISSUE #1113] Suggestion: Pass Pointers to Parameters #952
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#952
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 @Lithimlin on GitHub (Aug 20, 2020).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/1113
I imagine that in many cases, it would be easiest to pass a pointer to a
WiFiManagerParameterthat points to the value that should be linked with the parameter. This could then automatically be updated whenever the parameters are saved.I have coded something like this for personal use and would like to share it here.
I had to modify the
WifiManager.hslightly by adding avirtual bool updateValue()to the Parameter class.Later, in my save callback, I call
updateValue()on all parameters:For the default
WiFiManagerParameter, achar **valueptrwould have to be used instead and the length would still have to be adjusted somehow, possibly through a second pointer to asize_t.