compilation test A
This commit is contained in:
parent
4c04a135ac
commit
b633b6cbb7
|
@ -264,3 +264,7 @@ void AnalogIoT::publishDACValue(uint8_t pin) {
|
|||
delete[] topic;
|
||||
delete[] payload;
|
||||
}
|
||||
|
||||
void AnalogIoT::handleDACChange(uint8_t pin, uint16_t value) {
|
||||
this->publishDAC(pin);
|
||||
}
|
|
@ -15,6 +15,7 @@ bool ClimateIoT::begin(uint8_t card_id, ExpansionCard *card, PubSubClient *mqtt,
|
|||
this->card->registerSensorCallback(bindedSensorCallback);
|
||||
auto bindedAirConditionerCallback = std::bind(&ClimateIoT::handleAirConditionerUpdate, this, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3);
|
||||
this->card->registerChangeCallback(bindedAirConditionerCallback);
|
||||
return true;
|
||||
}
|
||||
|
||||
void ClimateIoT::handleMqttMessage(char *topic, char *payload) {
|
|
@ -88,10 +88,15 @@ void ESPMegaIoT::registerCard(uint8_t card_id)
|
|||
// Create the respective IoT component
|
||||
switch (card_type)
|
||||
{
|
||||
// case CARD_TYPE_ANALOG:
|
||||
// components[card_id] = new AnalogIoT();
|
||||
// components[card_id]->begin(card_id, cards[card_id], &mqtt, base_topic);
|
||||
// break;
|
||||
case CARD_TYPE_ANALOG:
|
||||
components[card_id] = new AnalogIoT();
|
||||
components[card_id]->begin(card_id, cards[card_id], &mqtt, base_topic);
|
||||
if (mqtt_connected)
|
||||
{
|
||||
components[card_id]->subscribe();
|
||||
components[card_id]->publishReport();
|
||||
}
|
||||
break;
|
||||
case CARD_TYPE_DIGITAL_INPUT:
|
||||
components[card_id] = new DigitalInputIoT();
|
||||
components[card_id]->begin(card_id, cards[card_id], &mqtt, base_topic);
|
||||
|
@ -110,6 +115,15 @@ void ESPMegaIoT::registerCard(uint8_t card_id)
|
|||
components[card_id]->publishReport();
|
||||
}
|
||||
break;
|
||||
// case CARD_TYPE_CLIMATE:
|
||||
// components[card_id] = new ClimateIoT();
|
||||
// components[card_id]->begin(card_id, cards[card_id], &mqtt, base_topic);
|
||||
// if (mqtt_connected)
|
||||
// {
|
||||
// components[card_id]->subscribe();
|
||||
// components[card_id]->publishReport();
|
||||
// }
|
||||
// break;
|
||||
default:
|
||||
Serial.println("Unsupported card type");
|
||||
return;
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
#include <ExpansionCard.hpp>
|
||||
#include <DigitalInputCard.hpp>
|
||||
#include <DigitalOutputCard.hpp>
|
||||
#include <ClimateCard.hpp>
|
||||
#include <ESPMegaIoT.hpp>
|
||||
#include <Arduino.h>
|
||||
#include <Wire.h>
|
||||
|
|
Loading…
Reference in New Issue