mirror of
https://gitlab.com/wirelos/sprocket-lib.git
synced 2025-12-17 05:36:39 +01:00
get OTA enabling working
This commit is contained in:
@@ -34,8 +34,8 @@ class MeshSprocket : public Sprocket {
|
||||
}
|
||||
|
||||
void dispatchMessageToPlugins(MeshMessage msg){
|
||||
for(Plugin* p : plugins){
|
||||
if(msg.type != MeshMessage::NONE){
|
||||
if(msg.type != MeshMessage::NONE){ // baaaa
|
||||
for(Plugin* p : plugins){
|
||||
Serial.println("dispatch to plugins");
|
||||
p->onMessage(msg);
|
||||
}
|
||||
@@ -55,10 +55,8 @@ class MeshSprocket : public Sprocket {
|
||||
};
|
||||
|
||||
void dispatch( uint32_t from, String &msg ) {
|
||||
// TODO handle OTA before passing to onMessage
|
||||
MeshMessage mMsg;
|
||||
mMsg.fromJsonString(msg);
|
||||
if(mMsg.valid){
|
||||
if(mMsg.fromJsonString(msg)){
|
||||
dispatchMessageToPlugins(mMsg);
|
||||
}
|
||||
onMessage(from, msg);
|
||||
|
||||
Reference in New Issue
Block a user