mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-01-17 04:15:44 +00:00
m/3dof: Add reset functionality
This commit is contained in:
parent
916e2ced42
commit
471ca9530b
|
@ -38,6 +38,20 @@ m_imu_3dof_init(struct m_imu_3dof *f, int flags)
|
|||
f->flags = flags;
|
||||
}
|
||||
|
||||
void
|
||||
m_imu_3dof_reset(struct m_imu_3dof *f)
|
||||
{
|
||||
struct m_ff_vec3_f32 *aff = f->word_accel_ff;
|
||||
struct m_ff_vec3_f32 *gff = f->gyro_ff;
|
||||
int flags = f->flags;
|
||||
|
||||
U_ZERO(f);
|
||||
f->rot.w = 1.0f;
|
||||
f->word_accel_ff = aff;
|
||||
f->gyro_ff = gff;
|
||||
f->flags = flags;
|
||||
}
|
||||
|
||||
void
|
||||
m_imu_3dof_close(struct m_imu_3dof *f)
|
||||
{
|
||||
|
|
|
@ -75,6 +75,9 @@ struct m_imu_3dof
|
|||
void
|
||||
m_imu_3dof_init(struct m_imu_3dof *f, int flags);
|
||||
|
||||
void
|
||||
m_imu_3dof_reset(struct m_imu_3dof *f);
|
||||
|
||||
void
|
||||
m_imu_3dof_close(struct m_imu_3dof *f);
|
||||
|
||||
|
|
Loading…
Reference in a new issue