Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 873ae0fb83 | |||
| 593f1d1c5b |
@@ -12,6 +12,7 @@
|
|||||||
#include "cmd_device.h"
|
#include "cmd_device.h"
|
||||||
#include "fstorage.h"
|
#include "fstorage.h"
|
||||||
#include "led_control.h"
|
#include "led_control.h"
|
||||||
|
#include "app_raw.h"
|
||||||
|
|
||||||
/*==============================================================================
|
/*==============================================================================
|
||||||
* msq? -> rsq: Device power OFF
|
* msq? -> rsq: Device power OFF
|
||||||
@@ -172,6 +173,14 @@ int Cmd_mls(const ParsedCmd *cmd)
|
|||||||
}
|
}
|
||||||
|
|
||||||
led_set_state((led_state_t)state);
|
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);
|
dr_ble_return_1("rls:", state);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -53,7 +53,7 @@
|
|||||||
* : Unify both IMU direct-read and FIFO outputs as raw data in datasheet axis convention.
|
* : 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.
|
* - 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
|
* Data Length Constants
|
||||||
|
|||||||
@@ -684,6 +684,14 @@ static void imu_fifo_power_off(void)
|
|||||||
s_fifo_capture_active = false;
|
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 imu_fifo_capture_start(void)
|
||||||
{
|
{
|
||||||
int rc;
|
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_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_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
|
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);
|
dr_sd_delay_ms(IMU_FIFO_ENABLE_SETTLE_MS);
|
||||||
rc |= inv_imu_reset_fifo(&icm_driver);
|
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_send_rim_packets(packet_count);
|
||||||
imu_fifo_power_off();
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,6 +21,7 @@
|
|||||||
|
|
||||||
#ifndef _APP_RAW_H_
|
#ifndef _APP_RAW_H_
|
||||||
#define _APP_RAW_H_
|
#define _APP_RAW_H_
|
||||||
|
#include <stdbool.h>
|
||||||
#include "sdk_config.h"
|
#include "sdk_config.h"
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
@@ -121,6 +122,11 @@ int imu_fifo_capture_start(void);
|
|||||||
*/
|
*/
|
||||||
int imu_fifo_capture_stop_and_send_rim(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)
|
* mtb? / rim: binary layout (every BLE fragment)
|
||||||
* [ 'r' 'i' 'm' ':' ] [ total_sample_count u16 BE ] [ 12 * total_sample_count bytes ... ]
|
* [ 'r' 'i' 'm' ':' ] [ total_sample_count u16 BE ] [ 12 * total_sample_count bytes ... ]
|
||||||
|
|||||||
Reference in New Issue
Block a user