mirror of
https://git.beihong.wang/wangbeihong/iot-bedroom-environment-controller.git
synced 2026-04-23 21:33:03 +08:00
- 环境监测:温湿度/光照/空气质量传感器采集 - 智能控制:时间段/降温/通风三种自动模式 - 闹钟系统:3个闹钟+温和唤醒功能 - 远程控制:MQTT双向通信 - 本地显示:LVGL图形界面 - 双MCU架构,FreeRTOS 10任务并行 - 完整的1250行README文档
38 lines
900 B
C
38 lines
900 B
C
#ifndef UI_DISPLAY_H
|
||
#define UI_DISPLAY_H
|
||
|
||
#ifdef __cplusplus
|
||
extern "C" {
|
||
#endif
|
||
|
||
/**
|
||
* @brief 初始化UI界面
|
||
*
|
||
* 该函数负责创建LVGL的用户界面元素,用于显示传感器数据
|
||
*/
|
||
void ui_display_init(void);
|
||
|
||
/**
|
||
* @brief 更新传感器数据显示
|
||
*
|
||
* 该函数用于更新LVGL界面上的传感器数据
|
||
*
|
||
* @param temperature 温度值(°C),-1.0表示无效
|
||
* @param humidity 湿度值(%),-1.0表示无效
|
||
* @param lux 光照强度(lx),-1.0表示无效
|
||
* @param ppm 空气中有害气体浓度(ppm)
|
||
* @param quality_level 空气质量等级描述
|
||
*/
|
||
void ui_update_sensor_data(float temperature, float humidity, float lux, float ppm, const char* quality_level);
|
||
|
||
/* Time page APIs */
|
||
void ui_show_time_page(void);
|
||
void ui_show_sensor_page(void);
|
||
void ui_time_update(void);
|
||
void ui_toggle_page(void);
|
||
|
||
#ifdef __cplusplus
|
||
}
|
||
#endif
|
||
|
||
#endif /* UI_DISPLAY_H */ |