remove network from activation phase

This commit is contained in:
2018-11-08 13:46:17 +01:00
parent bb81391d00
commit f290ec6197
19 changed files with 138 additions and 66 deletions

View File

@@ -23,10 +23,10 @@ class MeshSprocket : public Sprocket {
}
Sprocket* activate(Scheduler* scheduler, Network* network) {
Sprocket::activate(scheduler, network);
net = static_cast<MeshNet*>(network);
net->onReceive(bind(&MeshSprocket::dispatch,this, _1, _2));
Sprocket* activate(Scheduler* scheduler) {
Sprocket::activate(scheduler);
//net = static_cast<MeshNet*>(network);
//net->onReceive(bind(&MeshSprocket::dispatch,this, _1, _2));
return this;
} using Sprocket::activate;
@@ -42,7 +42,7 @@ class MeshSprocket : public Sprocket {
}
void loop() {
net->update();
//net->update();
scheduler.execute();
}
};