Compare commits

..

2 Commits

Author SHA1 Message Date
jh.chun 873ae0fb83 정렬모드 종료 시 IMU FIFO 비활성화 2026-06-18 16:22:26 +09:00
jh.chun 593f1d1c5b 정렬모드 중에는 IMU FIFO OFF 하지 않도록 수정
- IMU 샘플 15개 보장
2026-06-18 13:57:49 +09:00
4 changed files with 24 additions and 3 deletions
@@ -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;
}
@@ -53,7 +53,7 @@
* : Unify both IMU direct-read and FIFO outputs as raw data in datasheet axis convention.
* - VBTFW0120 260615 jhChun : Add EMC mitigation logic for BLE link stability: extended supervision timeout and dynamic TX power control based on RSSI, RSSI silence, HVN latency, and TX queue congestion.
------------------------------------------------------------------------- */
#define FIRMWARE_VERSION "VBTFW0120"
#define FIRMWARE_VERSION "VBTFW0129"
/*==============================================================================
* Data Length Constants
@@ -684,6 +684,14 @@ static void imu_fifo_power_off(void)
s_fifo_capture_active = false;
}
void imu_fifo_capture_disable(void)
{
if (s_fifo_capture_active)
{
imu_fifo_power_off();
}
}
int imu_fifo_capture_start(void)
{
int rc;
@@ -719,7 +727,6 @@ int imu_fifo_capture_start(void)
rc |= inv_imu_enable_accel_low_noise_mode(&icm_driver); // FIFO Accel Low Noise Mode
//rc |= inv_imu_enable_accel_low_power_mode(&icm_driver); // FIFO Accel Low Power Mode TEST
rc |= inv_imu_enable_gyro_low_noise_mode(&icm_driver); // FIFO Gyro Low Noise Mode
imu_fifo_log_power_mode();
dr_sd_delay_ms(IMU_FIFO_ENABLE_SETTLE_MS);
rc |= inv_imu_reset_fifo(&icm_driver);
@@ -977,6 +984,5 @@ int imu_fifo_capture_stop_and_send_rim(void)
}
imu_fifo_send_rim_packets(packet_count);
imu_fifo_power_off();
return 0;
}
@@ -21,6 +21,7 @@
#ifndef _APP_RAW_H_
#define _APP_RAW_H_
#include <stdbool.h>
#include "sdk_config.h"
#include <stdint.h>
@@ -121,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 ... ]