删除了一些不必要的内容

This commit is contained in:
ipason 2025-10-31 15:37:02 +08:00
parent 30da1e8780
commit abd7b0cb0d
3 changed files with 3 additions and 40 deletions

View File

@ -326,8 +326,6 @@ void initialize_display_and_touch(void)
/* Turn on the backlight! */
#if EXAMPLE_PIN_NUM_BK_LIGHT >= 0
ESP_LOGI(TAG, "Turn on LCD backlight");
//等待所有初始完毕后再开灯
//gpio_set_level(EXAMPLE_PIN_NUM_BK_LIGHT, EXAMPLE_LCD_BK_LIGHT_ON_LEVEL);
#endif // EXAMPLE_PIN_NUM_BK_LIGHT >= 0
/* 初始化触摸屏 */
@ -337,7 +335,6 @@ void initialize_display_and_touch(void)
lv_init();
// Allocate draw buffers used by LVGL
// It's recommended to choose the size of the draw buffer(s) to be at least 1/10 screen sized
uint32_t draw_buf_alloc_caps = 0;
#if CONFIG_EXAMPLE_LCD_I80_COLOR_IN_PSRAM

View File

@ -50,16 +50,10 @@ void nom_test_task(void* arg)
while (1)
{
// if((index == YU_Lite8)&&(lv_spinbox_get_value(ui_pageHome_spinboxStage)!=8))
// {
// lv_spinbox_set_value(ui_pageHome_spinboxRate,15);
// }
/* 开始测试前 下发积分时间,确保测试时间正确 */
comulate_time_set();
time = (float)lv_spinbox_get_value(ui_pageFluxRead_spinboxTime);
flux_test_time_set(time);
lv_label_set_text(ui_pageHome_labelStartTest,"Cancel Test Nom");

View File

@ -167,10 +167,6 @@ void uart1_echoTask(void* arg)
float time = 0;
uint8_t bytes[4];
#if LOG_RECORD_ENABLE
WRITE_LOG_TO_SD("流量计任务初始化完毕");
#endif
while (1)
{
vTaskDelay(1000 / portTICK_PERIOD_MS);
@ -180,8 +176,7 @@ void uart1_echoTask(void* arg)
int len = uart_read_bytes(ECHO_UART_PORT_NUM1, data, (BUF_SIZE - 1), 20 / portTICK_PERIOD_MS);
// Write data back to the UART
//uart_write_bytes(ECHO_UART_PORT_NUM1, (const char *) data, len);
if (len) /** */
if (len)
{
data[len] = '\0';
@ -216,10 +211,6 @@ void uart1_echoTask(void* arg)
lv_label_set_text_fmt(ui_pageFluxRead_labelCumulativeVolume,"%.2f",FluxMachineData.cumulativeVolume);
#if LOG_RECORD_ENABLE
WRITE_LOG_TO_SD("收到有效流量计数据,解析成功。");
#endif
/* 获取测试结果并写入到SD卡中 */
sdData.flux_test_result.current_test_result = FluxMachineData.cumulativeVolume/10.0;
sd_testData_write(is_test_mode_nom,sdData.flux_test_result.current_test_result);
@ -229,9 +220,6 @@ void uart1_echoTask(void* arg)
/* 若当前是NOM模式直接刷新结果在Nom的界面 */
RefreshResult();
}else{
#if LOG_RECORD_ENABLE
WRITE_LOG_TO_SD("判断当前测试模式为BS模式");
#endif
/* 获取当前测试挡位 */
current_stage = lv_spinbox_get_value(ui_pageHome_spinboxStageBS)-1;
device_type = lv_dropdown_get_selected(ui_pageHome_DropdownTestTypeBS);
@ -261,26 +249,16 @@ void uart1_echoTask(void* arg)
char str[100];
sprintf(str,"current=%2f,rateVolume=%.2f,up=%.2f,down=%.2f",sdData.flux_test_result.current_test_result,stage_rate_volume,stage_rate_volume*1.15,stage_rate_volume*0.85);
//printf("%s\n",str);
#if LOG_RECORD_ENABLE
WRITE_LOG_TO_SD(str);
#endif
if((sdData.flux_test_result.current_test_result > stage_rate_volume * 1.15)|(sdData.flux_test_result.current_test_result < stage_rate_volume * 0.85))
{
/* 测试结果不合格刷新结果为X */
xEventGroupClearBits(g_bs_test_event_group,g_bs_test_event_group_bits[currentTestRate]);
is_test_result_right = false;
#if LOG_RECORD_ENABLE
ESP_LOGI("FLUX_TEST_START","测试结果不合格");
WRITE_LOG_TO_SD("测试结果不合格");
#endif
}else{
/* 测试合格*/
xEventGroupSetBits(g_bs_test_event_group,g_bs_test_event_group_bits[currentTestRate]);
is_test_result_right = true;
#if LOG_RECORD_ENABLE
ESP_LOGI("FLUX_TEST_START","测试结果合格");
WRITE_LOG_TO_SD("测试结果合格");
#endif
}
#if 1
/* 根据当前BS测试阶段刷新结果 */
@ -291,15 +269,9 @@ void uart1_echoTask(void* arg)
lv_label_set_text_fmt(ui_pageHome_LabelRate15Result,"%.1f",sdData.flux_test_result.current_test_result);
if (is_test_result_right == false)
{
lv_obj_set_style_text_color(ui_pageHome_LabelRate15Result, lv_color_hex(ERRO_LABEL_COLOR), LV_PART_MAIN | LV_STATE_DEFAULT);
#if LOG_RECORD_ENABLE
WRITE_LOG_TO_SD("15BPM 测试结果不合格 修改字体颜色为红色");
#endif
lv_obj_set_style_text_color(ui_pageHome_LabelRate15Result, lv_color_hex(ERRO_LABEL_COLOR), LV_PART_MAIN | LV_STATE_DEFAULT);
}else{
lv_obj_set_style_text_color(ui_pageHome_LabelRate15Result, lv_color_hex(RIGHT_LABEL_COLOR), LV_PART_MAIN | LV_STATE_DEFAULT);
#if LOG_RECORD_ENABLE
WRITE_LOG_TO_SD("15BPM 测试结果合格 修改字体颜色为绿色");
#endif
}
break;
case BS_RATE_20BPM: