debug end

This commit is contained in:
Siwat Sirichai 2023-12-28 20:24:23 +07:00
parent fc907e0c7a
commit 9f6512bf71
3 changed files with 8 additions and 1 deletions

View File

@ -1,5 +1,12 @@
#include <IoTComponent.hpp>
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;
}

View File

@ -3,7 +3,7 @@
#include <PubSubClient.h>
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();