mirror of
https://gitlab.com/wirelos/sprocket-lib.git
synced 2025-12-15 13:08:21 +01:00
add coments and slow down ota
This commit is contained in:
@@ -31,6 +31,7 @@ class MeshSprocket : public Sprocket {
|
|||||||
return this;
|
return this;
|
||||||
} using Sprocket::activate;
|
} using Sprocket::activate;
|
||||||
|
|
||||||
|
// TODO transmit SprocketMessage
|
||||||
virtual void dispatch( uint32_t from, String &msg ) {
|
virtual void dispatch( uint32_t from, String &msg ) {
|
||||||
SprocketMessage sMsg;
|
SprocketMessage sMsg;
|
||||||
sMsg.fromJsonString(msg);
|
sMsg.fromJsonString(msg);
|
||||||
|
|||||||
@@ -50,7 +50,8 @@ class OtaTcpPlugin : public Plugin {
|
|||||||
//connectUpdateNetwork(network);
|
//connectUpdateNetwork(network);
|
||||||
net = static_cast<MeshNet*>(network);
|
net = static_cast<MeshNet*>(network);
|
||||||
// setup task
|
// 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();
|
ArduinoOTA.handle();
|
||||||
});
|
});
|
||||||
userScheduler->addTask(otaTask);
|
userScheduler->addTask(otaTask);
|
||||||
|
|||||||
Reference in New Issue
Block a user