change callbacks to vector
This commit is contained in:
parent
71475ef2f1
commit
011710fe82
19 changed files with 207 additions and 109 deletions
|
@ -46,13 +46,6 @@ void DigitalInputIoT::handleValueChange(uint8_t pin, uint8_t value) {
|
|||
if (this->digital_inputs_publish_enabled) {
|
||||
this->publishDigitalInput(pin);
|
||||
}
|
||||
if (this->change_callback != NULL) {
|
||||
this->change_callback(pin, value);
|
||||
}
|
||||
|
||||
}
|
||||
void DigitalInputIoT::registerChangeCallback(std::function<void(uint8_t, uint8_t)> callback) {
|
||||
this->change_callback = callback;
|
||||
|
||||
}
|
||||
void DigitalInputIoT::publishReport() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue