change SmartVariable Callback to std::function

This commit is contained in:
Siwat Sirichai 2024-03-23 12:38:13 +07:00
parent 1d977c5bdf
commit 919c28a9c7
2 changed files with 3 additions and 3 deletions

View file

@ -105,7 +105,7 @@ void SmartVariable::setValueAutoSave(bool autoSave)
this->autoSave = autoSave;
}
uint16_t SmartVariable::registerCallback(void (*callback)(char *))
uint16_t SmartVariable::registerCallback(std::function<void(char *)> callback)
{
this->valueChangeCallbacks[this->currentHandlerId] = callback;
return this->currentHandlerId++;