fix basic example

This commit is contained in:
2018-06-09 18:56:59 +02:00
parent c51183b093
commit e9a04ac827
12 changed files with 232 additions and 38 deletions

View File

@@ -9,7 +9,15 @@ Sprocket* Sprocket::init(SprocketConfig cfg){
SPIFFS.begin();
return this;
}
Sprocket* Sprocket::join(Network& net){
//network = net;
Serial.println("join network");
net.setScheduler(&scheduler);
net.init();
net.connect();
Serial.println("connected");
return this;
}
Sprocket* Sprocket::use(AppStack* stk){
stack = stk;
return this;
@@ -21,12 +29,15 @@ Sprocket* Sprocket::addTask(Task& tsk){
return this;
}
Sprocket* Sprocket::registerApp(App& app){
Sprocket* Sprocket::app(App& app){
//app.join(&network);
//app.activate(&scheduler, network);
app.activate(&scheduler);
return this;
}
void Sprocket::loop(){
//network->update();
scheduler.execute();
//stack->loop();
}