From d24feb286012d7c77744068a6494dd51be667a3c Mon Sep 17 00:00:00 2001 From: jhchun Date: Wed, 2 Sep 2026 16:27:01 +0900 Subject: [PATCH] =?UTF-8?q?=EC=A0=95=EB=A0=AC=EB=AA=A8=EB=93=9C/=EC=A3=BC?= =?UTF-8?q?=EA=B8=B0=20=EC=B8=A1=EC=A0=95=20=EC=8B=A4=ED=8C=A8=20=EC=8B=9C?= =?UTF-8?q?=20cleanup(Piezo=20power=20off,=20imu=20fifo=20stop)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/command/handlers/cmd_piezo.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/command/handlers/cmd_piezo.c b/src/command/handlers/cmd_piezo.c index 44c31e4..917ba69 100644 --- a/src/command/handlers/cmd_piezo.c +++ b/src/command/handlers/cmd_piezo.c @@ -82,8 +82,6 @@ int cmd_mbb(const uint8_t *data, uint8_t data_len) DBG_PRINTF("[MBB] piezo sweep start\r\n"); status = piezo_measure_sweep(); - - piezo_power_off(); if (status == ECHO_STATUS_OK) { @@ -100,6 +98,7 @@ int cmd_mbb(const uint8_t *data, uint8_t data_len) cmd_send_response_u16("raa:", (uint16_t)status); // 최종 상태 raa: 전송 DBG_PRINTF("[CMD] mbb status=0x%04X\r\n", status); + piezo_power_off(); processing = false; return 1; } @@ -144,8 +143,6 @@ int cmd_mtb(const uint8_t *data, uint8_t data_len) DBG_PRINTF("[MTB] piezo sweep start\r\n"); status = piezo_measure_sweep(); - piezo_power_off(); - if (status == ECHO_STATUS_OK) { for (uint8_t ch = 0; ch < PIEZO_NUM_CHANNELS; ch++) @@ -173,6 +170,8 @@ int cmd_mtb(const uint8_t *data, uint8_t data_len) { DBG_PRINTF("[MTB] fifo read fail ret=%d\r\n", imu_ret); cmd_send_response_rim_error(); + imu_fifo_stop(); + piezo_power_off(); processing = false; return 1; } @@ -184,6 +183,7 @@ int cmd_mtb(const uint8_t *data, uint8_t data_len) DBG_PRINTF("[CMD] mtb status=0x%04X rim=%u\r\n", status, rim_count); + piezo_power_off(); processing = false; return 1; }