新增电池采样部分,但未在屏幕完全显示

This commit is contained in:
jarvis 2025-03-09 23:26:47 +08:00
parent 40a9d4c3d0
commit 9eaa1d9b6f
18 changed files with 338 additions and 35 deletions

File diff suppressed because one or more lines are too long

View File

@ -10892,8 +10892,8 @@
"flags": 17, "flags": 17,
"strtype": "OBJECT/Position", "strtype": "OBJECT/Position",
"intarray": [ "intarray": [
-3, -16,
-75 -77
], ],
"InheritedType": 7 "InheritedType": 7
}, },
@ -10902,7 +10902,7 @@
"flags": 17, "flags": 17,
"strtype": "OBJECT/Size", "strtype": "OBJECT/Size",
"intarray": [ "intarray": [
178, 158,
15 15
], ],
"InheritedType": 7 "InheritedType": 7
@ -10952,14 +10952,14 @@
"strtype": "BAR/Range", "strtype": "BAR/Range",
"intarray": [ "intarray": [
0, 0,
100 4096
], ],
"InheritedType": 7 "InheritedType": 7
}, },
{ {
"nid": 298518648, "nid": 298518648,
"strtype": "BAR/Value", "strtype": "BAR/Value",
"integer": 25, "integer": 100,
"InheritedType": 6 "InheritedType": 6
}, },
{ {
@ -10988,6 +10988,33 @@
"strtype": "BAR/Style_indicator", "strtype": "BAR/Style_indicator",
"strval": "lv.PART.INDICATOR, Rectangle", "strval": "lv.PART.INDICATOR, Rectangle",
"InheritedType": 11 "InheritedType": 11
},
{
"disabled": false,
"nid": 1000193,
"strtype": "_event/EventHandler",
"strval": "VALUE_CHANGED",
"childs": [
{
"nid": 1000194,
"strtype": "_event/name",
"strval": "Event19",
"InheritedType": 10
},
{
"nid": 1000195,
"strtype": "_event/condition_C",
"strval": "",
"InheritedType": 10
},
{
"nid": 1000196,
"strtype": "_event/condition_P",
"strval": "",
"InheritedType": 10
}
],
"InheritedType": 4
} }
], ],
"saved_objtypeKey": "BAR" "saved_objtypeKey": "BAR"
@ -11190,7 +11217,7 @@
"flags": 17, "flags": 17,
"strtype": "OBJECT/Position", "strtype": "OBJECT/Position",
"intarray": [ "intarray": [
-112, -114,
13 13
], ],
"InheritedType": 7 "InheritedType": 7
@ -12539,6 +12566,167 @@
} }
], ],
"saved_objtypeKey": "PANEL" "saved_objtypeKey": "PANEL"
},
{
"guid": "GUID17356524-6152S361468",
"deepid": 957377512,
"dont_export": false,
"locked": false,
"properties": [
{
"nid": 10,
"strtype": "OBJECT/Name",
"strval": "SpinboxBAT",
"InheritedType": 10
},
{
"nid": 20,
"strtype": "OBJECT/Layout",
"InheritedType": 1
},
{
"Flow": 0,
"Wrap": false,
"Reversed": false,
"MainAlignment": 0,
"CrossAlignment": 0,
"TrackAlignment": 0,
"LayoutType": 0,
"nid": 30,
"strtype": "OBJECT/Layout_type",
"strval": "No_layout",
"InheritedType": 13
},
{
"nid": 40,
"strtype": "OBJECT/Transform",
"InheritedType": 1
},
{
"nid": 50,
"flags": 17,
"strtype": "OBJECT/Position",
"intarray": [
104,
-149
],
"InheritedType": 7
},
{
"nid": 60,
"flags": 17,
"strtype": "OBJECT/Size",
"intarray": [
60,
40
],
"InheritedType": 7
},
{
"nid": 70,
"strtype": "OBJECT/Align",
"strval": "CENTER",
"InheritedType": 3
},
{
"nid": 90,
"flags": 1048576,
"strtype": "OBJECT/Flags",
"InheritedType": 1
},
{
"nid": 225,
"flags": 1048576,
"strtype": "OBJECT/Scrolling",
"InheritedType": 1
},
{
"nid": 314,
"strtype": "OBJECT/Scroll_snap_x",
"strval": "NONE",
"InheritedType": 3
},
{
"nid": 315,
"strtype": "OBJECT/Scroll_snap_y",
"strval": "NONE",
"InheritedType": 3
},
{
"nid": 320,
"flags": 1048576,
"strtype": "OBJECT/States",
"InheritedType": 1
},
{
"nid": 1010,
"strtype": "SPINBOX/Spinbox",
"InheritedType": 1
},
{
"nid": 1020,
"strtype": "SPINBOX/Digit_format",
"intarray": [
4,
0
],
"InheritedType": 7
},
{
"nid": 1030,
"strtype": "SPINBOX/Range",
"intarray": [
0,
4096,
1
],
"InheritedType": 7
},
{
"nid": 1040,
"strtype": "SPINBOX/Value",
"integer": 500,
"InheritedType": 6
},
{
"part": "lv.PART.MAIN",
"childs": [
{
"nid": 10000,
"strtype": "_style/StyleState",
"strval": "DEFAULT",
"childs": [
{
"nid": 10430,
"strtype": "_style/Text_Align",
"strval": "LEFT",
"InheritedType": 3
},
{
"nid": 10450,
"strtype": "_style/Text_Font",
"strval": "montserrat_16",
"InheritedType": 3
}
],
"InheritedType": 1
}
],
"nid": 1050,
"strtype": "SPINBOX/Style_main",
"strval": "lv.PART.MAIN, Rectangle, Pad, Text, Transform",
"InheritedType": 11
},
{
"part": "lv.PART.CURSOR",
"childs": [],
"nid": 1060,
"strtype": "SPINBOX/Style_cursor",
"strval": "lv.PART.CURSOR, Rectangle, Text",
"InheritedType": 11
}
],
"saved_objtypeKey": "SPINBOX"
} }
], ],
"isPage": true, "isPage": true,
@ -16226,8 +16414,8 @@
} }
], ],
"isPage": true, "isPage": true,
"editor_posx": 3000, "editor_posx": 2050,
"editor_posy": -1650, "editor_posy": -1000,
"dont_export": false, "dont_export": false,
"locked": false, "locked": false,
"properties": [ "properties": [
@ -16448,10 +16636,10 @@
"theme_dark": false, "theme_dark": false,
"theme_color1": 5, "theme_color1": 5,
"theme_color2": 0, "theme_color2": 0,
"uiExportFolderPath": "D:\\yuwell_workspace\\FluxDC\\SquareLineProj\\Export", "uiExportFolderPath": "E:\\FluxDC\\SquareLineProj\\Export",
"projectExportFolderPath": "D:\\yuwell_workspace\\FluxDC\\SquareLineProj\\Export", "projectExportFolderPath": "E:\\FluxDC\\SquareLineProj\\Export",
"custom_variable_prefix": "uic", "custom_variable_prefix": "uic",
"backup_cnt": 231, "backup_cnt": 233,
"autosave_cnt": 0, "autosave_cnt": 0,
"group_color_cnt": 0, "group_color_cnt": 0,
"lvgl_version": "8.3.6", "lvgl_version": "8.3.6",
@ -16468,7 +16656,7 @@
"drive_fatfs_path": "", "drive_fatfs_path": "",
"naming": "_Screen_Name", "naming": "_Screen_Name",
"naming_force_lowercase": false, "naming_force_lowercase": false,
"nidcnt": 1000193, "nidcnt": 1000203,
"BitDepth": 16, "BitDepth": 16,
"Name": "ESP32S3_UI" "Name": "ESP32S3_UI"
} }

View File

@ -53,12 +53,13 @@ void ui_Batinfo_screen_init(void)
lv_obj_set_style_text_font(ui_Batinfo_Label16, &ui_font_MiSansM, LV_PART_MAIN | LV_STATE_DEFAULT); lv_obj_set_style_text_font(ui_Batinfo_Label16, &ui_font_MiSansM, LV_PART_MAIN | LV_STATE_DEFAULT);
ui_Batinfo_BarBAT = lv_bar_create(ui_Batinfo_Panel9); ui_Batinfo_BarBAT = lv_bar_create(ui_Batinfo_Panel9);
lv_bar_set_value(ui_Batinfo_BarBAT, 25, LV_ANIM_OFF); lv_bar_set_range(ui_Batinfo_BarBAT, 0, 4096);
lv_bar_set_value(ui_Batinfo_BarBAT, 100, LV_ANIM_OFF);
lv_bar_set_start_value(ui_Batinfo_BarBAT, 0, LV_ANIM_OFF); lv_bar_set_start_value(ui_Batinfo_BarBAT, 0, LV_ANIM_OFF);
lv_obj_set_width(ui_Batinfo_BarBAT, 178); lv_obj_set_width(ui_Batinfo_BarBAT, 158);
lv_obj_set_height(ui_Batinfo_BarBAT, 15); lv_obj_set_height(ui_Batinfo_BarBAT, 15);
lv_obj_set_x(ui_Batinfo_BarBAT, -3); lv_obj_set_x(ui_Batinfo_BarBAT, -16);
lv_obj_set_y(ui_Batinfo_BarBAT, -75); lv_obj_set_y(ui_Batinfo_BarBAT, -77);
lv_obj_set_align(ui_Batinfo_BarBAT, LV_ALIGN_CENTER); lv_obj_set_align(ui_Batinfo_BarBAT, LV_ALIGN_CENTER);
lv_obj_add_flag(ui_Batinfo_BarBAT, LV_OBJ_FLAG_CLICKABLE); /// Flags lv_obj_add_flag(ui_Batinfo_BarBAT, LV_OBJ_FLAG_CLICKABLE); /// Flags
@ -74,7 +75,7 @@ void ui_Batinfo_screen_init(void)
ui_Batinfo_Label22 = lv_label_create(ui_Batinfo_Panel9); ui_Batinfo_Label22 = lv_label_create(ui_Batinfo_Panel9);
lv_obj_set_width(ui_Batinfo_Label22, LV_SIZE_CONTENT); /// 1 lv_obj_set_width(ui_Batinfo_Label22, LV_SIZE_CONTENT); /// 1
lv_obj_set_height(ui_Batinfo_Label22, LV_SIZE_CONTENT); /// 1 lv_obj_set_height(ui_Batinfo_Label22, LV_SIZE_CONTENT); /// 1
lv_obj_set_x(ui_Batinfo_Label22, -112); lv_obj_set_x(ui_Batinfo_Label22, -114);
lv_obj_set_y(ui_Batinfo_Label22, 13); lv_obj_set_y(ui_Batinfo_Label22, 13);
lv_obj_set_align(ui_Batinfo_Label22, LV_ALIGN_CENTER); lv_obj_set_align(ui_Batinfo_Label22, LV_ALIGN_CENTER);
lv_label_set_text(ui_Batinfo_Label22, "总电压:"); lv_label_set_text(ui_Batinfo_Label22, "总电压:");
@ -143,6 +144,19 @@ void ui_Batinfo_screen_init(void)
lv_obj_set_style_text_color(ui_Batinfo_valueVolume, lv_color_hex(0x808080), LV_PART_MAIN | LV_STATE_DEFAULT); lv_obj_set_style_text_color(ui_Batinfo_valueVolume, lv_color_hex(0x808080), LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_text_opa(ui_Batinfo_valueVolume, 255, LV_PART_MAIN | LV_STATE_DEFAULT); lv_obj_set_style_text_opa(ui_Batinfo_valueVolume, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
ui_Batinfo_SpinboxBAT = lv_spinbox_create(ui_Batinfo);
lv_obj_set_width(ui_Batinfo_SpinboxBAT, 60);
lv_obj_set_height(ui_Batinfo_SpinboxBAT, 40);
lv_obj_set_x(ui_Batinfo_SpinboxBAT, 104);
lv_obj_set_y(ui_Batinfo_SpinboxBAT, -149);
lv_obj_set_align(ui_Batinfo_SpinboxBAT, LV_ALIGN_CENTER);
lv_spinbox_set_digit_format(ui_Batinfo_SpinboxBAT, 4, 0);
lv_spinbox_set_range(ui_Batinfo_SpinboxBAT, 0, 4096);
lv_spinbox_set_cursor_pos(ui_Batinfo_SpinboxBAT, 1 - 1);
lv_spinbox_set_value(ui_Batinfo_SpinboxBAT, 500);
lv_obj_set_style_text_align(ui_Batinfo_SpinboxBAT, LV_TEXT_ALIGN_LEFT, LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_text_font(ui_Batinfo_SpinboxBAT, &lv_font_montserrat_16, LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_add_event_cb(ui_Batinfo_Panel8, ui_event_Batinfo_Panel8, LV_EVENT_ALL, NULL); lv_obj_add_event_cb(ui_Batinfo_Panel8, ui_event_Batinfo_Panel8, LV_EVENT_ALL, NULL);
} }

View File

@ -104,6 +104,7 @@ lv_obj_t * ui_Batinfo_Label21;
lv_obj_t * ui_Batinfo_labelSampleVolume; lv_obj_t * ui_Batinfo_labelSampleVolume;
lv_obj_t * ui_Batinfo_valueVoltage; lv_obj_t * ui_Batinfo_valueVoltage;
lv_obj_t * ui_Batinfo_valueVolume; lv_obj_t * ui_Batinfo_valueVolume;
lv_obj_t * ui_Batinfo_SpinboxBAT;
// CUSTOM VARIABLES // CUSTOM VARIABLES
// SCREEN: ui_DeviceInfo // SCREEN: ui_DeviceInfo

View File

@ -112,6 +112,7 @@ extern lv_obj_t * ui_Batinfo_Label21;
extern lv_obj_t * ui_Batinfo_labelSampleVolume; extern lv_obj_t * ui_Batinfo_labelSampleVolume;
extern lv_obj_t * ui_Batinfo_valueVoltage; extern lv_obj_t * ui_Batinfo_valueVoltage;
extern lv_obj_t * ui_Batinfo_valueVolume; extern lv_obj_t * ui_Batinfo_valueVolume;
extern lv_obj_t * ui_Batinfo_SpinboxBAT;
// CUSTOM VARIABLES // CUSTOM VARIABLES
// SCREEN: ui_DeviceInfo // SCREEN: ui_DeviceInfo

View File

@ -1,2 +1,3 @@
idf_component_register(SRCS "FluxPower.c" idf_component_register(SRCS "FluxPower.c"
INCLUDE_DIRS "include") REQUIRES driver freertos esp_adc FluxUI lvgl
INCLUDE_DIRS ".")

View File

@ -1,7 +1,52 @@
#include <stdio.h> #include <stdio.h>
#include "FluxPower.h" #include "FluxPower.h"
void func(void) static const char *TAG = "POWER_IO";
{
extern lv_obj_t * ui_Batinfo_valueVoltage;
extern lv_obj_t * ui_Batinfo_valueVolume;
extern lv_obj_t * ui_Batinfo_SpinboxBAT;
extern lv_obj_t * ui_Batinfo_BarBAT;
extern lv_obj_t * ui_Home_LabelHeaderBatValue;
/*没有返回值的电源管理任务*/
int Bat_Adc_Value = 0;
adc_oneshot_unit_handle_t adc1_handle;
void powerTask(void)
{
while (1)
{
ESP_ERROR_CHECK(adc_oneshot_read(adc1_handle, EXAMPLE_ADC1_CHAN8, &Bat_Adc_Value));
vTaskDelay(pdMS_TO_TICKS(1000));
lv_bar_set_value(ui_Batinfo_BarBAT,Bat_Adc_Value*2,LV_ANIM_ON);
lv_spinbox_set_value(ui_Batinfo_SpinboxBAT,Bat_Adc_Value*2);
ESP_LOGI("dd","%d",Bat_Adc_Value);
}
}
void powerInit(void)
{
/*电源接口初始化*/
//-------------ADC1 Init---------------//
adc_oneshot_unit_init_cfg_t init_config1 = {
.unit_id = ADC_UNIT_1,
};
ESP_ERROR_CHECK(adc_oneshot_new_unit(&init_config1, &adc1_handle));
//-------------ADC1 Config---------------//
adc_oneshot_chan_cfg_t config = {
.bitwidth = ADC_BITWIDTH_DEFAULT,
.atten = ADC_ATTEN_DB_11,
};
ESP_ERROR_CHECK(adc_oneshot_config_channel(adc1_handle, EXAMPLE_ADC1_CHAN8, &config));
xTaskCreate(powerTask,"powerTask",2*1024, NULL, 2, NULL);
} }

View File

@ -0,0 +1,34 @@
#include <stdio.h>
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "freertos/queue.h"
#include "driver/gpio.h"
#include "driver/ledc.h"
#include "soc/soc_caps.h"
#include "esp_log.h"
#include "esp_adc/adc_oneshot.h"
#include "esp_adc/adc_cali.h"
#include "esp_adc/adc_cali_scheme.h"
#include "ui.h"
/*配置ADC采用通道*/
#define EXAMPLE_ADC1_CHAN8 ADC_CHANNEL_8
/*配置用于进行ADC采样的引脚*/
#define EXAMPLE_POWER_IO (9)
void powerTask(void);
/*初始化电源管理系统*/
void powerInit(void);

View File

@ -1 +0,0 @@
void func(void);

View File

@ -53,12 +53,13 @@ void ui_Batinfo_screen_init(void)
lv_obj_set_style_text_font(ui_Batinfo_Label16, &ui_font_MiSansM, LV_PART_MAIN | LV_STATE_DEFAULT); lv_obj_set_style_text_font(ui_Batinfo_Label16, &ui_font_MiSansM, LV_PART_MAIN | LV_STATE_DEFAULT);
ui_Batinfo_BarBAT = lv_bar_create(ui_Batinfo_Panel9); ui_Batinfo_BarBAT = lv_bar_create(ui_Batinfo_Panel9);
lv_bar_set_value(ui_Batinfo_BarBAT, 25, LV_ANIM_OFF); lv_bar_set_range(ui_Batinfo_BarBAT, 0, 4096);
lv_bar_set_value(ui_Batinfo_BarBAT, 100, LV_ANIM_OFF);
lv_bar_set_start_value(ui_Batinfo_BarBAT, 0, LV_ANIM_OFF); lv_bar_set_start_value(ui_Batinfo_BarBAT, 0, LV_ANIM_OFF);
lv_obj_set_width(ui_Batinfo_BarBAT, 178); lv_obj_set_width(ui_Batinfo_BarBAT, 158);
lv_obj_set_height(ui_Batinfo_BarBAT, 15); lv_obj_set_height(ui_Batinfo_BarBAT, 15);
lv_obj_set_x(ui_Batinfo_BarBAT, -3); lv_obj_set_x(ui_Batinfo_BarBAT, -16);
lv_obj_set_y(ui_Batinfo_BarBAT, -75); lv_obj_set_y(ui_Batinfo_BarBAT, -77);
lv_obj_set_align(ui_Batinfo_BarBAT, LV_ALIGN_CENTER); lv_obj_set_align(ui_Batinfo_BarBAT, LV_ALIGN_CENTER);
lv_obj_add_flag(ui_Batinfo_BarBAT, LV_OBJ_FLAG_CLICKABLE); /// Flags lv_obj_add_flag(ui_Batinfo_BarBAT, LV_OBJ_FLAG_CLICKABLE); /// Flags
@ -74,7 +75,7 @@ void ui_Batinfo_screen_init(void)
ui_Batinfo_Label22 = lv_label_create(ui_Batinfo_Panel9); ui_Batinfo_Label22 = lv_label_create(ui_Batinfo_Panel9);
lv_obj_set_width(ui_Batinfo_Label22, LV_SIZE_CONTENT); /// 1 lv_obj_set_width(ui_Batinfo_Label22, LV_SIZE_CONTENT); /// 1
lv_obj_set_height(ui_Batinfo_Label22, LV_SIZE_CONTENT); /// 1 lv_obj_set_height(ui_Batinfo_Label22, LV_SIZE_CONTENT); /// 1
lv_obj_set_x(ui_Batinfo_Label22, -112); lv_obj_set_x(ui_Batinfo_Label22, -114);
lv_obj_set_y(ui_Batinfo_Label22, 13); lv_obj_set_y(ui_Batinfo_Label22, 13);
lv_obj_set_align(ui_Batinfo_Label22, LV_ALIGN_CENTER); lv_obj_set_align(ui_Batinfo_Label22, LV_ALIGN_CENTER);
lv_label_set_text(ui_Batinfo_Label22, "总电压:"); lv_label_set_text(ui_Batinfo_Label22, "总电压:");
@ -143,6 +144,19 @@ void ui_Batinfo_screen_init(void)
lv_obj_set_style_text_color(ui_Batinfo_valueVolume, lv_color_hex(0x808080), LV_PART_MAIN | LV_STATE_DEFAULT); lv_obj_set_style_text_color(ui_Batinfo_valueVolume, lv_color_hex(0x808080), LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_text_opa(ui_Batinfo_valueVolume, 255, LV_PART_MAIN | LV_STATE_DEFAULT); lv_obj_set_style_text_opa(ui_Batinfo_valueVolume, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
ui_Batinfo_SpinboxBAT = lv_spinbox_create(ui_Batinfo);
lv_obj_set_width(ui_Batinfo_SpinboxBAT, 60);
lv_obj_set_height(ui_Batinfo_SpinboxBAT, 40);
lv_obj_set_x(ui_Batinfo_SpinboxBAT, 104);
lv_obj_set_y(ui_Batinfo_SpinboxBAT, -149);
lv_obj_set_align(ui_Batinfo_SpinboxBAT, LV_ALIGN_CENTER);
lv_spinbox_set_digit_format(ui_Batinfo_SpinboxBAT, 4, 0);
lv_spinbox_set_range(ui_Batinfo_SpinboxBAT, 0, 4096);
lv_spinbox_set_cursor_pos(ui_Batinfo_SpinboxBAT, 1 - 1);
lv_spinbox_set_value(ui_Batinfo_SpinboxBAT, 500);
lv_obj_set_style_text_align(ui_Batinfo_SpinboxBAT, LV_TEXT_ALIGN_LEFT, LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_text_font(ui_Batinfo_SpinboxBAT, &lv_font_montserrat_16, LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_add_event_cb(ui_Batinfo_Panel8, ui_event_Batinfo_Panel8, LV_EVENT_ALL, NULL); lv_obj_add_event_cb(ui_Batinfo_Panel8, ui_event_Batinfo_Panel8, LV_EVENT_ALL, NULL);
} }

View File

@ -104,6 +104,7 @@ lv_obj_t * ui_Batinfo_Label21;
lv_obj_t * ui_Batinfo_labelSampleVolume; lv_obj_t * ui_Batinfo_labelSampleVolume;
lv_obj_t * ui_Batinfo_valueVoltage; lv_obj_t * ui_Batinfo_valueVoltage;
lv_obj_t * ui_Batinfo_valueVolume; lv_obj_t * ui_Batinfo_valueVolume;
lv_obj_t * ui_Batinfo_SpinboxBAT;
// CUSTOM VARIABLES // CUSTOM VARIABLES
// SCREEN: ui_DeviceInfo // SCREEN: ui_DeviceInfo

View File

@ -112,6 +112,7 @@ extern lv_obj_t * ui_Batinfo_Label21;
extern lv_obj_t * ui_Batinfo_labelSampleVolume; extern lv_obj_t * ui_Batinfo_labelSampleVolume;
extern lv_obj_t * ui_Batinfo_valueVoltage; extern lv_obj_t * ui_Batinfo_valueVoltage;
extern lv_obj_t * ui_Batinfo_valueVolume; extern lv_obj_t * ui_Batinfo_valueVolume;
extern lv_obj_t * ui_Batinfo_SpinboxBAT;
// CUSTOM VARIABLES // CUSTOM VARIABLES
// SCREEN: ui_DeviceInfo // SCREEN: ui_DeviceInfo

View File

@ -8,10 +8,8 @@
#include "esp_err.h" #include "esp_err.h"
#include "esp_log.h" #include "esp_log.h"
/*관벵Modbus꾸鱗쌈왯*/
#include "FluxMod.h" #include "FluxMod.h"
/*<2A>零좋똑離됴令*/
#define LOWERST_LIGHT_LEVEL (7222) #define LOWERST_LIGHT_LEVEL (7222)
void ReadSdCallFunc(lv_event_t * e) void ReadSdCallFunc(lv_event_t * e)

View File

@ -35,6 +35,9 @@
/*包含按键控制头文件*/ /*包含按键控制头文件*/
#include "FluxButton.h" #include "FluxButton.h"
/*添加电量监测头文件*/
#include "FluxPower.h"
static const char *TAG = "example"; static const char *TAG = "example";
#include "modbus_params.h" #include "modbus_params.h"
@ -463,6 +466,9 @@ void app_main(void)
/*初始化SD卡*/ /*初始化SD卡*/
flux_sd_init(); flux_sd_init();
/*电源管理开始*/
powerInit();
/*初始化Modbus*/ /*初始化Modbus*/
ESP_ERROR_CHECK(modbus_master_init()); ESP_ERROR_CHECK(modbus_master_init());

View File

@ -366,7 +366,7 @@ CONFIG_IDF_TOOLCHAIN="gcc"
CONFIG_IDF_TARGET_ARCH_XTENSA=y CONFIG_IDF_TARGET_ARCH_XTENSA=y
CONFIG_IDF_TARGET_ARCH="xtensa" CONFIG_IDF_TARGET_ARCH="xtensa"
CONFIG_IDF_TARGET="esp32s3" CONFIG_IDF_TARGET="esp32s3"
CONFIG_IDF_INIT_VERSION="5.3.1" CONFIG_IDF_INIT_VERSION="5.3.2"
CONFIG_IDF_TARGET_ESP32S3=y CONFIG_IDF_TARGET_ESP32S3=y
CONFIG_IDF_FIRMWARE_CHIP_ID=0x0009 CONFIG_IDF_FIRMWARE_CHIP_ID=0x0009
@ -2251,7 +2251,7 @@ CONFIG_LV_ATTRIBUTE_MEM_ALIGN_SIZE=1
# CONFIG_LV_FONT_MONTSERRAT_10 is not set # CONFIG_LV_FONT_MONTSERRAT_10 is not set
# CONFIG_LV_FONT_MONTSERRAT_12 is not set # CONFIG_LV_FONT_MONTSERRAT_12 is not set
CONFIG_LV_FONT_MONTSERRAT_14=y CONFIG_LV_FONT_MONTSERRAT_14=y
# CONFIG_LV_FONT_MONTSERRAT_16 is not set CONFIG_LV_FONT_MONTSERRAT_16=y
# CONFIG_LV_FONT_MONTSERRAT_18 is not set # CONFIG_LV_FONT_MONTSERRAT_18 is not set
CONFIG_LV_FONT_MONTSERRAT_20=y CONFIG_LV_FONT_MONTSERRAT_20=y
# CONFIG_LV_FONT_MONTSERRAT_22 is not set # CONFIG_LV_FONT_MONTSERRAT_22 is not set