添加人体门状态检测功能,包含初始化和读取状态的逻辑,并更新主程序以集成此功能

This commit is contained in:
Wang Beihong
2026-04-21 02:00:55 +08:00
parent cdc35d323a
commit 64c56fcca9
10 changed files with 140 additions and 41 deletions

View File

@@ -534,7 +534,7 @@
"MAIN": {
"DEFAULT": {
"text_font": "number_16",
"text_color": "#d17f7f"
"text_color": "#ff5e5e"
}
}
}
@@ -585,7 +585,7 @@
"MAIN": {
"DEFAULT": {
"text_font": "number_16",
"text_color": "#d17f7f"
"text_color": "#ff5e5e"
}
}
}
@@ -636,7 +636,7 @@
"MAIN": {
"DEFAULT": {
"text_font": "number_16",
"text_color": "#d17f7f"
"text_color": "#ff5e5e"
}
}
}
@@ -736,7 +736,7 @@
"MAIN": {
"DEFAULT": {
"text_font": "chinese_16",
"text_color": "#d17f7f"
"text_color": "#ff5e5e"
}
}
}
@@ -836,7 +836,7 @@
"MAIN": {
"DEFAULT": {
"text_font": "number_16",
"text_color": "#d17f7f"
"text_color": "#ff5e5e"
}
}
}
@@ -936,7 +936,7 @@
"MAIN": {
"DEFAULT": {
"text_font": "chinese_16",
"text_color": "#d17f7f"
"text_color": "#ff5e5e"
}
}
}
@@ -1036,7 +1036,7 @@
"MAIN": {
"DEFAULT": {
"text_font": "number_16",
"text_color": "#d17f7f"
"text_color": "#ff5e5e"
}
}
}
@@ -1136,14 +1136,14 @@
"MAIN": {
"DEFAULT": {
"text_font": "chinese_16",
"text_color": "#d17f7f"
"text_color": "#ff5e5e"
}
}
}
},
"group": "",
"groupIndex": 0,
"text": "door_status",
"text": "hum_status",
"textType": "expression",
"longMode": "WRAP",
"recolor": false,
@@ -1383,7 +1383,7 @@
"MAIN": {
"DEFAULT": {
"text_font": "chinese_16",
"text_color": "#d17f7f"
"text_color": "#ff5e5e"
}
}
}
@@ -1434,7 +1434,7 @@
"MAIN": {
"DEFAULT": {
"text_font": "chinese_16",
"text_color": "#d17f7f"
"text_color": "#ff5e5e"
}
}
}
@@ -1485,7 +1485,7 @@
"MAIN": {
"DEFAULT": {
"text_font": "chinese_16",
"text_color": "#d17f7f"
"text_color": "#ff5e5e"
}
}
}
@@ -1536,7 +1536,7 @@
"MAIN": {
"DEFAULT": {
"text_font": "chinese_16",
"text_color": "#d17f7f"
"text_color": "#ff5e5e"
}
}
}

View File

@@ -77,7 +77,7 @@ void create_screen_main() {
lv_obj_set_pos(obj, 17, 72);
lv_obj_set_size(obj, LV_SIZE_CONTENT, LV_SIZE_CONTENT);
lv_obj_set_style_text_font(obj, &ui_font_number_16, LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_text_color(obj, lv_color_hex(0xffd17f7f), LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_text_color(obj, lv_color_hex(0xffff5e5e), LV_PART_MAIN | LV_STATE_DEFAULT);
lv_label_set_text(obj, "");
}
{
@@ -86,7 +86,7 @@ void create_screen_main() {
lv_obj_set_pos(obj, 167, 73);
lv_obj_set_size(obj, LV_SIZE_CONTENT, LV_SIZE_CONTENT);
lv_obj_set_style_text_font(obj, &ui_font_number_16, LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_text_color(obj, lv_color_hex(0xffd17f7f), LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_text_color(obj, lv_color_hex(0xffff5e5e), LV_PART_MAIN | LV_STATE_DEFAULT);
lv_label_set_text(obj, "");
}
{
@@ -95,7 +95,7 @@ void create_screen_main() {
lv_obj_set_pos(obj, 17, 107);
lv_obj_set_size(obj, LV_SIZE_CONTENT, LV_SIZE_CONTENT);
lv_obj_set_style_text_font(obj, &ui_font_number_16, LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_text_color(obj, lv_color_hex(0xffd17f7f), LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_text_color(obj, lv_color_hex(0xffff5e5e), LV_PART_MAIN | LV_STATE_DEFAULT);
lv_label_set_text(obj, "");
}
{
@@ -111,7 +111,7 @@ void create_screen_main() {
lv_obj_set_pos(obj, 163, 140);
lv_obj_set_size(obj, LV_SIZE_CONTENT, LV_SIZE_CONTENT);
lv_obj_set_style_text_font(obj, &ui_font_chinese_16, LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_text_color(obj, lv_color_hex(0xffd17f7f), LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_text_color(obj, lv_color_hex(0xffff5e5e), LV_PART_MAIN | LV_STATE_DEFAULT);
lv_label_set_text(obj, "");
}
{
@@ -127,7 +127,7 @@ void create_screen_main() {
lv_obj_set_pos(obj, 17, 142);
lv_obj_set_size(obj, LV_SIZE_CONTENT, LV_SIZE_CONTENT);
lv_obj_set_style_text_font(obj, &ui_font_number_16, LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_text_color(obj, lv_color_hex(0xffd17f7f), LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_text_color(obj, lv_color_hex(0xffff5e5e), LV_PART_MAIN | LV_STATE_DEFAULT);
lv_label_set_text(obj, "");
}
{
@@ -143,7 +143,7 @@ void create_screen_main() {
lv_obj_set_pos(obj, 14, 176);
lv_obj_set_size(obj, LV_SIZE_CONTENT, LV_SIZE_CONTENT);
lv_obj_set_style_text_font(obj, &ui_font_chinese_16, LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_text_color(obj, lv_color_hex(0xffd17f7f), LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_text_color(obj, lv_color_hex(0xffff5e5e), LV_PART_MAIN | LV_STATE_DEFAULT);
lv_label_set_text(obj, "");
}
{
@@ -159,7 +159,7 @@ void create_screen_main() {
lv_obj_set_pos(obj, 167, 106);
lv_obj_set_size(obj, LV_SIZE_CONTENT, LV_SIZE_CONTENT);
lv_obj_set_style_text_font(obj, &ui_font_number_16, LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_text_color(obj, lv_color_hex(0xffd17f7f), LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_text_color(obj, lv_color_hex(0xffff5e5e), LV_PART_MAIN | LV_STATE_DEFAULT);
lv_label_set_text(obj, "");
}
{
@@ -175,7 +175,7 @@ void create_screen_main() {
lv_obj_set_pos(obj, 139, 176);
lv_obj_set_size(obj, LV_SIZE_CONTENT, LV_SIZE_CONTENT);
lv_obj_set_style_text_font(obj, &ui_font_chinese_16, LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_text_color(obj, lv_color_hex(0xffd17f7f), LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_text_color(obj, lv_color_hex(0xffff5e5e), LV_PART_MAIN | LV_STATE_DEFAULT);
lv_label_set_text(obj, "");
}
{
@@ -212,7 +212,7 @@ void create_screen_main() {
lv_obj_set_pos(obj, 49, 206);
lv_obj_set_size(obj, LV_SIZE_CONTENT, LV_SIZE_CONTENT);
lv_obj_set_style_text_font(obj, &ui_font_chinese_16, LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_text_color(obj, lv_color_hex(0xffd17f7f), LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_text_color(obj, lv_color_hex(0xffff5e5e), LV_PART_MAIN | LV_STATE_DEFAULT);
lv_label_set_text(obj, "");
}
{
@@ -221,7 +221,7 @@ void create_screen_main() {
lv_obj_set_pos(obj, 95, 206);
lv_obj_set_size(obj, LV_SIZE_CONTENT, LV_SIZE_CONTENT);
lv_obj_set_style_text_font(obj, &ui_font_chinese_16, LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_text_color(obj, lv_color_hex(0xffd17f7f), LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_text_color(obj, lv_color_hex(0xffff5e5e), LV_PART_MAIN | LV_STATE_DEFAULT);
lv_label_set_text(obj, "");
}
{
@@ -230,7 +230,7 @@ void create_screen_main() {
lv_obj_set_pos(obj, 143, 206);
lv_obj_set_size(obj, LV_SIZE_CONTENT, LV_SIZE_CONTENT);
lv_obj_set_style_text_font(obj, &ui_font_chinese_16, LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_text_color(obj, lv_color_hex(0xffd17f7f), LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_text_color(obj, lv_color_hex(0xffff5e5e), LV_PART_MAIN | LV_STATE_DEFAULT);
lv_label_set_text(obj, "");
}
{
@@ -239,7 +239,7 @@ void create_screen_main() {
lv_obj_set_pos(obj, 192, 206);
lv_obj_set_size(obj, LV_SIZE_CONTENT, LV_SIZE_CONTENT);
lv_obj_set_style_text_font(obj, &ui_font_chinese_16, LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_text_color(obj, lv_color_hex(0xffd17f7f), LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_text_color(obj, lv_color_hex(0xffff5e5e), LV_PART_MAIN | LV_STATE_DEFAULT);
lv_label_set_text(obj, "");
}
{

View File

@@ -123,7 +123,7 @@ const uint8_t assets[2068] = {
0x00, 0xE0, 0x00, 0x00, 0x00, 0xE0, 0x00, 0x00, 0x00, 0xE0, 0x00, 0x00, 0x00, 0xE0, 0x00, 0x00,
0x00, 0xE0, 0x00, 0x00, 0x00, 0xE0, 0x00, 0x00, 0x06, 0x60, 0x00, 0xE0, 0x00, 0xE0, 0x00, 0x00,
0x00, 0xE0, 0x00, 0x00, 0x00, 0xE0, 0x00, 0x00, 0x00, 0xE0, 0x00, 0x00, 0x00, 0xE0, 0x00, 0x00,
0x00, 0xE0, 0x00, 0x00, 0x03, 0x60, 0x00, 0xE0, 0x00, 0xE0, 0x00, 0x00, 0x00, 0xE0, 0x00, 0x00,
0x00, 0xE0, 0x00, 0x00, 0x0B, 0x60, 0x00, 0xE0, 0x00, 0xE0, 0x00, 0x00, 0x00, 0xE0, 0x00, 0x00,
0x00, 0xE0, 0x00, 0x00, 0x00, 0xE0, 0x00, 0x00, 0x00, 0xE0, 0x00, 0x00, 0x00, 0xE0, 0x00, 0x00,
0x00, 0xE0, 0x00, 0x00, 0x00, 0xE0, 0x00, 0x00, 0x00, 0xE0, 0x00, 0x00, 0x00, 0xE0, 0x00, 0x00,
0x00, 0xE0, 0x00, 0x00, 0x00, 0xE0, 0x00, 0x00, 0x00, 0xE0, 0x00, 0x00, 0x00, 0xE0, 0x00, 0x00,