refact auth

This commit is contained in:
2025-06-08 10:06:28 +01:00
parent 71b6cb7878
commit 214cf1ee04
236 changed files with 466 additions and 251 deletions

View File

@@ -24,6 +24,9 @@
#include "wifi.h"
#include "logger.h"
#include "auth.h"
#define EVSE_MANAGER_TICK_PERIOD_MS 1000 // 1 segundo
#define AP_CONNECTION_TIMEOUT 60000 // 60sec
#define RESET_HOLD_TIME 10000 // 10sec
@@ -211,6 +214,10 @@ static bool ota_diagnostic(void)
static void init_modules(void)
{
QueueHandle_t auth_queue = xQueueCreate(10, sizeof(auth_event_t));
wifi_ini();
peripherals_init();
api_init();
@@ -219,12 +226,16 @@ static void init_modules(void)
evse_init(); // Cria a task para FSM
button_init();
auth_init();
auth_set_event_queue(auth_queue);
evse_manager_start(auth_queue);
// Outros módulos (descomente conforme necessário)
// meter_init();
// ocpp_start();
// serial_mdb_start();
// currentshaper_start();
// initRc522();
// initWiegand();
// serial_mt_start();
// master_sync_start();