#pragma once
#include <stdbool.h>
#include "freertos/FreeRTOS.h"

#define BIT0     0x00000001
#define WIFI_CONNECTED_BIT BIT0

typedef enum eIHMEvent_t{
    IHM_EVT_WIFI_STATUS,
    IHM_EVT_TIME_SETTED,
    IHM_EVT_OTA_STARTED,
    IHM_EVT_OTA_PROGRESS,
    IHM_EVT_HUMID_TEMP,
    IHM_EVT_PUISSANCE_EMISE,
    IHM_EVT_ETAT_MACHINE,
    IHM_EVT_HAUTEUR_CUVE,
} eIHMEvent_t;

typedef struct IHM_EVENT
{
    eIHMEvent_t eEventType; /* Tells the receiving task what the event is. */
    void *pvData; /* Holds or points to any data associated with the event. */
    bool bNeedToFreeData; // ← Important !
} xIHMEvent_t;

typedef enum domo_events{
    EVT_WIFI_CONNECTED,
    EVT_TIME_SETTED,
    EVT_BTN_VOLET,
    EVT_PUISSANCE_RECUE,
    EVT_ETAT_MACHINE,
    EVT_HAUTEUR_CUVE
} domo_events;
void startEvtManager();
QueueHandle_t getIHMQueueHandle();
void send_event(domo_events evt, void *pDatas);
