From 873ae0fb83728e4dba867db738e5510ab0888e5f Mon Sep 17 00:00:00 2001 From: jhchun Date: Thu, 18 Jun 2026 16:22:26 +0900 Subject: [PATCH] =?UTF-8?q?=EC=A0=95=EB=A0=AC=EB=AA=A8=EB=93=9C=20?= =?UTF-8?q?=EC=A2=85=EB=A3=8C=20=EC=8B=9C=20IMU=20FIFO=20=EB=B9=84?= =?UTF-8?q?=ED=99=9C=EC=84=B1=ED=99=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ble_app_bladder_patch/command/handlers/cmd_device.c | 9 +++++++++ .../measurement/imu/app_raw/app_raw.h | 5 +++++ 2 files changed, 14 insertions(+) diff --git a/project/ble_peripheral/ble_app_bladder_patch/command/handlers/cmd_device.c b/project/ble_peripheral/ble_app_bladder_patch/command/handlers/cmd_device.c index 7405ab0..a9caf33 100644 --- a/project/ble_peripheral/ble_app_bladder_patch/command/handlers/cmd_device.c +++ b/project/ble_peripheral/ble_app_bladder_patch/command/handlers/cmd_device.c @@ -12,6 +12,7 @@ #include "cmd_device.h" #include "fstorage.h" #include "led_control.h" +#include "app_raw.h" /*============================================================================== * msq? -> rsq: Device power OFF @@ -172,6 +173,14 @@ int Cmd_mls(const ParsedCmd *cmd) } led_set_state((led_state_t)state); + if ((led_state_t)state == LED_STATE_OFF) + { + if (imu_fifo_capture_is_active()) + { + imu_fifo_capture_disable(); + } + } + dr_ble_return_1("rls:", state); return 1; } diff --git a/project/ble_peripheral/ble_app_bladder_patch/measurement/imu/app_raw/app_raw.h b/project/ble_peripheral/ble_app_bladder_patch/measurement/imu/app_raw/app_raw.h index 240c9a8..e85fcef 100644 --- a/project/ble_peripheral/ble_app_bladder_patch/measurement/imu/app_raw/app_raw.h +++ b/project/ble_peripheral/ble_app_bladder_patch/measurement/imu/app_raw/app_raw.h @@ -122,6 +122,11 @@ int imu_fifo_capture_start(void); */ int imu_fifo_capture_stop_and_send_rim(void); +/** + * \brief Stop IMU FIFO capture without sending rim: packets. + */ +void imu_fifo_capture_disable(void); + /* * mtb? / rim: binary layout (every BLE fragment) * [ 'r' 'i' 'm' ':' ] [ total_sample_count u16 BE ] [ 12 * total_sample_count bytes ... ]