mirror of
https://gitlab.com/wirelos/sprocket-lib.git
synced 2025-12-16 21:34:08 +01:00
mesh example
This commit is contained in:
@@ -4,6 +4,12 @@ Sprocket::Sprocket(){
|
||||
Serial.println("init sprocket");
|
||||
}
|
||||
|
||||
Sprocket* Sprocket::init(SprocketConfig cfg){
|
||||
Serial.begin(cfg.serialBaudRate);
|
||||
SPIFFS.begin();
|
||||
return this;
|
||||
}
|
||||
|
||||
Sprocket* Sprocket::use(AppStack* stk){
|
||||
stack = stk;
|
||||
return this;
|
||||
@@ -12,10 +18,12 @@ Sprocket* Sprocket::use(AppStack* stk){
|
||||
Sprocket* Sprocket::addTask(Task& tsk){
|
||||
scheduler.addTask(tsk);
|
||||
tsk.enable();
|
||||
return this;
|
||||
}
|
||||
|
||||
Sprocket* Sprocket::registerApp(App& app){
|
||||
app.activate(&scheduler);
|
||||
return this;
|
||||
}
|
||||
|
||||
void Sprocket::loop(){
|
||||
|
||||
Reference in New Issue
Block a user