WonderCRM / CRMui3

CRMui3 WebFramework для esp8266 и esp32. Позволяет быстро и просто создать веб интерфейс для настройки и управления устройством.
https://t.me/s/CRMdevelop
Apache License 2.0
35 stars 18 forks source link

flexible approach to checking the state of a button #2

Closed terrorsl closed 2 years ago

terrorsl commented 2 years ago

Check all buttons in one function.

void Responce(const char *name)
{
    ESP_LOGD(TAG, "name %s",name);
    if (strcmp(name, "card3") == 0)
    {
        crm.webUpdate("card3", "Открыта");
    }
    else
        crm.webUpdate(name, "Nice");
};
crm.btnCallback(Responce);
crm.begin("DEMO", Interface, 0,0,0);
WonderCRM commented 2 years ago

Thanks for flexible approach to checking the state of a button