Files
Smart-flower-system/main/status_web.h
Wang Beihong fcc2d0825d first commit
2026-03-14 14:19:32 +08:00

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