diff --git a/Template Project/lib/ESPMegaPRO/IoTComponent.cpp b/Template Project/lib/ESPMegaPRO/IoTComponent.cpp index a4a7cc4..59d19f9 100644 --- a/Template Project/lib/ESPMegaPRO/IoTComponent.cpp +++ b/Template Project/lib/ESPMegaPRO/IoTComponent.cpp @@ -1,5 +1,12 @@ #include +bool IoTComponent::begin(uint8_t card_id, ExpansionCard *card, PubSubClient *mqtt, char *base_topic) { + this->card_id = card_id; + this->mqtt = mqtt; + this->base_topic = base_topic; + return true; +} + void IoTComponent::setMqttClient(PubSubClient *mqtt) { this->mqtt = mqtt; } diff --git a/Template Project/lib/ESPMegaPRO/IoTComponent.hpp b/Template Project/lib/ESPMegaPRO/IoTComponent.hpp index 947bc79..5d81647 100644 --- a/Template Project/lib/ESPMegaPRO/IoTComponent.hpp +++ b/Template Project/lib/ESPMegaPRO/IoTComponent.hpp @@ -3,7 +3,7 @@ #include class IoTComponent { public: - virtual bool begin(uint8_t card_id, ExpansionCard *card, PubSubClient *mqtt, char *base_topic); + bool begin(uint8_t card_id, ExpansionCard *card, PubSubClient *mqtt, char *base_topic); virtual void handleMqttMessage(char *topic, char *payload); void setMqttClient(PubSubClient *mqtt); virtual void publishReport(); diff --git a/Template Project/src/iotdemo.cpp b/Template Project/src/iotdemo.cpp.disabled similarity index 100% rename from Template Project/src/iotdemo.cpp rename to Template Project/src/iotdemo.cpp.disabled