docs(readme): 更新调试日志与上位机通信说明

更新了 README.md 中关于调试日志与上位机通信的部分,详细说明了当
前通信架构分为两类:
1. 业务通信:HTTP 接口用于 WebUI 与 ESP32 通信
2. 调试镜像:UART0 + UDP 用于独立调试接收器

明确区分了 WebUI 使用的 HTTP 接口功能,并移除了不再需要的心跳包
说明。

refactor(health): 移除健康监控模块的备份文件

删除了 _assistant_backups 目录中的 health_monitor.cpp 和
health_monitor.h 备份文件,清理项目结构。
This commit is contained in:
小龙虾
2026-05-05 04:48:31 +08:00
parent 478e5e5a31
commit f598b9acb3
20 changed files with 955 additions and 1420 deletions
+40 -1
View File
@@ -28,12 +28,51 @@ extern health_state_t g_health_state;
#define WIFI_RSSI_NORMAL WIFI_RSSI_WARNING
#define WIFI_RSSI_WEAK WIFI_RSSI_CRITICAL
// 函数声明
/**
* @brief 初始化健康监控模块,创建内部互斥锁与基础状态。
*/
void health_monitor_init(void);
/**
* @brief 健康监控任务入口,负责启动温度/电压定时检测并周期性巡检系统状态。
* @param pvParameters FreeRTOS 任务参数,未使用。
*/
void health_monitor_task(void *pvParameters);
/**
* @brief 在 OTA 传输开始前执行健康检查,返回当前是否允许传输。
* @return 健康检查结果,决定是否允许 OTA。
*/
health_status_t health_check_before_ota(void);
/**
* @brief 记录一条健康相关事件日志,便于故障追踪与状态回溯。
* @param event 事件名称字符串。
* @param value 事件关联的数值。
*/
void health_log_event(const char *event, int value);
/**
* @brief 获取当前系统健康状态。
* @return 当前健康状态枚举值。
*/
health_state_t health_get_current(void);
/**
* @brief 根据最新 WiFi RSSI 更新健康状态,并返回对应健康检查结果。
* @param rssi 当前 WiFi 信号强度(dBm)。
* @return 健康检查结果。
*/
health_status_t health_update_from_wifi_rssi(int8_t rssi);
/**
* @brief 获取最近一次采样到的芯片温度(摄氏度)。
* @return 最近一次温度采样值(摄氏度)。
*/
float health_get_last_temperature(void);
/**
* @brief 获取最近一次记录的系统电压估算值(伏特)。
* @return 最近一次电压估算值(伏特)。
*/
float health_get_last_voltage(void);