35 lines
627 B
C
35 lines
627 B
C
#pragma once
|
|
|
|
#include <stdbool.h>
|
|
#include <stdint.h>
|
|
|
|
#include "esp_err.h"
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
typedef struct {
|
|
char temp[16];
|
|
char hum[16];
|
|
char soil[16];
|
|
char lux[16];
|
|
bool pump_on;
|
|
bool light_on;
|
|
bool auto_mode;
|
|
float soil_on_threshold;
|
|
float soil_off_threshold;
|
|
float light_on_threshold;
|
|
float light_off_threshold;
|
|
bool i2c_ready;
|
|
bool soil_sensor_ready;
|
|
uint32_t loop_counter;
|
|
} status_web_snapshot_t;
|
|
|
|
esp_err_t status_web_start(uint16_t port);
|
|
esp_err_t status_web_update(const status_web_snapshot_t *snapshot);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|