move UDP packet callback binding to sACN constructor
This commit is contained in:
parent
7f1bd834cc
commit
f599b899e5
@ -26,6 +26,9 @@ ESPAsyncE131::ESPAsyncE131(uint8_t buffers) {
|
|||||||
stats.num_packets = 0;
|
stats.num_packets = 0;
|
||||||
stats.packet_errors = 0;
|
stats.packet_errors = 0;
|
||||||
_handler = NULL;
|
_handler = NULL;
|
||||||
|
|
||||||
|
udp.onPacket(std::bind(&ESPAsyncE131::parsePacket, this,
|
||||||
|
std::placeholders::_1));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ESPAsyncE131::subscribe(uint16_t universe, e131_listen_t type) {
|
bool ESPAsyncE131::subscribe(uint16_t universe, e131_listen_t type) {
|
||||||
@ -43,9 +46,7 @@ bool ESPAsyncE131::subscribe(uint16_t universe, e131_listen_t type) {
|
|||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
udp.onPacket(std::bind(&ESPAsyncE131::parsePacket, this,
|
|
||||||
std::placeholders::_1));
|
|
||||||
return success;
|
return success;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user