添加对额外 UI 资源和火焰状态变量的支持
- 增加了 `ui.h` 中资源数组的大小以容纳新的 UI 元素。 - 更新了 `ui_font_chinese_16.c`,添加了更多中文字符以更好地支持本地化。 - 在 `vars.h` 中添加了用于管理火焰状态的新函数,增强了系统的监测能力。
This commit is contained in:
21
components/fire_sensor/include/fire_sensor.h
Normal file
21
components/fire_sensor/include/fire_sensor.h
Normal file
@@ -0,0 +1,21 @@
|
||||
#pragma once
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
#include "esp_err.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
// ESP32-S3: GPIO3 -> ADC1_CHANNEL_2
|
||||
#define FIRE_SENSOR_ADC_GPIO 3
|
||||
|
||||
esp_err_t fire_sensor_init(void);
|
||||
esp_err_t fire_sensor_read_raw(int *raw_out);
|
||||
esp_err_t fire_sensor_read_percent(float *percent_out);
|
||||
bool fire_sensor_is_danger(float percent, float threshold_percent);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
Reference in New Issue
Block a user