From ade2008f6cb753ff2ea260de03c83d8c5bbe53d3 Mon Sep 17 00:00:00 2001 From: zhoujie <929834232@qq.com> Date: Sat, 14 Mar 2026 22:08:18 +0800 Subject: [PATCH] 24 --- prj/TCPClient/User/main.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/prj/TCPClient/User/main.c b/prj/TCPClient/User/main.c index 3d008d1..2e3b0ae 100644 --- a/prj/TCPClient/User/main.c +++ b/prj/TCPClient/User/main.c @@ -471,10 +471,18 @@ static void task_business_entry(void *pvParameters) if (g_temp_req_is2d) { PreprocessResult_t meta; - if (Preprocess_Execute(&raw_img, tx_buf, &meta) == 0) - TcpLogic_BuildAndSendTemperatureFrame(tx_buf, &meta, 0x02 /* REQUEST */, 1); + int8_t pp_ret = Preprocess_Execute(&raw_img, tx_buf, &meta); + if (pp_ret == 0) { + int8_t tx_ret = TcpLogic_BuildAndSendTemperatureFrame(tx_buf, &meta, 0x02 /* REQUEST */, 1); + DBG_APP("TEMP_REQ SEND 2D frm=%d %dx%d ret=%d\r\n", + (int)meta.FrameNumber, (int)meta.ValidWidth, + (int)meta.ValidHeight, (int)tx_ret); + } else { + DBG_APP("TEMP_REQ PP fail ret=%d\r\n", (int)pp_ret); + } } else { send_1d_frame_from_raw(&raw_img, tx_buf); + DBG_APP("TEMP_REQ SEND 1D frm=%d\r\n", (int)raw_img.FrameNumber); } } #endif /* TEST_ENABLE_TEMP_REQ */ @@ -620,8 +628,8 @@ int main(void) { Config2D_t test_cfg2d; memset(&test_cfg2d, 0, sizeof(test_cfg2d)); - test_cfg2d.TargetWidth = SENSOR_WIDTH; /* Full resolution */ - test_cfg2d.TargetHeight = SENSOR_HEIGHT; + test_cfg2d.TargetWidth = 64; /* ROI: 64x64 = 8KB, fits in 10KB buffer */ + test_cfg2d.TargetHeight = 64; test_cfg2d.TriggerRoiX = 0; /* Full-frame trigger area */ test_cfg2d.TriggerRoiY = 0; test_cfg2d.TriggerRoiW = SENSOR_WIDTH;