mirror of
https://gitlab.com/wirelos/sprocket-lib.git
synced 2025-12-14 12:46:50 +01:00
add coments and slow down ota
This commit is contained in:
@@ -31,6 +31,7 @@ class MeshSprocket : public Sprocket {
|
||||
return this;
|
||||
} using Sprocket::activate;
|
||||
|
||||
// TODO transmit SprocketMessage
|
||||
virtual void dispatch( uint32_t from, String &msg ) {
|
||||
SprocketMessage sMsg;
|
||||
sMsg.fromJsonString(msg);
|
||||
|
||||
@@ -50,7 +50,8 @@ class OtaTcpPlugin : public Plugin {
|
||||
//connectUpdateNetwork(network);
|
||||
net = static_cast<MeshNet*>(network);
|
||||
// setup task
|
||||
otaTask.set(TASK_MILLISECOND * 100, TASK_FOREVER, [](){
|
||||
// TOOD check if we can increase the time OTA needs to be handled
|
||||
otaTask.set(TASK_MILLISECOND * 1000, TASK_FOREVER, [](){
|
||||
ArduinoOTA.handle();
|
||||
});
|
||||
userScheduler->addTask(otaTask);
|
||||
|
||||
Reference in New Issue
Block a user