GrowNode
gn_watering_control.c File Reference

Data Structures

struct  gn_watering_control_data_t
 

Macros

#define TAG   "gn_leaf_watering_control"
 

Enumerations

enum  gn_hcc_status {
  HCC_HEATING , HCC_COOLING , HCC_OFF , HCC_HEATING ,
  HCC_COOLING , HCC_OFF
}
 
enum  gn_wat_status {
  WAT_WAIT , WAT_ON , WAT_OFF , WAT_WAIT ,
  WAT_ON , WAT_OFF
}
 

Functions

void gn_watering_control_task (gn_leaf_handle_t leaf_config)
 
gn_leaf_param_validator_result_t _gn_watering_interval_validator (gn_leaf_param_handle_t param, void **param_value)
 
gn_leaf_param_validator_result_t _gn_watering_time_validator (gn_leaf_param_handle_t param, void **param_value)
 
gn_leaf_param_validator_result_t _gn_watering_target_temp_validator (gn_leaf_param_handle_t param, void **param_value)
 
static void _gn_watering_control_stop_watering (gn_watering_control_data_t *data)
 
static void _gn_watering_control_start_watering (gn_watering_control_data_t *data)
 
static void _gn_watering_control_stop_hcc (gn_watering_control_data_t *data)
 
static void _gn_watering_control_start_hcc_heating (gn_watering_control_data_t *data)
 
static void _gn_watering_control_start_hcc_cooling (gn_watering_control_data_t *data)
 
static bool _gn_watering_control_hcc_temp_low (double p_wat_temp, double p_wat_t_temp)
 
static bool _gn_watering_control_hcc_temp_high (double p_wat_temp, double p_wat_t_temp)
 
static bool _gn_watering_control_hcc_temp_ok (double p_wat_temp, double p_wat_t_temp)
 
void _gn_watering_callback_intl (gn_leaf_handle_t leaf_config)
 
gn_leaf_descriptor_handle_t gn_watering_control_config (gn_leaf_handle_t leaf_config)
 

Variables

static const char * HCC = "hcc"
 
static const char * WATERPUMPIN = "waterpumpin"
 
static const char * PLT_B = "plt_b"
 
static const char * PLT_A = "plt_a"
 
static const char * BME280 = "bme280"
 
static const char * DS18B20 = "ds18b20"
 
static const char * WATERLEVELIN = "waterlevelin"
 

Macro Definition Documentation

◆ TAG

#define TAG   "gn_leaf_watering_control"

Enumeration Type Documentation

◆ gn_hcc_status

Enumerator
HCC_HEATING 
HCC_COOLING 
HCC_OFF 
HCC_HEATING 
HCC_COOLING 
HCC_OFF 

◆ gn_wat_status

Enumerator
WAT_WAIT 
WAT_ON 
WAT_OFF 
WAT_WAIT 
WAT_ON 
WAT_OFF 

Function Documentation

◆ _gn_watering_callback_intl()

void _gn_watering_callback_intl ( gn_leaf_handle_t  leaf_config)

◆ _gn_watering_control_hcc_temp_high()

static bool _gn_watering_control_hcc_temp_high ( double  p_wat_temp,
double  p_wat_t_temp 
)
inlinestatic

◆ _gn_watering_control_hcc_temp_low()

static bool _gn_watering_control_hcc_temp_low ( double  p_wat_temp,
double  p_wat_t_temp 
)
inlinestatic

◆ _gn_watering_control_hcc_temp_ok()

static bool _gn_watering_control_hcc_temp_ok ( double  p_wat_temp,
double  p_wat_t_temp 
)
inlinestatic

◆ _gn_watering_control_start_hcc_cooling()

static void _gn_watering_control_start_hcc_cooling ( gn_watering_control_data_t data)
inlinestatic

◆ _gn_watering_control_start_hcc_heating()

static void _gn_watering_control_start_hcc_heating ( gn_watering_control_data_t data)
inlinestatic

◆ _gn_watering_control_start_watering()

static void _gn_watering_control_start_watering ( gn_watering_control_data_t data)
inlinestatic

◆ _gn_watering_control_stop_hcc()

static void _gn_watering_control_stop_hcc ( gn_watering_control_data_t data)
inlinestatic

◆ _gn_watering_control_stop_watering()

static void _gn_watering_control_stop_watering ( gn_watering_control_data_t data)
inlinestatic

◆ _gn_watering_interval_validator()

gn_leaf_param_validator_result_t _gn_watering_interval_validator ( gn_leaf_param_handle_t  param,
void **  param_value 
)

◆ _gn_watering_target_temp_validator()

gn_leaf_param_validator_result_t _gn_watering_target_temp_validator ( gn_leaf_param_handle_t  param,
void **  param_value 
)

◆ _gn_watering_time_validator()

gn_leaf_param_validator_result_t _gn_watering_time_validator ( gn_leaf_param_handle_t  param,
void **  param_value 
)

◆ gn_watering_control_config()

gn_leaf_descriptor_handle_t gn_watering_control_config ( gn_leaf_handle_t  leaf_config)

◆ gn_watering_control_task()

void gn_watering_control_task ( gn_leaf_handle_t  leaf_config)

Variable Documentation

◆ BME280

const char* BME280 = "bme280"
static

◆ DS18B20

const char* DS18B20 = "ds18b20"
static

◆ HCC

const char* HCC = "hcc"
static

◆ PLT_A

const char* PLT_A = "plt_a"
static

◆ PLT_B

const char* PLT_B = "plt_b"
static

◆ WATERLEVELIN

const char* WATERLEVELIN = "waterlevelin"
static

◆ WATERPUMPIN

const char* WATERPUMPIN = "waterpumpin"
static