新增:添加 Wi-Fi 和 MQTT 连接状态变量,并更新 UI
- 引入了新的全局变量,用于跟踪 Wi-Fi 和 MQTT 连接状态。 - 实现了 Wi-Fi 和 MQTT 连接状态的 getter 和 setter 函数。 - 增加了管理网络信息和时间同步的功能。 - 更新了主应用程序逻辑,以反映 UI 中的当前连接状态。 - 改进了 Wi-Fi 连接处理,以定期发布网络信息。 -土壤湿度和空气温度的综合阈值变量被整合到 UI 中。
This commit is contained in:
20
components/sntp_timp/include/sntp_timp.h
Normal file
20
components/sntp_timp/include/sntp_timp.h
Normal file
@@ -0,0 +1,20 @@
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
#include "esp_err.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief 初始化 SNTP 并等待首次对时完成
|
||||
*
|
||||
* @param timeout_ms 等待首次同步的超时时间(毫秒)
|
||||
* @return esp_err_t ESP_OK 表示已完成同步
|
||||
*/
|
||||
esp_err_t sntp_timp_sync_time(uint32_t timeout_ms);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
Reference in New Issue
Block a user