mirror of
https://gitlab.com/wirelos/sprocket-lib.git
synced 2025-12-16 13:25:03 +01:00
cleanup build, examples and library
This commit is contained in:
@@ -18,12 +18,12 @@ class MeshApp : public Sprocket {
|
||||
net->mesh.onReceive(bind(&MeshApp::receivedCallback,this, _1, _2));
|
||||
// add a task that sends stuff to the mesh
|
||||
someTask.set(TASK_SECOND * 5, TASK_FOREVER,
|
||||
bind(&MeshApp::advertise, this, net));
|
||||
bind(&MeshApp::heartbeat, this, net));
|
||||
scheduler->addTask(someTask);
|
||||
someTask.enable();
|
||||
} using Sprocket::activate;
|
||||
|
||||
void advertise(MeshNet* network){
|
||||
void heartbeat(MeshNet* network){
|
||||
String msg = "{ \"payload \": 1 }";
|
||||
network->broadcast(msg);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user