添加对额外 UI 资源和火焰状态变量的支持

- 增加了 `ui.h` 中资源数组的大小以容纳新的 UI 元素。
- 更新了 `ui_font_chinese_16.c`,添加了更多中文字符以更好地支持本地化。
- 在 `vars.h` 中添加了用于管理火焰状态的新函数,增强了系统的监测能力。
This commit is contained in:
Wang Beihong
2026-04-21 02:25:20 +08:00
parent 64c56fcca9
commit 79b546632b
21 changed files with 978 additions and 401 deletions

View File

@@ -65,3 +65,8 @@ bool mq2_is_alarm(float percent, float threshold_percent)
{
return percent >= threshold_percent;
}
adc_oneshot_unit_handle_t mq2_get_adc_handle(void)
{
return s_adc_handle;
}

View File

@@ -4,6 +4,7 @@
#include <stdint.h>
#include "esp_err.h"
#include "esp_adc/adc_oneshot.h"
#ifdef __cplusplus
extern "C" {
@@ -32,6 +33,11 @@ esp_err_t mq2_read_percent(float *percent_out);
*/
bool mq2_is_alarm(float percent, float threshold_percent);
/**
* @brief 获取 MQ-2 使用的 ADC oneshot 句柄ADC1
*/
adc_oneshot_unit_handle_t mq2_get_adc_handle(void);
#ifdef __cplusplus
}
#endif