migrate IRRemote to RMT

This commit is contained in:
Siwat Sirichai 2023-12-30 15:39:16 +07:00
parent 5fd8bdf73c
commit d0e4825c2d
8 changed files with 77 additions and 17 deletions

View file

@ -115,15 +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;
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;