From abd7b0cb0d61c2c5cbb3bcb644051830d2f4ad7f Mon Sep 17 00:00:00 2001 From: ipason Date: Fri, 31 Oct 2025 15:37:02 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E4=BA=86=E4=B8=80=E4=BA=9B?= =?UTF-8?q?=E4=B8=8D=E5=BF=85=E8=A6=81=E7=9A=84=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/FluxDisplayPort/FluxDisplayPort.c | 3 -- components/FluxProtocol/FluxProtocol.c | 6 ---- components/FluxUart/FluxUart.c | 34 ++------------------ 3 files changed, 3 insertions(+), 40 deletions(-) diff --git a/components/FluxDisplayPort/FluxDisplayPort.c b/components/FluxDisplayPort/FluxDisplayPort.c index f94af07..36c4dd7 100644 --- a/components/FluxDisplayPort/FluxDisplayPort.c +++ b/components/FluxDisplayPort/FluxDisplayPort.c @@ -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 diff --git a/components/FluxProtocol/FluxProtocol.c b/components/FluxProtocol/FluxProtocol.c index bd443d3..da7c4a5 100644 --- a/components/FluxProtocol/FluxProtocol.c +++ b/components/FluxProtocol/FluxProtocol.c @@ -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"); diff --git a/components/FluxUart/FluxUart.c b/components/FluxUart/FluxUart.c index 25f6c87..9f10fb4 100644 --- a/components/FluxUart/FluxUart.c +++ b/components/FluxUart/FluxUart.c @@ -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: