first commit

This commit is contained in:
Wang Beihong
2026-03-14 14:19:32 +08:00
commit fcc2d0825d
68 changed files with 16382 additions and 0 deletions

34
main/status_web.h Normal file
View File

@@ -0,0 +1,34 @@
#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