- 引入了新的全局变量,用于跟踪 Wi-Fi 和 MQTT 连接状态。 - 实现了 Wi-Fi 和 MQTT 连接状态的 getter 和 setter 函数。 - 增加了管理网络信息和时间同步的功能。 - 更新了主应用程序逻辑,以反映 UI 中的当前连接状态。 - 改进了 Wi-Fi 连接处理,以定期发布网络信息。 -土壤湿度和空气温度的综合阈值变量被整合到 UI 中。
21 lines
358 B
C
21 lines
358 B
C
#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
|