mirror of
https://github.com/alexhopeoconnor/WiFiManager.git
synced 2026-10-15 15:41:21 +10:00
add listener setPreSaveConfigCallback
this listener required for action before save process behind wifi or params.
This commit is contained in:
+1568
-1101
File diff suppressed because it is too large
Load Diff
@@ -193,6 +193,8 @@ class WiFiManager
|
||||
void setAPCallback( std::function<void(WiFiManager*)> func );
|
||||
//called when settings have been changed and connection was successful
|
||||
void setSaveConfigCallback( std::function<void()> func );
|
||||
//called when settings before have been changed and connection was successful
|
||||
void setPreSaveConfigCallback( std::function<void()> func );
|
||||
//adds a custom parameter, returns false on failure
|
||||
bool addParameter(WiFiManagerParameter *p);
|
||||
//if this is set, it will exit after config, even if connection is unsuccessful.
|
||||
@@ -461,6 +463,7 @@ class WiFiManager
|
||||
// callbacks
|
||||
std::function<void(WiFiManager*)> _apcallback;
|
||||
std::function<void()> _savecallback;
|
||||
std::function<void()> _presavecallback;
|
||||
|
||||
template <class T>
|
||||
auto optionalIPFromString(T *obj, const char *s) -> decltype( obj->fromString(s) ) {
|
||||
|
||||
Reference in New Issue
Block a user