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:
小龙虾
2026-04-27 02:34:47 +08:00
parent bcfe130451
commit 7bb28cee1e
32 changed files with 177 additions and 191 deletions
+5 -3
View File
@@ -12,19 +12,21 @@
// ============================================================
// 0 = AP 模式(设备当热点)
// 1 = STA 模式(连接路由器)
#define CONFIG_WIFI_MODE_IS_STA 1
inline constexpr uint8_t CONFIG_WIFI_MODE = 1;
// ============================================================
// WiFi STA 模式配置(连接路由器)
// ============================================================
inline constexpr const char* WIFI_STA_SSID = "你的WiFi名称";
inline constexpr const char* WIFI_STA_PASSWORD = "你的WiFi密码";
inline constexpr const char* WIFI_STA_SSID = "004舰桥";
inline constexpr const char* WIFI_STA_PASSWORD = "q13362875622";
inline constexpr uint32_t WIFI_STA_CONNECT_TIMEOUT_MS = 30000;
// STA 静态 IP
inline constexpr uint8_t WIFI_STA_USE_STATIC_IP = 0; // 设为 1 启用静态 IP
#define WIFI_STA_STATIC_IP_IS_ENABLED 0
#if WIFI_STA_USE_STATIC_IP
#if WIFI_STA_STATIC_IP_IS_ENABLED
inline constexpr const char* WIFI_STA_STATIC_IP = "192.168.1.100";
inline constexpr const char* WIFI_STA_STATIC_GW = "192.168.1.1";
inline constexpr const char* WIFI_STA_STATIC_NETMASK = "255.255.255.0";