card not installed handling

This commit is contained in:
Siwat Sirichai 2024-11-03 22:32:36 +07:00
parent 268218f546
commit a22c8ef55c
5 changed files with 44 additions and 4 deletions

View file

@ -17,6 +17,9 @@
*/
bool DigitalInputIoT::begin(uint8_t card_id, ExpansionCard *card, PubSubClient *mqtt, char *base_topic) {
this->card = (DigitalInputCard *)card;
if(!this->card->getStatus()) {
return false;
}
this->card_id = card_id;
this->mqtt = mqtt;
this->base_topic = base_topic;