mirror of
https://gitlab.com/zwirbel/illucat.git
synced 2025-12-16 10:04:30 +01:00
remove dispatch method as it is now supported by core
This commit is contained in:
@@ -26,8 +26,6 @@ class IlluCat : public Sprocket {
|
|||||||
OtaConfig otaConfig;
|
OtaConfig otaConfig;
|
||||||
WebServerConfig webConfig;
|
WebServerConfig webConfig;
|
||||||
|
|
||||||
SprocketMessage currentMessage;
|
|
||||||
|
|
||||||
IlluCat(SprocketConfig cfg, OtaConfig otaCfg, WebServerConfig webCfg) : Sprocket(cfg) {
|
IlluCat(SprocketConfig cfg, OtaConfig otaCfg, WebServerConfig webCfg) : Sprocket(cfg) {
|
||||||
sprocketConfig = cfg;
|
sprocketConfig = cfg;
|
||||||
otaConfig = otaCfg;
|
otaConfig = otaCfg;
|
||||||
@@ -43,16 +41,6 @@ class IlluCat : public Sprocket {
|
|||||||
addPlugin(new WebApi(server, 1));
|
addPlugin(new WebApi(server, 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO move to core
|
|
||||||
virtual void dispatch( uint32_t from, String &msg ) {
|
|
||||||
currentMessage.fromJsonString(msg);
|
|
||||||
if(currentMessage.valid){
|
|
||||||
currentMessage.from = from;
|
|
||||||
publish(currentMessage.topic, currentMessage.payload);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
Reference in New Issue
Block a user