evse_link feature

This commit is contained in:
2025-08-05 16:55:11 +01:00
parent bd587a10c0
commit 0d0dc5b129
35 changed files with 4353 additions and 2257 deletions

View File

@@ -16,7 +16,7 @@ typedef struct {
} buzzer_step_t;
// Padrões de buzzer
static const buzzer_step_t pattern_plugged[] = {{100, 100}, {200, 0}};
static const buzzer_step_t pattern_plugged[] = {{200, 100}};
static const buzzer_step_t pattern_unplugged[] = {{150, 150}, {150, 150}, {150, 0}};
static const buzzer_step_t pattern_charging[] = {{80, 150}, {100, 120}, {120, 100}, {140, 0}};
static const buzzer_step_t pattern_ap_start[] = {{300, 150}, {300, 0}};
@@ -76,7 +76,7 @@ static void evse_event_handler(void *arg, esp_event_base_t base, int32_t id, voi
if (base != EVSE_EVENTS || id != EVSE_EVENT_STATE_CHANGED || data == NULL) return;
const evse_state_event_data_t *evt = (const evse_state_event_data_t *)data;
ESP_LOGD(TAG, "EVSE event received: state = %d", evt->state);
ESP_LOGI(TAG, "EVSE event received: state = %d", evt->state);
buzzer_event_data_t buzzer_evt = {0};
@@ -115,7 +115,7 @@ static void auth_event_handler(void *arg, esp_event_base_t base, int32_t id, voi
if (id == AUTH_EVENT_TAG_PROCESSED) {
const auth_tag_event_data_t *evt = (const auth_tag_event_data_t *)event_data;
ESP_LOGD(TAG, "AUTH processed: tag=%s authorized=%d", evt->tag, evt->authorized);
ESP_LOGI(TAG, "AUTH processed: tag=%s authorized=%d", evt->tag, evt->authorized);
buzzer_evt.pattern = evt->authorized ? BUZZER_PATTERN_CARD_READ : BUZZER_PATTERN_CARD_DENIED;
} else if (id == AUTH_EVENT_TAG_SAVED) {