add coments and slow down ota

This commit is contained in:
2018-09-21 02:33:03 +02:00
parent 0777e69e7a
commit 95367cb4bb
2 changed files with 3 additions and 1 deletions

View File

@@ -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);

View File

@@ -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);