mirror of
https://github.com/MrUnknownDE/OpenIris-ESPIDF.git
synced 2026-04-19 06:23:44 +02:00
Move REST API poll and led manager state display to tasks, beginng led manager refactor
This commit is contained in:
@@ -71,6 +71,16 @@ void RestAPI::poll()
|
||||
mg_mgr_poll(&mgr, 100);
|
||||
}
|
||||
|
||||
void HandleRestAPIPollTask(void *pvParameter)
|
||||
{
|
||||
RestAPI *rest_api_handler = static_cast<RestAPI *>(pvParameter);
|
||||
while (1)
|
||||
{
|
||||
rest_api_handler->poll();
|
||||
vTaskDelay(1000);
|
||||
}
|
||||
}
|
||||
|
||||
// COMMANDS
|
||||
// updates
|
||||
void RestAPI::handle_update_wifi(RequestContext *context)
|
||||
|
||||
@@ -63,4 +63,6 @@ namespace RestAPIHelpers
|
||||
void event_handler(struct mg_connection *connection, int event, void *event_data);
|
||||
};
|
||||
|
||||
void HandleRestAPIPollTask(void *pvParameter);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user