rename message type

This commit is contained in:
2018-09-10 01:01:45 +02:00
parent 58232bdacf
commit 622074df2c
7 changed files with 15 additions and 15 deletions

View File

@@ -43,7 +43,7 @@ void Sprocket::loop(){
}
void Sprocket::dispatch( uint32_t from, String &msg ) {
MeshMessage mMsg;
SprocketMessage mMsg;
if(mMsg.fromJsonString(msg)){
dispatchMessageToPlugins(mMsg);
}
@@ -60,8 +60,8 @@ void Sprocket::activatePlugins(Scheduler* scheduler, Network* network){
}
}
void Sprocket::dispatchMessageToPlugins(MeshMessage msg){
if(msg.type != MeshMessage::NONE){ // baaaa
void Sprocket::dispatchMessageToPlugins(SprocketMessage msg){
if(msg.type != SprocketMessage::NONE){ // baaaa
for(Plugin* p : plugins){
Serial.println("dispatch to plugins");
p->onMessage(msg);