IMU FIFO 샘플 대기 함수 추가
- 샘플 부족 방지 안전장치
This commit is contained in:
@@ -139,7 +139,13 @@ int cmd_mtb(const uint8_t *data, uint8_t data_len)
|
||||
{
|
||||
if (fifo_started)
|
||||
{
|
||||
int imu_ret = imu_fifo_read_latest(tx_rim_samples, IMU_FIFO_RIM_TARGET_SAMPLES, &rim_count);
|
||||
imu_ret = imu_fifo_wait_samples(IMU_FIFO_RIM_TARGET_SAMPLES, 500U);
|
||||
if (imu_ret != 0)
|
||||
{
|
||||
DBG_PRINTF("[MTB] fifo wait ret=%d\r\n", imu_ret);
|
||||
}
|
||||
|
||||
imu_ret = imu_fifo_read_latest(tx_rim_samples, IMU_FIFO_RIM_TARGET_SAMPLES, &rim_count);
|
||||
if (imu_ret != 0)
|
||||
{
|
||||
DBG_PRINTF("[MTB] fifo read fail ret=%d\r\n", imu_ret);
|
||||
|
||||
Reference in New Issue
Block a user