refact auth
This commit is contained in:
13
main/main.c
13
main/main.c
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user