From 9f6512bf71aa7461c909ff63c3a59ca814374f5f Mon Sep 17 00:00:00 2001 From: Siwat Sirichai Date: Thu, 28 Dec 2023 20:24:23 +0700 Subject: [PATCH] debug end --- Template Project/lib/ESPMegaPRO/IoTComponent.cpp | 7 +++++++ Template Project/lib/ESPMegaPRO/IoTComponent.hpp | 2 +- Template Project/src/{iotdemo.cpp => iotdemo.cpp.disabled} | 0 3 files changed, 8 insertions(+), 1 deletion(-) rename Template Project/src/{iotdemo.cpp => iotdemo.cpp.disabled} (100%) 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