WebguiappTemplate/main/main.c

31 lines
672 B
C

#include <stdio.h>
#include <stdbool.h>
#include <unistd.h>
#include "webguiapp.h"
#include "AppConfiguration.h"
void UserMQTTEventHndlr(int idx, void *handler_args, esp_event_base_t base, int32_t event_id, void *event_data);
void SaveUserConf();
void app_main(void)
{
regUserEventHandler(&UserMQTTEventHndlr, NULL);
regCustomSaveConf(&SaveUserConf);
regCustomPayloadTypeHandler(NULL);
RegAppVariables();
RegObjects();
WebGuiAppInit();
if (GetUserAppNeedReset())
{
SetUserAppNeedReset(false);
ESP_ERROR_CHECK(InitAppConfig());
}
ESP_ERROR_CHECK(InitAppConfig());
while (true)
{
sleep(1);
}
}