keep network ref

This commit is contained in:
2018-09-28 10:38:31 +02:00
parent accf5dcd75
commit 1ef19aaad0
3 changed files with 5 additions and 1 deletions

View File

@@ -1,5 +1,5 @@
{
"stationMode": 1,
"stationMode": 0,
"channel": 11,
"meshPort": 5555,
"meshSSID": "whateverYouLike",

View File

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

View File

@@ -21,7 +21,10 @@ using namespace std::placeholders;
class Sprocket : public Mediator {
protected:
// TODO move scheduler out of Sprocket
// => see difference between standalone and mesh sprochet usage of scheduler
Scheduler scheduler;
Network network;
public:
SprocketConfig config;
std::vector<Plugin*> plugins;