introduce dispatch method to simplify things

This commit is contained in:
2018-07-13 16:16:44 +02:00
parent 6cfd065f41
commit b4ebd347eb
5 changed files with 15 additions and 4 deletions

View File

@@ -22,6 +22,7 @@ Sprocket* Sprocket::activate() {
Sprocket* Sprocket::join(Network& net){
Serial.println("join network");
net.init(&scheduler);
net.onReceive(bind(&Sprocket::dispatch,this, _1, _2));
net.connect();
return activate(&scheduler, &net);
}