gpio handler works again

remove memory leak in FlowDigit
This commit is contained in:
Zwer2k
2021-07-06 01:25:20 +02:00
parent b205326782
commit 8ca14a434c
18 changed files with 120 additions and 95 deletions

View File

@@ -25,9 +25,6 @@ std::string starttime = "";
static const char *TAG_SERVERMAIN = "server-main";
static GpioHandler *gpioHandler = NULL;
/* An HTTP GET handler */
esp_err_t info_get_handler(httpd_req_t *req)
{
@@ -454,35 +451,3 @@ void connect_handler(void* arg, esp_event_base_t event_base,
*server = start_webserver();
}
}
void gpio_handler_create()
{
if (gpioHandler == NULL)
gpioHandler = new GpioHandler(CONFIG_FILE, server);
}
void gpio_handler_init()
{
if (gpioHandler != NULL) {
gpioHandler->init();
}
}
void gpio_handler_deinit() {
if (gpioHandler != NULL) {
gpioHandler->deinit();
}
}
void gpio_handler_destroy()
{
if (gpioHandler != NULL) {
delete gpioHandler;
gpioHandler = NULL;
}
}
GpioHandler* gpio_handler_get()
{
return gpioHandler;
}