feat: 添加健康监控系统并重构代码结构
- 新增health_monitor模块,包含温度、电压、WiFi RSSI监控功能 - 移除旧的app_main.h/app_main.c和debug模块,将调试日志移动到monitor目录 - 在main.cpp中替换system_monitor_task为health_monitor_task - 更新CMakeLists.txt依赖项,添加esp_driver_tsens和esp_driver_uart - 修改WiFi配置参数,更新SSID和密码设置方式 - 在Python工具中修复OTA客户端重新连接逻辑 - 调整任务优先级分配,统一使用核心0以适配ESP32-C3单核架构
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
/*
|
||||
* health_monitor.h - 系统健康监控头文件
|
||||
*/
|
||||
#ifndef HEALTH_MONITOR_H
|
||||
#define HEALTH_MONITOR_H
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
#include "app_config.h"
|
||||
@@ -30,9 +29,9 @@ extern health_state_t g_health_state;
|
||||
#define WIFI_RSSI_WEAK WIFI_RSSI_CRITICAL
|
||||
|
||||
// 函数声明
|
||||
extern health_status_t health_check_before_ota(void);
|
||||
extern void health_log_event(const char *event, int value);
|
||||
extern health_state_t health_get_current(void);
|
||||
extern health_status_t health_update_from_wifi_rssi(int8_t rssi);
|
||||
|
||||
#endif // HEALTH_MONITOR_H
|
||||
void health_monitor_init(void);
|
||||
void health_monitor_task(void *pvParameters);
|
||||
health_status_t health_check_before_ota(void);
|
||||
void health_log_event(const char *event, int value);
|
||||
health_state_t health_get_current(void);
|
||||
health_status_t health_update_from_wifi_rssi(int8_t rssi);
|
||||
|
||||
Reference in New Issue
Block a user