mirror of
https://github.com/tzapu/WiFiManager.git
synced 2026-04-27 00:55:52 +03:00
[GH-ISSUE #991] Multiple Param Pages #844
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#844
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 @antoniuschan99 on GitHub (Jan 9, 2020).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/991
Hi,
Is it possible to add multiple Param Pages?
Say I want to have two separate param pages:
wifiManager.addParameter(&updateFrequency);
wifiManager.setSaveParamsCallback(saveUpdateFrequencyParamCallback);
wifiManager.addParameter(&updateHumidityOffset);
wifiManager.setSaveParamsCallback(saveUpdateHumidityOffsetParamCallback);
If I call param in the menu, it shows the first parameter (updateFrequency) in both pages when testing code:
std::vector<const char *> menu = {"wifi","info", "sep", "param", "param", "sep","restart","exit"};
Thank you
@antoniuschan99 commented on GitHub (Jan 9, 2020):
so far I have something like this to read multiple param values. It's true that there is unlimited EEPROM Read Cycles yes?
void saveUpdateParamsCallback() {
Serial.println("Saving Update Frequency");
Serial.println(getParam("updateFrequencyId").toInt());
EEPROM.begin(eepromSize);
EEPROM.write(address, getParam("updateFrequencyId").toInt());
EEPROM.commit();
Serial.println("Saving Update Humidity Offset");
Serial.println(getParam("updateHumidityOffsetId").toInt());
EEPROM.begin(eepromSize);
EEPROM.write(address, getParam("updateHumidityOffsetId").toInt());
EEPROM.commit();
}
@tablatronix commented on GitHub (Jan 9, 2020):
I noted this somewhere else, I don’t think I made an issue for it. It is a good idea plus we can let you leave wifi stuff on wifi page, Right now custom params can only be on wifi or params page.
@antoniuschan99 commented on GitHub (Jan 9, 2020):
ok great thanks!
@antoniuschan99 commented on GitHub (Jan 11, 2020):
After saving a parameter, is it possible to retrieve the value that was just saved?
Say the user saved the value, but goes back to the params page. I want the %s value to reflect the value that was just saved. However, it doesn't do that (it always gets the value that was loaded the very first time the device booted)
const char* setFrequencyValue =
"
""
""
"15 Minutes"
new (&setFrequency) WiFiManagerParameter(write_letter);
wifiManager.addParameter(&setFrequency);
@tablatronix commented on GitHub (Jan 11, 2020):
hmm not sure if you can set the param again worth a try just use the new content on the same parameter do not new
@antoniuschan99 commented on GitHub (Jan 12, 2020):
How would go about doing that? For now I have user save everything at once then will just disconnect.
@tablatronix commented on GitHub (Jan 12, 2020):
Hmm might need a callout for that, let me think about it. Not sure we have any hook. You would have to be in non blocking mode
@antoniuschan99 commented on GitHub (Jan 13, 2020):
ok thanks!