mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2024-12-28 18:46:18 +00:00
d/vive: Setup the variable tracking for imu fusion
This commit is contained in:
parent
cebc8ebed5
commit
9695e90d95
1
doc/changes/drivers/mr.740.md
Normal file
1
doc/changes/drivers/mr.740.md
Normal file
|
@ -0,0 +1 @@
|
|||
vive: Setup the variable tracking for imu fusion.
|
|
@ -389,8 +389,6 @@ update_imu(struct vive_device *d, const void *buffer)
|
|||
}
|
||||
|
||||
d->imu.time_ns += dt_ns;
|
||||
d->last.acc = acceleration;
|
||||
d->last.gyro = angular_velocity;
|
||||
d->imu.sequence = seq;
|
||||
|
||||
m_imu_3dof_update(&d->fusion, d->imu.time_ns, &acceleration, &angular_velocity);
|
||||
|
@ -858,14 +856,13 @@ vive_device_create(struct os_hid_device *mainboard_dev,
|
|||
m_imu_3dof_init(&d->fusion, M_IMU_3DOF_USE_GRAVITY_DUR_20MS);
|
||||
|
||||
u_var_add_root(d, "Vive Device", true);
|
||||
u_var_add_gui_header(d, &d->gui.fusion, "3DoF Fusion");
|
||||
m_imu_3dof_add_vars(&d->fusion, d, "");
|
||||
u_var_add_gui_header(d, &d->gui.calibration, "Calibration");
|
||||
u_var_add_vec3_f32(d, &d->config.imu.acc_scale, "acc_scale");
|
||||
u_var_add_vec3_f32(d, &d->config.imu.acc_bias, "acc_bias");
|
||||
u_var_add_vec3_f32(d, &d->config.imu.gyro_scale, "gyro_scale");
|
||||
u_var_add_vec3_f32(d, &d->config.imu.gyro_bias, "gyro_bias");
|
||||
u_var_add_gui_header(d, &d->gui.last, "Last data");
|
||||
u_var_add_vec3_f32(d, &d->last.acc, "acc");
|
||||
u_var_add_vec3_f32(d, &d->last.gyro, "gyro");
|
||||
|
||||
int ret;
|
||||
|
||||
|
|
|
@ -51,12 +51,6 @@ struct vive_device
|
|||
|
||||
struct m_imu_3dof fusion;
|
||||
|
||||
struct
|
||||
{
|
||||
struct xrt_vec3 acc;
|
||||
struct xrt_vec3 gyro;
|
||||
} last;
|
||||
|
||||
struct
|
||||
{
|
||||
uint16_t ipd;
|
||||
|
@ -73,7 +67,7 @@ struct vive_device
|
|||
struct
|
||||
{
|
||||
bool calibration;
|
||||
bool last;
|
||||
bool fusion;
|
||||
} gui;
|
||||
|
||||
struct vive_config config;
|
||||
|
|
Loading…
Reference in a new issue