mirror of
https://github.com/tzapu/WiFiManager.git
synced 2026-04-27 00:55:52 +03:00
[GH-ISSUE #1152] Can't use wifiManager.resetSettings(); inside loop #986
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#986
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 @ITstreet1 on GitHub (Nov 27, 2020).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/1152
Basic Infos
Arduino IDE 1.8.12
Hardware
WiFimanager Branch/Release:
Esp8266/Esp32:
Hardware: ESP-12e, esp01, esp25
ESP Core Version: 2.4.0, staging
Description
In example sketch AutoConnectWithFSPParameters.ino, there is a wifiManager.resetSettings(); function, which can reset settings of SPIFFS data. As wifiManager is declared inside setup, I can not use this function inside a loop with a button. Or maybe there is a way, that I don't know.
Settings in IDE
Module: Generic ESP8266 Module
Additional libraries:
Sketch
Debug Messages
@EgHubs commented on GitHub (Dec 11, 2020):
Just redeclare it!
and resetFunc is declared before the void setup() function
void(* resetFunc) (void) = 0; //declare reset function @ address 0@tablatronix commented on GitHub (Dec 11, 2020):
Yeah this is a scope issue, basic C++, not a wm issue
either make wm global, or create a new instance
@ChernikovS1971 commented on GitHub (Apr 25, 2022):
EgHubs
thank! your code works!