add net manager
This commit is contained in:
@@ -1,6 +1,4 @@
|
||||
#include "loadbalancer.h"
|
||||
#include "gridmeter.h"
|
||||
#include "evsemeter.h"
|
||||
#include "evse_api.h"
|
||||
#include "esp_event.h"
|
||||
#include "esp_log.h"
|
||||
@@ -23,6 +21,8 @@ static input_filter_t evse_filter;
|
||||
|
||||
static void grid_event_handler(void *arg, esp_event_base_t base, int32_t id, void *data)
|
||||
{
|
||||
|
||||
/*
|
||||
if (id == GRIDMETER_EVENT_UPDATE && data)
|
||||
{
|
||||
float raw;
|
||||
@@ -30,10 +30,13 @@ static void grid_event_handler(void *arg, esp_event_base_t base, int32_t id, voi
|
||||
grid_current = input_filter_update(&grid_filter, raw);
|
||||
ESP_LOGD(TAG, "Grid current (filtered): %.2f A", grid_current);
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
static void evse_event_handler(void *arg, esp_event_base_t base, int32_t id, void *data)
|
||||
{
|
||||
|
||||
/*
|
||||
if (id == EVSEMETER_EVENT_UPDATE && data)
|
||||
{
|
||||
float raw;
|
||||
@@ -41,12 +44,14 @@ static void evse_event_handler(void *arg, esp_event_base_t base, int32_t id, voi
|
||||
evse_current = input_filter_update(&evse_filter, raw);
|
||||
ESP_LOGD(TAG, "EVSE current (filtered): %.2f A", evse_current);
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
void loadbalancer_init(void)
|
||||
{
|
||||
ESP_LOGI(TAG, "Initializing load balancer");
|
||||
|
||||
/*
|
||||
input_filter_init(&grid_filter, 0.3f);
|
||||
input_filter_init(&evse_filter, 0.3f);
|
||||
|
||||
@@ -63,6 +68,7 @@ void loadbalancer_init(void)
|
||||
if (xTaskCreate(loadbalancer_task, "loadbalancer", 4096, NULL, 5, NULL) != pdPASS) {
|
||||
ESP_LOGE(TAG, "Failed to create loadbalancer task");
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
void loadbalancer_task(void *param)
|
||||
|
||||
Reference in New Issue
Block a user