use only one method of creating an function pointer
This commit is contained in:
parent
415ff46f47
commit
4f0db94c70
@ -89,7 +89,7 @@ bool DeviceLed::ledColorHandler(String message) {
|
||||
|
||||
void DeviceLed::homieRegister() {
|
||||
ledNode.subscribe("on", [this](String value) { return ledOnHandler(value); });
|
||||
ledNode.subscribe("color", std::bind(&DeviceLed::ledColorHandler, this, std::placeholders::_1));
|
||||
ledNode.subscribe("color", [this](String value) { return ledColorHandler(value); });
|
||||
Homie.registerNode(ledNode);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user