mirror of
https://github.com/tzapu/WiFiManager.git
synced 2026-04-27 17:15:53 +03:00
[GH-ISSUE #230] Using library within class #191
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#191
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 @vman26 on GitHub (Sep 30, 2016).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/230
Hi,
I'm trying to use the library within a class,
The problem is I can't use the setAPCallback witin my class:
no matching function for call to 'WiFiManager::setAPCallback()'
I use:
wifiManager.setAPCallback(configModeCallback);
I have a class named:
WifiControlthis is the decleration in the header:
void configModeCallback (WiFiManager *myWiFiManager);and the cpp:
I can't figure out how to fix it, any help out there?
@kluzzebass commented on GitHub (Jan 25, 2017):
Because of the way the callbacks are designed in WiFiManager, it's not possible to use class functions (static or otherwise) as callback functions; they simply have to be globally declared functions.
In most cases the required functionality could be solved by simply using boolean flags in the WiFiManager class instead of being clever and using callbacks.
The consequence is that the WiFiManager class cannot readily be used inside another class if you plan on using the callbacks.