mirror of
https://gitlab.com/wirelos/sprocket-lib.git
synced 2025-12-19 06:35:51 +01:00
remove join method as everything is handled via activate, remove commented code
This commit is contained in:
@@ -13,25 +13,13 @@ Sprocket* Sprocket::init(SprocketConfig cfg){
|
||||
delay(cfg.startupDelay);
|
||||
Serial.begin(cfg.serialBaudRate);
|
||||
SPIFFS.begin();
|
||||
scheduler = new Scheduler();
|
||||
return this;
|
||||
}
|
||||
Sprocket* Sprocket::activate() {
|
||||
scheduler = new Scheduler();
|
||||
activatePlugins(scheduler);
|
||||
return activate(scheduler);
|
||||
}
|
||||
Sprocket* Sprocket::activate(Scheduler* s) {
|
||||
return this;
|
||||
}
|
||||
|
||||
// TODO check if we want to remove network from sprocket and handle everything via plugins
|
||||
Sprocket* Sprocket::join(Network& net){
|
||||
Serial.println("join network");
|
||||
net.init(scheduler);
|
||||
net.connect();
|
||||
network = net;
|
||||
return activate(scheduler);
|
||||
}
|
||||
|
||||
Sprocket* Sprocket::addTask(Task& tsk){
|
||||
scheduler->addTask(tsk);
|
||||
|
||||
Reference in New Issue
Block a user