按下电源键息屏功能编写完毕
This commit is contained in:
parent
460f2fb27c
commit
e0909ac97a
5
.vscode/settings.json
vendored
5
.vscode/settings.json
vendored
@ -27,6 +27,9 @@
|
||||
"cstdlib": "c",
|
||||
"fluxwifi.h": "c",
|
||||
"event_groups.h": "c",
|
||||
"fluxuart.h": "c"
|
||||
"fluxuart.h": "c",
|
||||
"esp_timer.h": "c",
|
||||
"fluxbutton.h": "c",
|
||||
"iot_button.h": "c"
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -10,7 +10,7 @@
|
||||
{
|
||||
"guid": "GUID6950810-1044658S692337",
|
||||
"deepid": 212512280,
|
||||
"dont_export": true,
|
||||
"dont_export": false,
|
||||
"locked": false,
|
||||
"properties": [
|
||||
{
|
||||
@ -10724,7 +10724,7 @@
|
||||
{
|
||||
"guid": "GUID83193135-1071387S4632337",
|
||||
"deepid": -1209922675,
|
||||
"dont_export": true,
|
||||
"dont_export": false,
|
||||
"locked": false,
|
||||
"properties": [
|
||||
{
|
||||
@ -10867,7 +10867,7 @@
|
||||
{
|
||||
"guid": "GUID62856860-1073836S8902337",
|
||||
"deepid": -876778701,
|
||||
"dont_export": true,
|
||||
"dont_export": false,
|
||||
"locked": false,
|
||||
"properties": [
|
||||
{
|
||||
@ -11250,7 +11250,7 @@
|
||||
{
|
||||
"guid": "GUID91783852-1074400S1872337",
|
||||
"deepid": 869159998,
|
||||
"dont_export": true,
|
||||
"dont_export": false,
|
||||
"locked": false,
|
||||
"properties": [
|
||||
{
|
||||
@ -11709,7 +11709,7 @@
|
||||
{
|
||||
"guid": "GUID81809211-1079832S4082337",
|
||||
"deepid": 268258741,
|
||||
"dont_export": true,
|
||||
"dont_export": false,
|
||||
"locked": false,
|
||||
"properties": [
|
||||
{
|
||||
@ -11867,7 +11867,7 @@
|
||||
{
|
||||
"guid": "GUID13795121-1084667S1512337",
|
||||
"deepid": -167881204,
|
||||
"dont_export": true,
|
||||
"dont_export": false,
|
||||
"locked": false,
|
||||
"properties": [
|
||||
{
|
||||
@ -12025,7 +12025,7 @@
|
||||
{
|
||||
"guid": "GUID26406120-1085231S4532337",
|
||||
"deepid": 1738065160,
|
||||
"dont_export": true,
|
||||
"dont_export": false,
|
||||
"locked": false,
|
||||
"properties": [
|
||||
{
|
||||
@ -12183,7 +12183,7 @@
|
||||
{
|
||||
"guid": "GUID22615733-1086359S6972337",
|
||||
"deepid": -1247825409,
|
||||
"dont_export": true,
|
||||
"dont_export": false,
|
||||
"locked": false,
|
||||
"properties": [
|
||||
{
|
||||
@ -12341,7 +12341,7 @@
|
||||
{
|
||||
"guid": "GUID74327713-1087471S7432337",
|
||||
"deepid": -1247825409,
|
||||
"dont_export": true,
|
||||
"dont_export": false,
|
||||
"locked": false,
|
||||
"properties": [
|
||||
{
|
||||
@ -13319,7 +13319,7 @@
|
||||
{
|
||||
"guid": "GUID63132921-502807S48559463",
|
||||
"deepid": -1664674549,
|
||||
"dont_export": true,
|
||||
"dont_export": false,
|
||||
"locked": false,
|
||||
"properties": [
|
||||
{
|
||||
@ -13708,7 +13708,7 @@
|
||||
{
|
||||
"guid": "GUID44718145-502809S803463",
|
||||
"deepid": 31528723,
|
||||
"dont_export": true,
|
||||
"dont_export": false,
|
||||
"locked": false,
|
||||
"properties": [
|
||||
{
|
||||
@ -16562,8 +16562,7 @@
|
||||
"InheritedType": 4
|
||||
}
|
||||
],
|
||||
"saved_objtypeKey": "PANEL",
|
||||
"tree_closed": true
|
||||
"saved_objtypeKey": "PANEL"
|
||||
},
|
||||
{
|
||||
"guid": "GUID46922311-416524S573470",
|
||||
@ -18965,7 +18964,7 @@
|
||||
{
|
||||
"guid": "GUID79596521-416546S49275470",
|
||||
"deepid": -1664674549,
|
||||
"dont_export": true,
|
||||
"dont_export": false,
|
||||
"locked": false,
|
||||
"properties": [
|
||||
{
|
||||
@ -22784,7 +22783,7 @@
|
||||
"uiExportFolderPath": "D:\\yuwell_workspace\\FluxDC\\SquareLineProj\\Export",
|
||||
"projectExportFolderPath": "D:\\yuwell_workspace\\FluxDC\\SquareLineProj\\Export",
|
||||
"custom_variable_prefix": "uic",
|
||||
"backup_cnt": 618,
|
||||
"backup_cnt": 626,
|
||||
"autosave_cnt": 0,
|
||||
"group_color_cnt": 0,
|
||||
"lvgl_version": "8.3.6",
|
||||
|
||||
@ -18,6 +18,21 @@ void ui_pageBattery_screen_init(void)
|
||||
lv_obj_set_style_radius(ui_pageBattery_panelHeader, 0, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_border_width(ui_pageBattery_panelHeader, 0, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
|
||||
ui_pageBattery_labelBack = lv_label_create(ui_pageBattery_panelHeader);
|
||||
lv_obj_set_width(ui_pageBattery_labelBack, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_height(ui_pageBattery_labelBack, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_x(ui_pageBattery_labelBack, 4);
|
||||
lv_obj_set_y(ui_pageBattery_labelBack, 0);
|
||||
lv_obj_set_align(ui_pageBattery_labelBack, LV_ALIGN_LEFT_MID);
|
||||
lv_label_set_text(ui_pageBattery_labelBack, "<");
|
||||
|
||||
ui_pageBattery_labelBattery = lv_label_create(ui_pageBattery_panelHeader);
|
||||
lv_obj_set_width(ui_pageBattery_labelBattery, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_height(ui_pageBattery_labelBattery, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_align(ui_pageBattery_labelBattery, LV_ALIGN_CENTER);
|
||||
lv_label_set_text(ui_pageBattery_labelBattery, "电池");
|
||||
lv_obj_set_style_text_font(ui_pageBattery_labelBattery, &ui_font_MiSansM, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
|
||||
ui_pageBattery_panelUpBody = lv_obj_create(ui_pageBattery);
|
||||
lv_obj_set_width(ui_pageBattery_panelUpBody, 310);
|
||||
lv_obj_set_height(ui_pageBattery_panelUpBody, 221);
|
||||
@ -28,6 +43,15 @@ void ui_pageBattery_screen_init(void)
|
||||
lv_obj_set_style_bg_color(ui_pageBattery_panelUpBody, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_opa(ui_pageBattery_panelUpBody, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
|
||||
ui_pageBattery_labelCapability = lv_label_create(ui_pageBattery_panelUpBody);
|
||||
lv_obj_set_width(ui_pageBattery_labelCapability, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_height(ui_pageBattery_labelCapability, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_x(ui_pageBattery_labelCapability, -122);
|
||||
lv_obj_set_y(ui_pageBattery_labelCapability, -75);
|
||||
lv_obj_set_align(ui_pageBattery_labelCapability, LV_ALIGN_CENTER);
|
||||
lv_label_set_text(ui_pageBattery_labelCapability, "电量:");
|
||||
lv_obj_set_style_text_font(ui_pageBattery_labelCapability, &ui_font_MiSansM, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
|
||||
ui_pageBattery_barBattery = lv_bar_create(ui_pageBattery_panelUpBody);
|
||||
lv_bar_set_range(ui_pageBattery_barBattery, 0, 2048);
|
||||
lv_bar_set_value(ui_pageBattery_barBattery, 100, LV_ANIM_OFF);
|
||||
@ -52,6 +76,51 @@ void ui_pageBattery_screen_init(void)
|
||||
lv_obj_set_style_text_align(ui_pageBattery_spinboxBattery, LV_TEXT_ALIGN_LEFT, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_font(ui_pageBattery_spinboxBattery, &lv_font_montserrat_16, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
|
||||
ui_pageBattery_labelMaxSample = lv_label_create(ui_pageBattery_panelUpBody);
|
||||
lv_obj_set_width(ui_pageBattery_labelMaxSample, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_height(ui_pageBattery_labelMaxSample, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_x(ui_pageBattery_labelMaxSample, -78);
|
||||
lv_obj_set_y(ui_pageBattery_labelMaxSample, -42);
|
||||
lv_obj_set_align(ui_pageBattery_labelMaxSample, LV_ALIGN_CENTER);
|
||||
lv_label_set_text(ui_pageBattery_labelMaxSample, "最大采样值:2048");
|
||||
lv_obj_set_style_text_font(ui_pageBattery_labelMaxSample, &ui_font_MiSansM, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
|
||||
ui_pageBattery_labelVolume = lv_label_create(ui_pageBattery_panelUpBody);
|
||||
lv_obj_set_width(ui_pageBattery_labelVolume, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_height(ui_pageBattery_labelVolume, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_x(ui_pageBattery_labelVolume, -79);
|
||||
lv_obj_set_y(ui_pageBattery_labelVolume, -14);
|
||||
lv_obj_set_align(ui_pageBattery_labelVolume, LV_ALIGN_CENTER);
|
||||
lv_label_set_text(ui_pageBattery_labelVolume, "总电量:2500mAh");
|
||||
lv_obj_set_style_text_font(ui_pageBattery_labelVolume, &ui_font_MiSansM, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
|
||||
ui_pageBattery_labelMaxVoltage = lv_label_create(ui_pageBattery_panelUpBody);
|
||||
lv_obj_set_width(ui_pageBattery_labelMaxVoltage, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_height(ui_pageBattery_labelMaxVoltage, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_x(ui_pageBattery_labelMaxVoltage, -98);
|
||||
lv_obj_set_y(ui_pageBattery_labelMaxVoltage, 13);
|
||||
lv_obj_set_align(ui_pageBattery_labelMaxVoltage, LV_ALIGN_CENTER);
|
||||
lv_label_set_text(ui_pageBattery_labelMaxVoltage, "总电压:4.2V");
|
||||
lv_obj_set_style_text_font(ui_pageBattery_labelMaxVoltage, &ui_font_MiSansM, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
|
||||
ui_pageBattery_labelSampleVoltage = lv_label_create(ui_pageBattery_panelUpBody);
|
||||
lv_obj_set_width(ui_pageBattery_labelSampleVoltage, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_height(ui_pageBattery_labelSampleVoltage, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_x(ui_pageBattery_labelSampleVoltage, -102);
|
||||
lv_obj_set_y(ui_pageBattery_labelSampleVoltage, 55);
|
||||
lv_obj_set_align(ui_pageBattery_labelSampleVoltage, LV_ALIGN_CENTER);
|
||||
lv_label_set_text(ui_pageBattery_labelSampleVoltage, "采样电压:");
|
||||
lv_obj_set_style_text_font(ui_pageBattery_labelSampleVoltage, &ui_font_MiSansM, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
|
||||
ui_pageBattery_labelSampleVolume = lv_label_create(ui_pageBattery_panelUpBody);
|
||||
lv_obj_set_width(ui_pageBattery_labelSampleVolume, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_height(ui_pageBattery_labelSampleVolume, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_x(ui_pageBattery_labelSampleVolume, -101);
|
||||
lv_obj_set_y(ui_pageBattery_labelSampleVolume, 77);
|
||||
lv_obj_set_align(ui_pageBattery_labelSampleVolume, LV_ALIGN_CENTER);
|
||||
lv_label_set_text(ui_pageBattery_labelSampleVolume, "采样电量:");
|
||||
lv_obj_set_style_text_font(ui_pageBattery_labelSampleVolume, &ui_font_MiSansM, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
|
||||
ui_pageBattery_labelCurrentVoltage = lv_label_create(ui_pageBattery_panelUpBody);
|
||||
lv_obj_set_width(ui_pageBattery_labelCurrentVoltage, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_height(ui_pageBattery_labelCurrentVoltage, LV_SIZE_CONTENT); /// 1
|
||||
|
||||
@ -26,6 +26,18 @@ void ui_pageDebugChoice_screen_init(void)
|
||||
lv_obj_add_flag(ui_pageDebugChoice_imageHome, LV_OBJ_FLAG_CLICKABLE | LV_OBJ_FLAG_ADV_HITTEST); /// Flags
|
||||
lv_obj_clear_flag(ui_pageDebugChoice_imageHome, LV_OBJ_FLAG_PRESS_LOCK | LV_OBJ_FLAG_SCROLLABLE); /// Flags
|
||||
|
||||
ui_pageDebugChoice_labelHeaderTitle = lv_label_create(ui_pageDebugChoice_pannelHeader);
|
||||
lv_obj_set_width(ui_pageDebugChoice_labelHeaderTitle, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_height(ui_pageDebugChoice_labelHeaderTitle, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_x(ui_pageDebugChoice_labelHeaderTitle, 0);
|
||||
lv_obj_set_y(ui_pageDebugChoice_labelHeaderTitle, 6);
|
||||
lv_obj_set_align(ui_pageDebugChoice_labelHeaderTitle, LV_ALIGN_BOTTOM_MID);
|
||||
lv_label_set_text(ui_pageDebugChoice_labelHeaderTitle, "DEBUG");
|
||||
lv_obj_set_style_text_color(ui_pageDebugChoice_labelHeaderTitle, lv_color_hex(0x040000),
|
||||
LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_opa(ui_pageDebugChoice_labelHeaderTitle, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_font(ui_pageDebugChoice_labelHeaderTitle, &ui_font_MiSansM, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
|
||||
ui_pageDebugChoice_panelBody = lv_obj_create(ui_pageDebugChoice);
|
||||
lv_obj_set_width(ui_pageDebugChoice_panelBody, 320);
|
||||
lv_obj_set_height(ui_pageDebugChoice_panelBody, 412);
|
||||
|
||||
@ -28,6 +28,29 @@ void ui_pageDeviceInformation_screen_init(void)
|
||||
lv_obj_set_align(ui_pageDeviceInformation_labelBack, LV_ALIGN_LEFT_MID);
|
||||
lv_label_set_text(ui_pageDeviceInformation_labelBack, "<");
|
||||
|
||||
ui_pageDeviceInformation_lableDeviceInformation = lv_label_create(ui_pageDeviceInformation_pannelHeader);
|
||||
lv_obj_set_width(ui_pageDeviceInformation_lableDeviceInformation, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_height(ui_pageDeviceInformation_lableDeviceInformation, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_align(ui_pageDeviceInformation_lableDeviceInformation, LV_ALIGN_BOTTOM_MID);
|
||||
lv_label_set_text(ui_pageDeviceInformation_lableDeviceInformation, "DeviceInfo");
|
||||
lv_obj_set_style_text_color(ui_pageDeviceInformation_lableDeviceInformation, lv_color_hex(0x040000),
|
||||
LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_opa(ui_pageDeviceInformation_lableDeviceInformation, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_font(ui_pageDeviceInformation_lableDeviceInformation, &ui_font_MiSansM,
|
||||
LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
|
||||
ui_pageDeviceInformation_textAreaContent = lv_textarea_create(ui_pageDeviceInformation);
|
||||
lv_obj_set_width(ui_pageDeviceInformation_textAreaContent, 299);
|
||||
lv_obj_set_height(ui_pageDeviceInformation_textAreaContent, 334);
|
||||
lv_obj_set_x(ui_pageDeviceInformation_textAreaContent, 0);
|
||||
lv_obj_set_y(ui_pageDeviceInformation_textAreaContent, -10);
|
||||
lv_obj_set_align(ui_pageDeviceInformation_textAreaContent, LV_ALIGN_CENTER);
|
||||
lv_textarea_set_text(ui_pageDeviceInformation_textAreaContent,
|
||||
"Device Name: Pulse Flow Detection Controller\n-----------------------------------------------------\nSoftware Version: 20250304.1.0A\n Hardware Version: 20250302.1.0A\n-----------------------------------------------------\nMain Control Chip: esp32-s3-wroom\n IDF Version: Ver 5.2\n RAM Size: 8MB\n Flash Size: 4MB\n-----------------------------------------------------\nScreen Size: 320-480px 3.5-inch\n Interface Type: intel-8080 parallel port\n Pixel Frequency: 20MHz\n Touch Screen Controller: ft6336U\n Display Controller: ILI9488 (compatible with ST7789)\nDisplay Framework: LVGL\n Version: Version 8.2.0\n-----------------------------------------------------\nBattery Information:\n Capacity: 2500mAh\n Voltage: 2.7V-4.2V\n Charging Current: 0.5C\n-----------------------------------------------------\nSoftware Server Address: sunme.top\n Technical Support: 13345203604\n Name: Wang Xiangen\nDesign Date: 2025.3.7\n Address: Danyang City, Jiangsu Province");
|
||||
lv_textarea_set_placeholder_text(ui_pageDeviceInformation_textAreaContent, "Placeholder...");
|
||||
lv_obj_set_style_text_font(ui_pageDeviceInformation_textAreaContent, &lv_font_montserrat_14,
|
||||
LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
|
||||
ui_pageDeviceInformation_buttonBackToHome = lv_btn_create(ui_pageDeviceInformation);
|
||||
lv_obj_set_width(ui_pageDeviceInformation_buttonBackToHome, 271);
|
||||
lv_obj_set_height(ui_pageDeviceInformation_buttonBackToHome, 50);
|
||||
|
||||
@ -19,6 +19,18 @@ void ui_pageHome_screen_init(void)
|
||||
lv_obj_set_style_bg_opa(ui_pageHome, 255, LV_PART_SCROLLBAR | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_grad_color(ui_pageHome, lv_color_hex(0xE6E6E6), LV_PART_SCROLLBAR | LV_STATE_DEFAULT);
|
||||
|
||||
ui_pageHome_panelHeader = lv_obj_create(ui_pageHome);
|
||||
lv_obj_set_width(ui_pageHome_panelHeader, 320);
|
||||
lv_obj_set_height(ui_pageHome_panelHeader, 30);
|
||||
lv_obj_set_align(ui_pageHome_panelHeader, LV_ALIGN_TOP_MID);
|
||||
lv_obj_clear_flag(ui_pageHome_panelHeader, LV_OBJ_FLAG_GESTURE_BUBBLE | LV_OBJ_FLAG_SCROLLABLE); /// Flags
|
||||
lv_obj_set_style_radius(ui_pageHome_panelHeader, 0, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_color(ui_pageHome_panelHeader, lv_color_hex(0x141414), LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_opa(ui_pageHome_panelHeader, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_border_width(ui_pageHome_panelHeader, 0, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_blend_mode(ui_pageHome_panelHeader, LV_BLEND_MODE_NORMAL, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_opa(ui_pageHome_panelHeader, 20, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
|
||||
ui_pageHome_labelTitle = lv_label_create(ui_pageHome);
|
||||
lv_obj_set_width(ui_pageHome_labelTitle, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_height(ui_pageHome_labelTitle, LV_SIZE_CONTENT); /// 1
|
||||
|
||||
@ -11,6 +11,7 @@
|
||||
// SCREEN: ui_pageHome
|
||||
void ui_pageHome_screen_init(void);
|
||||
lv_obj_t * ui_pageHome;
|
||||
lv_obj_t * ui_pageHome_panelHeader;
|
||||
lv_obj_t * ui_pageHome_labelTitle;
|
||||
lv_obj_t * ui_pageHome_sliderBattery;
|
||||
lv_obj_t * ui_pageHome_panelBattery;
|
||||
@ -96,9 +97,17 @@ void ui_pageBattery_screen_init(void);
|
||||
lv_obj_t * ui_pageBattery;
|
||||
void ui_event_pageBattery_panelHeader(lv_event_t * e);
|
||||
lv_obj_t * ui_pageBattery_panelHeader;
|
||||
lv_obj_t * ui_pageBattery_labelBack;
|
||||
lv_obj_t * ui_pageBattery_labelBattery;
|
||||
lv_obj_t * ui_pageBattery_panelUpBody;
|
||||
lv_obj_t * ui_pageBattery_labelCapability;
|
||||
lv_obj_t * ui_pageBattery_barBattery;
|
||||
lv_obj_t * ui_pageBattery_spinboxBattery;
|
||||
lv_obj_t * ui_pageBattery_labelMaxSample;
|
||||
lv_obj_t * ui_pageBattery_labelVolume;
|
||||
lv_obj_t * ui_pageBattery_labelMaxVoltage;
|
||||
lv_obj_t * ui_pageBattery_labelSampleVoltage;
|
||||
lv_obj_t * ui_pageBattery_labelSampleVolume;
|
||||
lv_obj_t * ui_pageBattery_labelCurrentVoltage;
|
||||
lv_obj_t * ui_pageBattery_labelCurrentVolume;
|
||||
// CUSTOM VARIABLES
|
||||
@ -111,6 +120,8 @@ void ui_event_pageDeviceInformation_pannelHeader(lv_event_t * e);
|
||||
lv_obj_t * ui_pageDeviceInformation_pannelHeader;
|
||||
void ui_event_pageDeviceInformation_labelBack(lv_event_t * e);
|
||||
lv_obj_t * ui_pageDeviceInformation_labelBack;
|
||||
lv_obj_t * ui_pageDeviceInformation_lableDeviceInformation;
|
||||
lv_obj_t * ui_pageDeviceInformation_textAreaContent;
|
||||
void ui_event_pageDeviceInformation_buttonBackToHome(lv_event_t * e);
|
||||
lv_obj_t * ui_pageDeviceInformation_buttonBackToHome;
|
||||
lv_obj_t * ui_pageDeviceInformation_labelBackToHome;
|
||||
@ -165,6 +176,7 @@ void ui_event_pageDebugChoice_pannelHeader(lv_event_t * e);
|
||||
lv_obj_t * ui_pageDebugChoice_pannelHeader;
|
||||
void ui_event_pageDebugChoice_imageHome(lv_event_t * e);
|
||||
lv_obj_t * ui_pageDebugChoice_imageHome;
|
||||
lv_obj_t * ui_pageDebugChoice_labelHeaderTitle;
|
||||
lv_obj_t * ui_pageDebugChoice_panelBody;
|
||||
void ui_event_pageDebugChoice_panelRecord(lv_event_t * e);
|
||||
lv_obj_t * ui_pageDebugChoice_panelRecord;
|
||||
|
||||
@ -19,6 +19,7 @@ extern "C" {
|
||||
// SCREEN: ui_pageHome
|
||||
void ui_pageHome_screen_init(void);
|
||||
extern lv_obj_t * ui_pageHome;
|
||||
extern lv_obj_t * ui_pageHome_panelHeader;
|
||||
extern lv_obj_t * ui_pageHome_labelTitle;
|
||||
extern lv_obj_t * ui_pageHome_sliderBattery;
|
||||
extern lv_obj_t * ui_pageHome_panelBattery;
|
||||
@ -104,9 +105,17 @@ void ui_pageBattery_screen_init(void);
|
||||
extern lv_obj_t * ui_pageBattery;
|
||||
void ui_event_pageBattery_panelHeader(lv_event_t * e);
|
||||
extern lv_obj_t * ui_pageBattery_panelHeader;
|
||||
extern lv_obj_t * ui_pageBattery_labelBack;
|
||||
extern lv_obj_t * ui_pageBattery_labelBattery;
|
||||
extern lv_obj_t * ui_pageBattery_panelUpBody;
|
||||
extern lv_obj_t * ui_pageBattery_labelCapability;
|
||||
extern lv_obj_t * ui_pageBattery_barBattery;
|
||||
extern lv_obj_t * ui_pageBattery_spinboxBattery;
|
||||
extern lv_obj_t * ui_pageBattery_labelMaxSample;
|
||||
extern lv_obj_t * ui_pageBattery_labelVolume;
|
||||
extern lv_obj_t * ui_pageBattery_labelMaxVoltage;
|
||||
extern lv_obj_t * ui_pageBattery_labelSampleVoltage;
|
||||
extern lv_obj_t * ui_pageBattery_labelSampleVolume;
|
||||
extern lv_obj_t * ui_pageBattery_labelCurrentVoltage;
|
||||
extern lv_obj_t * ui_pageBattery_labelCurrentVolume;
|
||||
// CUSTOM VARIABLES
|
||||
@ -119,6 +128,8 @@ void ui_event_pageDeviceInformation_pannelHeader(lv_event_t * e);
|
||||
extern lv_obj_t * ui_pageDeviceInformation_pannelHeader;
|
||||
void ui_event_pageDeviceInformation_labelBack(lv_event_t * e);
|
||||
extern lv_obj_t * ui_pageDeviceInformation_labelBack;
|
||||
extern lv_obj_t * ui_pageDeviceInformation_lableDeviceInformation;
|
||||
extern lv_obj_t * ui_pageDeviceInformation_textAreaContent;
|
||||
void ui_event_pageDeviceInformation_buttonBackToHome(lv_event_t * e);
|
||||
extern lv_obj_t * ui_pageDeviceInformation_buttonBackToHome;
|
||||
extern lv_obj_t * ui_pageDeviceInformation_labelBackToHome;
|
||||
@ -173,6 +184,7 @@ void ui_event_pageDebugChoice_pannelHeader(lv_event_t * e);
|
||||
extern lv_obj_t * ui_pageDebugChoice_pannelHeader;
|
||||
void ui_event_pageDebugChoice_imageHome(lv_event_t * e);
|
||||
extern lv_obj_t * ui_pageDebugChoice_imageHome;
|
||||
extern lv_obj_t * ui_pageDebugChoice_labelHeaderTitle;
|
||||
extern lv_obj_t * ui_pageDebugChoice_panelBody;
|
||||
void ui_event_pageDebugChoice_panelRecord(lv_event_t * e);
|
||||
extern lv_obj_t * ui_pageDebugChoice_panelRecord;
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,3 +1,3 @@
|
||||
idf_component_register(SRCS "FluxButton.c"
|
||||
REQUIRES espressif__button FluxUI driver lvgl
|
||||
REQUIRES espressif__button FluxUI driver lvgl freertos FluxPower
|
||||
INCLUDE_DIRS ".")
|
||||
|
||||
@ -1,24 +1,18 @@
|
||||
#include <stdio.h>
|
||||
#include "FluxButton.h"
|
||||
#include "driver/gpio.h"
|
||||
#include "FluxPower.h"
|
||||
|
||||
|
||||
#include "ui.h"
|
||||
|
||||
static const char *BUTTON_TAG = "button_test";
|
||||
|
||||
/*使用事件组Bit0进行当前显示屏状态记录*/
|
||||
#define LCD_STATE_BIT BIT0
|
||||
|
||||
/*定义按键事件列表*/
|
||||
const char *button_event_table[] = {
|
||||
"BUTTON_PRESS_DOWN",
|
||||
"BUTTON_PRESS_UP",
|
||||
"BUTTON_PRESS_REPEAT",
|
||||
"BUTTON_PRESS_REPEAT_DONE",
|
||||
"BUTTON_SINGLE_CLICK",
|
||||
"BUTTON_DOUBLE_CLICK",
|
||||
"BUTTON_MULTIPLE_CLICK",
|
||||
"BUTTON_LONG_PRESS_START",
|
||||
"BUTTON_LONG_PRESS_HOLD",
|
||||
"BUTTON_LONG_PRESS_UP",
|
||||
};
|
||||
/*显示屏状态记录*/
|
||||
EventGroupHandle_t lcd_state_event_group;
|
||||
|
||||
|
||||
static void button_event_cb(void *arg, void *data)
|
||||
@ -41,8 +35,24 @@ static void button_event_cb(void *arg, void *data)
|
||||
POWER_ON;
|
||||
break;
|
||||
case BUTTON_CMD_POWER_OFF:
|
||||
ESP_LOGI(BUTTON_TAG, "LCD DoubleClick change");
|
||||
POWER_OFF;
|
||||
break;
|
||||
case BUTTON_CMD_LCD_BACKLIGHT_CHANGE:
|
||||
/*电源键单击事件*/
|
||||
ESP_LOGI(BUTTON_TAG, "LCD backlight change");
|
||||
/*根据当前背光状态进行背光开关*/
|
||||
if (xEventGroupGetBits(lcd_state_event_group) & LCD_STATE_BIT) //如果当前背光状态为开启,则关闭
|
||||
{
|
||||
LCD_BACKLIGHT_CLOSE;
|
||||
xEventGroupClearBits(lcd_state_event_group, LCD_STATE_BIT);
|
||||
|
||||
}else{
|
||||
LCD_BACKLIGHT_OPEN;
|
||||
xEventGroupSetBits(lcd_state_event_group, LCD_STATE_BIT);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case BUTTON_CMD_CENTER_KEY:
|
||||
/*开始测试按键*/
|
||||
@ -89,7 +99,8 @@ void button_init_func(uint32_t button_num)
|
||||
err |= iot_button_register_cb(btn, BUTTON_DOUBLE_CLICK, button_event_cb, (void *)BUTTON_CMD_POWER_OFF);
|
||||
/*长按电源键进行开机*/
|
||||
err |= iot_button_register_cb(btn, BUTTON_LONG_PRESS_HOLD, button_event_cb, (void *)BUTTON_CMD_POWER_ON);
|
||||
|
||||
/* 单击电源键进行显示屏背光状态切换 */
|
||||
err |= iot_button_register_cb(btn, BUTTON_SINGLE_CLICK, button_event_cb, (void *)BUTTON_CMD_LCD_BACKLIGHT_CHANGE);
|
||||
}else{
|
||||
/*为下方三个按键 单击 注册回调函数*/
|
||||
switch (button_num)
|
||||
@ -119,6 +130,12 @@ void button_init(void)
|
||||
|
||||
button_init_func(BUTTON_PowerIn_IO_NUM);
|
||||
|
||||
/*初始化显示屏事件组*/
|
||||
lcd_state_event_group = xEventGroupCreate();
|
||||
|
||||
/*设置默认状态为背光开启*/
|
||||
xEventGroupSetBits(lcd_state_event_group, LCD_STATE_BIT);
|
||||
|
||||
/*在此处初始化电源控制IO输出*/
|
||||
gpio_reset_pin(BUTTON_PowerOut_IO_NUM);
|
||||
gpio_set_direction(BUTTON_PowerOut_IO_NUM, GPIO_MODE_OUTPUT);
|
||||
|
||||
@ -3,6 +3,11 @@
|
||||
#include "iot_button.h"
|
||||
#include "esp_log.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include "freertos/FreeRTOS.h"
|
||||
#include "freertos/task.h"
|
||||
#include "freertos/semphr.h"
|
||||
|
||||
#define BUTTON_Center_IO_NUM (42)
|
||||
#define BUTTON_Left_IO_NUM (41)
|
||||
#define BUTTON_Right_IO_NUM (40)
|
||||
@ -27,8 +32,7 @@ enum button_cmd_t
|
||||
BUTTON_CMD_CENTER_KEY=2,
|
||||
BUTTON_CMD_LEFT_KEY=3,
|
||||
BUTTON_CMD_RIGHT_KEY=4,
|
||||
BUTTON_CMD_LCD_CLOSE=5,
|
||||
BUTTON_CMD_LCD_OPEN=6,
|
||||
BUTTON_CMD_LCD_BACKLIGHT_CHANGE=5,
|
||||
};
|
||||
|
||||
#define CONFIG_GPIO_BUTTON_SUPPORT_POWER_SAVE 0
|
||||
|
||||
@ -12,21 +12,21 @@
|
||||
#include "esp_adc/adc_cali_scheme.h"
|
||||
#include "ui.h"
|
||||
|
||||
#define CLOSE_LCD_BACKLIGHT ESP_ERROR_CHECK(ledc_set_duty(LEDC_LOW_SPEED_MODE, LEDC_CHANNEL_0, 9192));\
|
||||
#define LCD_BACKLIGHT_CLOSE ESP_ERROR_CHECK(ledc_set_duty(LEDC_LOW_SPEED_MODE, LEDC_CHANNEL_0, 8192));\
|
||||
ESP_ERROR_CHECK(ledc_update_duty(LEDC_LOW_SPEED_MODE, LEDC_CHANNEL_0));
|
||||
|
||||
#define OPEN_LCD_BACKLIGHT ESP_ERROR_CHECK(ledc_set_duty(LEDC_LOW_SPEED_MODE, LEDC_CHANNEL_0, 100));\
|
||||
#define LCD_BACKLIGHT_OPEN ESP_ERROR_CHECK(ledc_set_duty(LEDC_LOW_SPEED_MODE, LEDC_CHANNEL_0, 100));\
|
||||
ESP_ERROR_CHECK(ledc_update_duty(LEDC_LOW_SPEED_MODE, LEDC_CHANNEL_0));
|
||||
|
||||
/*配置ADC采用通道*/
|
||||
#define EXAMPLE_ADC1_CHAN8 ADC_CHANNEL_8
|
||||
/*配置用于进行ADC采样的引脚*/
|
||||
/*<EFBFBD>滨蔭<EFBFBD>其<EFBFBD>餈𥡝<EFBFBD>ADC<EFBFBD><EFBFBD>甅<EFBFBD><EFBFBD><EFBFBD><EFBFBD>?*/
|
||||
#define EXAMPLE_POWER_IO (9)
|
||||
|
||||
|
||||
void powerTask(void);
|
||||
|
||||
/*初始化电源管理系统*/
|
||||
/*<EFBFBD>嘥<EFBFBD><EFBFBD>𣇉㩞皞鞟恣<EFBFBD><EFBFBD>頂蝏?*/
|
||||
void powerInit(void);
|
||||
|
||||
|
||||
|
||||
@ -18,6 +18,21 @@ void ui_pageBattery_screen_init(void)
|
||||
lv_obj_set_style_radius(ui_pageBattery_panelHeader, 0, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_border_width(ui_pageBattery_panelHeader, 0, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
|
||||
ui_pageBattery_labelBack = lv_label_create(ui_pageBattery_panelHeader);
|
||||
lv_obj_set_width(ui_pageBattery_labelBack, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_height(ui_pageBattery_labelBack, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_x(ui_pageBattery_labelBack, 4);
|
||||
lv_obj_set_y(ui_pageBattery_labelBack, 0);
|
||||
lv_obj_set_align(ui_pageBattery_labelBack, LV_ALIGN_LEFT_MID);
|
||||
lv_label_set_text(ui_pageBattery_labelBack, "<");
|
||||
|
||||
ui_pageBattery_labelBattery = lv_label_create(ui_pageBattery_panelHeader);
|
||||
lv_obj_set_width(ui_pageBattery_labelBattery, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_height(ui_pageBattery_labelBattery, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_align(ui_pageBattery_labelBattery, LV_ALIGN_CENTER);
|
||||
lv_label_set_text(ui_pageBattery_labelBattery, "电池");
|
||||
lv_obj_set_style_text_font(ui_pageBattery_labelBattery, &ui_font_MiSansM, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
|
||||
ui_pageBattery_panelUpBody = lv_obj_create(ui_pageBattery);
|
||||
lv_obj_set_width(ui_pageBattery_panelUpBody, 310);
|
||||
lv_obj_set_height(ui_pageBattery_panelUpBody, 221);
|
||||
@ -28,6 +43,15 @@ void ui_pageBattery_screen_init(void)
|
||||
lv_obj_set_style_bg_color(ui_pageBattery_panelUpBody, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_opa(ui_pageBattery_panelUpBody, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
|
||||
ui_pageBattery_labelCapability = lv_label_create(ui_pageBattery_panelUpBody);
|
||||
lv_obj_set_width(ui_pageBattery_labelCapability, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_height(ui_pageBattery_labelCapability, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_x(ui_pageBattery_labelCapability, -122);
|
||||
lv_obj_set_y(ui_pageBattery_labelCapability, -75);
|
||||
lv_obj_set_align(ui_pageBattery_labelCapability, LV_ALIGN_CENTER);
|
||||
lv_label_set_text(ui_pageBattery_labelCapability, "电量:");
|
||||
lv_obj_set_style_text_font(ui_pageBattery_labelCapability, &ui_font_MiSansM, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
|
||||
ui_pageBattery_barBattery = lv_bar_create(ui_pageBattery_panelUpBody);
|
||||
lv_bar_set_range(ui_pageBattery_barBattery, 0, 2048);
|
||||
lv_bar_set_value(ui_pageBattery_barBattery, 100, LV_ANIM_OFF);
|
||||
@ -52,6 +76,51 @@ void ui_pageBattery_screen_init(void)
|
||||
lv_obj_set_style_text_align(ui_pageBattery_spinboxBattery, LV_TEXT_ALIGN_LEFT, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_font(ui_pageBattery_spinboxBattery, &lv_font_montserrat_16, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
|
||||
ui_pageBattery_labelMaxSample = lv_label_create(ui_pageBattery_panelUpBody);
|
||||
lv_obj_set_width(ui_pageBattery_labelMaxSample, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_height(ui_pageBattery_labelMaxSample, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_x(ui_pageBattery_labelMaxSample, -78);
|
||||
lv_obj_set_y(ui_pageBattery_labelMaxSample, -42);
|
||||
lv_obj_set_align(ui_pageBattery_labelMaxSample, LV_ALIGN_CENTER);
|
||||
lv_label_set_text(ui_pageBattery_labelMaxSample, "最大采样值:2048");
|
||||
lv_obj_set_style_text_font(ui_pageBattery_labelMaxSample, &ui_font_MiSansM, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
|
||||
ui_pageBattery_labelVolume = lv_label_create(ui_pageBattery_panelUpBody);
|
||||
lv_obj_set_width(ui_pageBattery_labelVolume, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_height(ui_pageBattery_labelVolume, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_x(ui_pageBattery_labelVolume, -79);
|
||||
lv_obj_set_y(ui_pageBattery_labelVolume, -14);
|
||||
lv_obj_set_align(ui_pageBattery_labelVolume, LV_ALIGN_CENTER);
|
||||
lv_label_set_text(ui_pageBattery_labelVolume, "总电量:2500mAh");
|
||||
lv_obj_set_style_text_font(ui_pageBattery_labelVolume, &ui_font_MiSansM, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
|
||||
ui_pageBattery_labelMaxVoltage = lv_label_create(ui_pageBattery_panelUpBody);
|
||||
lv_obj_set_width(ui_pageBattery_labelMaxVoltage, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_height(ui_pageBattery_labelMaxVoltage, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_x(ui_pageBattery_labelMaxVoltage, -98);
|
||||
lv_obj_set_y(ui_pageBattery_labelMaxVoltage, 13);
|
||||
lv_obj_set_align(ui_pageBattery_labelMaxVoltage, LV_ALIGN_CENTER);
|
||||
lv_label_set_text(ui_pageBattery_labelMaxVoltage, "总电压:4.2V");
|
||||
lv_obj_set_style_text_font(ui_pageBattery_labelMaxVoltage, &ui_font_MiSansM, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
|
||||
ui_pageBattery_labelSampleVoltage = lv_label_create(ui_pageBattery_panelUpBody);
|
||||
lv_obj_set_width(ui_pageBattery_labelSampleVoltage, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_height(ui_pageBattery_labelSampleVoltage, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_x(ui_pageBattery_labelSampleVoltage, -102);
|
||||
lv_obj_set_y(ui_pageBattery_labelSampleVoltage, 55);
|
||||
lv_obj_set_align(ui_pageBattery_labelSampleVoltage, LV_ALIGN_CENTER);
|
||||
lv_label_set_text(ui_pageBattery_labelSampleVoltage, "采样电压:");
|
||||
lv_obj_set_style_text_font(ui_pageBattery_labelSampleVoltage, &ui_font_MiSansM, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
|
||||
ui_pageBattery_labelSampleVolume = lv_label_create(ui_pageBattery_panelUpBody);
|
||||
lv_obj_set_width(ui_pageBattery_labelSampleVolume, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_height(ui_pageBattery_labelSampleVolume, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_x(ui_pageBattery_labelSampleVolume, -101);
|
||||
lv_obj_set_y(ui_pageBattery_labelSampleVolume, 77);
|
||||
lv_obj_set_align(ui_pageBattery_labelSampleVolume, LV_ALIGN_CENTER);
|
||||
lv_label_set_text(ui_pageBattery_labelSampleVolume, "采样电量:");
|
||||
lv_obj_set_style_text_font(ui_pageBattery_labelSampleVolume, &ui_font_MiSansM, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
|
||||
ui_pageBattery_labelCurrentVoltage = lv_label_create(ui_pageBattery_panelUpBody);
|
||||
lv_obj_set_width(ui_pageBattery_labelCurrentVoltage, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_height(ui_pageBattery_labelCurrentVoltage, LV_SIZE_CONTENT); /// 1
|
||||
|
||||
@ -26,6 +26,18 @@ void ui_pageDebugChoice_screen_init(void)
|
||||
lv_obj_add_flag(ui_pageDebugChoice_imageHome, LV_OBJ_FLAG_CLICKABLE | LV_OBJ_FLAG_ADV_HITTEST); /// Flags
|
||||
lv_obj_clear_flag(ui_pageDebugChoice_imageHome, LV_OBJ_FLAG_PRESS_LOCK | LV_OBJ_FLAG_SCROLLABLE); /// Flags
|
||||
|
||||
ui_pageDebugChoice_labelHeaderTitle = lv_label_create(ui_pageDebugChoice_pannelHeader);
|
||||
lv_obj_set_width(ui_pageDebugChoice_labelHeaderTitle, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_height(ui_pageDebugChoice_labelHeaderTitle, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_x(ui_pageDebugChoice_labelHeaderTitle, 0);
|
||||
lv_obj_set_y(ui_pageDebugChoice_labelHeaderTitle, 6);
|
||||
lv_obj_set_align(ui_pageDebugChoice_labelHeaderTitle, LV_ALIGN_BOTTOM_MID);
|
||||
lv_label_set_text(ui_pageDebugChoice_labelHeaderTitle, "DEBUG");
|
||||
lv_obj_set_style_text_color(ui_pageDebugChoice_labelHeaderTitle, lv_color_hex(0x040000),
|
||||
LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_opa(ui_pageDebugChoice_labelHeaderTitle, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_font(ui_pageDebugChoice_labelHeaderTitle, &ui_font_MiSansM, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
|
||||
ui_pageDebugChoice_panelBody = lv_obj_create(ui_pageDebugChoice);
|
||||
lv_obj_set_width(ui_pageDebugChoice_panelBody, 320);
|
||||
lv_obj_set_height(ui_pageDebugChoice_panelBody, 412);
|
||||
|
||||
@ -28,6 +28,29 @@ void ui_pageDeviceInformation_screen_init(void)
|
||||
lv_obj_set_align(ui_pageDeviceInformation_labelBack, LV_ALIGN_LEFT_MID);
|
||||
lv_label_set_text(ui_pageDeviceInformation_labelBack, "<");
|
||||
|
||||
ui_pageDeviceInformation_lableDeviceInformation = lv_label_create(ui_pageDeviceInformation_pannelHeader);
|
||||
lv_obj_set_width(ui_pageDeviceInformation_lableDeviceInformation, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_height(ui_pageDeviceInformation_lableDeviceInformation, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_align(ui_pageDeviceInformation_lableDeviceInformation, LV_ALIGN_BOTTOM_MID);
|
||||
lv_label_set_text(ui_pageDeviceInformation_lableDeviceInformation, "DeviceInfo");
|
||||
lv_obj_set_style_text_color(ui_pageDeviceInformation_lableDeviceInformation, lv_color_hex(0x040000),
|
||||
LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_opa(ui_pageDeviceInformation_lableDeviceInformation, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_font(ui_pageDeviceInformation_lableDeviceInformation, &ui_font_MiSansM,
|
||||
LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
|
||||
ui_pageDeviceInformation_textAreaContent = lv_textarea_create(ui_pageDeviceInformation);
|
||||
lv_obj_set_width(ui_pageDeviceInformation_textAreaContent, 299);
|
||||
lv_obj_set_height(ui_pageDeviceInformation_textAreaContent, 334);
|
||||
lv_obj_set_x(ui_pageDeviceInformation_textAreaContent, 0);
|
||||
lv_obj_set_y(ui_pageDeviceInformation_textAreaContent, -10);
|
||||
lv_obj_set_align(ui_pageDeviceInformation_textAreaContent, LV_ALIGN_CENTER);
|
||||
lv_textarea_set_text(ui_pageDeviceInformation_textAreaContent,
|
||||
"Device Name: Pulse Flow Detection Controller\n-----------------------------------------------------\nSoftware Version: 20250304.1.0A\n Hardware Version: 20250302.1.0A\n-----------------------------------------------------\nMain Control Chip: esp32-s3-wroom\n IDF Version: Ver 5.2\n RAM Size: 8MB\n Flash Size: 4MB\n-----------------------------------------------------\nScreen Size: 320-480px 3.5-inch\n Interface Type: intel-8080 parallel port\n Pixel Frequency: 20MHz\n Touch Screen Controller: ft6336U\n Display Controller: ILI9488 (compatible with ST7789)\nDisplay Framework: LVGL\n Version: Version 8.2.0\n-----------------------------------------------------\nBattery Information:\n Capacity: 2500mAh\n Voltage: 2.7V-4.2V\n Charging Current: 0.5C\n-----------------------------------------------------\nSoftware Server Address: sunme.top\n Technical Support: 13345203604\n Name: Wang Xiangen\nDesign Date: 2025.3.7\n Address: Danyang City, Jiangsu Province");
|
||||
lv_textarea_set_placeholder_text(ui_pageDeviceInformation_textAreaContent, "Placeholder...");
|
||||
lv_obj_set_style_text_font(ui_pageDeviceInformation_textAreaContent, &lv_font_montserrat_14,
|
||||
LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
|
||||
ui_pageDeviceInformation_buttonBackToHome = lv_btn_create(ui_pageDeviceInformation);
|
||||
lv_obj_set_width(ui_pageDeviceInformation_buttonBackToHome, 271);
|
||||
lv_obj_set_height(ui_pageDeviceInformation_buttonBackToHome, 50);
|
||||
|
||||
@ -19,6 +19,18 @@ void ui_pageHome_screen_init(void)
|
||||
lv_obj_set_style_bg_opa(ui_pageHome, 255, LV_PART_SCROLLBAR | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_grad_color(ui_pageHome, lv_color_hex(0xE6E6E6), LV_PART_SCROLLBAR | LV_STATE_DEFAULT);
|
||||
|
||||
ui_pageHome_panelHeader = lv_obj_create(ui_pageHome);
|
||||
lv_obj_set_width(ui_pageHome_panelHeader, 320);
|
||||
lv_obj_set_height(ui_pageHome_panelHeader, 30);
|
||||
lv_obj_set_align(ui_pageHome_panelHeader, LV_ALIGN_TOP_MID);
|
||||
lv_obj_clear_flag(ui_pageHome_panelHeader, LV_OBJ_FLAG_GESTURE_BUBBLE | LV_OBJ_FLAG_SCROLLABLE); /// Flags
|
||||
lv_obj_set_style_radius(ui_pageHome_panelHeader, 0, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_color(ui_pageHome_panelHeader, lv_color_hex(0x141414), LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_opa(ui_pageHome_panelHeader, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_border_width(ui_pageHome_panelHeader, 0, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_blend_mode(ui_pageHome_panelHeader, LV_BLEND_MODE_NORMAL, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_opa(ui_pageHome_panelHeader, 20, LV_PART_MAIN | LV_STATE_DEFAULT);
|
||||
|
||||
ui_pageHome_labelTitle = lv_label_create(ui_pageHome);
|
||||
lv_obj_set_width(ui_pageHome_labelTitle, LV_SIZE_CONTENT); /// 1
|
||||
lv_obj_set_height(ui_pageHome_labelTitle, LV_SIZE_CONTENT); /// 1
|
||||
|
||||
@ -11,6 +11,7 @@
|
||||
// SCREEN: ui_pageHome
|
||||
void ui_pageHome_screen_init(void);
|
||||
lv_obj_t * ui_pageHome;
|
||||
lv_obj_t * ui_pageHome_panelHeader;
|
||||
lv_obj_t * ui_pageHome_labelTitle;
|
||||
lv_obj_t * ui_pageHome_sliderBattery;
|
||||
lv_obj_t * ui_pageHome_panelBattery;
|
||||
@ -96,9 +97,17 @@ void ui_pageBattery_screen_init(void);
|
||||
lv_obj_t * ui_pageBattery;
|
||||
void ui_event_pageBattery_panelHeader(lv_event_t * e);
|
||||
lv_obj_t * ui_pageBattery_panelHeader;
|
||||
lv_obj_t * ui_pageBattery_labelBack;
|
||||
lv_obj_t * ui_pageBattery_labelBattery;
|
||||
lv_obj_t * ui_pageBattery_panelUpBody;
|
||||
lv_obj_t * ui_pageBattery_labelCapability;
|
||||
lv_obj_t * ui_pageBattery_barBattery;
|
||||
lv_obj_t * ui_pageBattery_spinboxBattery;
|
||||
lv_obj_t * ui_pageBattery_labelMaxSample;
|
||||
lv_obj_t * ui_pageBattery_labelVolume;
|
||||
lv_obj_t * ui_pageBattery_labelMaxVoltage;
|
||||
lv_obj_t * ui_pageBattery_labelSampleVoltage;
|
||||
lv_obj_t * ui_pageBattery_labelSampleVolume;
|
||||
lv_obj_t * ui_pageBattery_labelCurrentVoltage;
|
||||
lv_obj_t * ui_pageBattery_labelCurrentVolume;
|
||||
// CUSTOM VARIABLES
|
||||
@ -111,6 +120,8 @@ void ui_event_pageDeviceInformation_pannelHeader(lv_event_t * e);
|
||||
lv_obj_t * ui_pageDeviceInformation_pannelHeader;
|
||||
void ui_event_pageDeviceInformation_labelBack(lv_event_t * e);
|
||||
lv_obj_t * ui_pageDeviceInformation_labelBack;
|
||||
lv_obj_t * ui_pageDeviceInformation_lableDeviceInformation;
|
||||
lv_obj_t * ui_pageDeviceInformation_textAreaContent;
|
||||
void ui_event_pageDeviceInformation_buttonBackToHome(lv_event_t * e);
|
||||
lv_obj_t * ui_pageDeviceInformation_buttonBackToHome;
|
||||
lv_obj_t * ui_pageDeviceInformation_labelBackToHome;
|
||||
@ -165,6 +176,7 @@ void ui_event_pageDebugChoice_pannelHeader(lv_event_t * e);
|
||||
lv_obj_t * ui_pageDebugChoice_pannelHeader;
|
||||
void ui_event_pageDebugChoice_imageHome(lv_event_t * e);
|
||||
lv_obj_t * ui_pageDebugChoice_imageHome;
|
||||
lv_obj_t * ui_pageDebugChoice_labelHeaderTitle;
|
||||
lv_obj_t * ui_pageDebugChoice_panelBody;
|
||||
void ui_event_pageDebugChoice_panelRecord(lv_event_t * e);
|
||||
lv_obj_t * ui_pageDebugChoice_panelRecord;
|
||||
|
||||
@ -19,6 +19,7 @@ extern "C" {
|
||||
// SCREEN: ui_pageHome
|
||||
void ui_pageHome_screen_init(void);
|
||||
extern lv_obj_t * ui_pageHome;
|
||||
extern lv_obj_t * ui_pageHome_panelHeader;
|
||||
extern lv_obj_t * ui_pageHome_labelTitle;
|
||||
extern lv_obj_t * ui_pageHome_sliderBattery;
|
||||
extern lv_obj_t * ui_pageHome_panelBattery;
|
||||
@ -104,9 +105,17 @@ void ui_pageBattery_screen_init(void);
|
||||
extern lv_obj_t * ui_pageBattery;
|
||||
void ui_event_pageBattery_panelHeader(lv_event_t * e);
|
||||
extern lv_obj_t * ui_pageBattery_panelHeader;
|
||||
extern lv_obj_t * ui_pageBattery_labelBack;
|
||||
extern lv_obj_t * ui_pageBattery_labelBattery;
|
||||
extern lv_obj_t * ui_pageBattery_panelUpBody;
|
||||
extern lv_obj_t * ui_pageBattery_labelCapability;
|
||||
extern lv_obj_t * ui_pageBattery_barBattery;
|
||||
extern lv_obj_t * ui_pageBattery_spinboxBattery;
|
||||
extern lv_obj_t * ui_pageBattery_labelMaxSample;
|
||||
extern lv_obj_t * ui_pageBattery_labelVolume;
|
||||
extern lv_obj_t * ui_pageBattery_labelMaxVoltage;
|
||||
extern lv_obj_t * ui_pageBattery_labelSampleVoltage;
|
||||
extern lv_obj_t * ui_pageBattery_labelSampleVolume;
|
||||
extern lv_obj_t * ui_pageBattery_labelCurrentVoltage;
|
||||
extern lv_obj_t * ui_pageBattery_labelCurrentVolume;
|
||||
// CUSTOM VARIABLES
|
||||
@ -119,6 +128,8 @@ void ui_event_pageDeviceInformation_pannelHeader(lv_event_t * e);
|
||||
extern lv_obj_t * ui_pageDeviceInformation_pannelHeader;
|
||||
void ui_event_pageDeviceInformation_labelBack(lv_event_t * e);
|
||||
extern lv_obj_t * ui_pageDeviceInformation_labelBack;
|
||||
extern lv_obj_t * ui_pageDeviceInformation_lableDeviceInformation;
|
||||
extern lv_obj_t * ui_pageDeviceInformation_textAreaContent;
|
||||
void ui_event_pageDeviceInformation_buttonBackToHome(lv_event_t * e);
|
||||
extern lv_obj_t * ui_pageDeviceInformation_buttonBackToHome;
|
||||
extern lv_obj_t * ui_pageDeviceInformation_labelBackToHome;
|
||||
@ -173,6 +184,7 @@ void ui_event_pageDebugChoice_pannelHeader(lv_event_t * e);
|
||||
extern lv_obj_t * ui_pageDebugChoice_pannelHeader;
|
||||
void ui_event_pageDebugChoice_imageHome(lv_event_t * e);
|
||||
extern lv_obj_t * ui_pageDebugChoice_imageHome;
|
||||
extern lv_obj_t * ui_pageDebugChoice_labelHeaderTitle;
|
||||
extern lv_obj_t * ui_pageDebugChoice_panelBody;
|
||||
void ui_event_pageDebugChoice_panelRecord(lv_event_t * e);
|
||||
extern lv_obj_t * ui_pageDebugChoice_panelRecord;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user