Files
BotanicalBuddy/components/ui/vars.h
Wang Beihong cf3634bebb feat:重构空气温度处理并改进UI屏幕切换
- 从vars.c和vars.h中移除了空气温度整型变量及其相关的获取/设置函数
- 更新了FlowGlobalVariables枚举,移除了空气温度整型常量
- 修改了main.c中的UI任务,实现了每3秒切换屏幕的机制
- 清理了app_main函数,移除了空气温度整型的设置,仅保留字符串表示形式
2026-03-06 22:54:22 +08:00

37 lines
899 B
C

#ifndef EEZ_LVGL_UI_VARS_H
#define EEZ_LVGL_UI_VARS_H
#include <stdint.h>
#include <stdbool.h>
#ifdef __cplusplus
extern "C" {
#endif
// enum declarations
// Flow global variables
enum FlowGlobalVariables {
FLOW_GLOBAL_VARIABLE_AIR_TEMPERATURE = 0,
FLOW_GLOBAL_VARIABLE_AIR_HUMIDITY = 1,
FLOW_GLOBAL_VARIABLE_SOIL_MOISTURE = 2,
FLOW_GLOBAL_VARIABLE_LIGHT_INTENSITY = 3
};
// Native global variables
extern const char *get_var_air_temperature();
extern void set_var_air_temperature(const char *value);
extern const char *get_var_air_humidity();
extern void set_var_air_humidity(const char *value);
extern const char *get_var_soil_moisture();
extern void set_var_soil_moisture(const char *value);
extern const char *get_var_light_intensity();
extern void set_var_light_intensity(const char *value);
#ifdef __cplusplus
}
#endif
#endif /*EEZ_LVGL_UI_VARS_H*/