hid: Implement SevenSixAxis and ConsoleSixAxisSensor
This commit is contained in:
parent
cdce1edf74
commit
c19ad21ae8
10 changed files with 220 additions and 17 deletions
|
@ -195,7 +195,8 @@ Input::MotionStatus MotionInput::GetMotion() const {
|
|||
const Common::Vec3f accelerometer = GetAcceleration();
|
||||
const Common::Vec3f rotation = GetRotations();
|
||||
const std::array<Common::Vec3f, 3> orientation = GetOrientation();
|
||||
return {accelerometer, gyroscope, rotation, orientation};
|
||||
const Common::Quaternion<f32> quaternion = GetQuaternion();
|
||||
return {accelerometer, gyroscope, rotation, orientation, quaternion};
|
||||
}
|
||||
|
||||
Input::MotionStatus MotionInput::GetRandomMotion(int accel_magnitude, int gyro_magnitude) const {
|
||||
|
@ -218,7 +219,12 @@ Input::MotionStatus MotionInput::GetRandomMotion(int accel_magnitude, int gyro_m
|
|||
Common::Vec3f{0.0f, 1.0f, 0.0f},
|
||||
Common::Vec3f{0.0f, 0.0f, 1.0f},
|
||||
};
|
||||
return {accelerometer * accel_magnitude, gyroscope * gyro_magnitude, rotation, orientation};
|
||||
constexpr Common::Quaternion<f32> quaternion{
|
||||
{0.0f, 0.0f, 0.0f},
|
||||
1.0f,
|
||||
};
|
||||
return {accelerometer * accel_magnitude, gyroscope * gyro_magnitude, rotation, orientation,
|
||||
quaternion};
|
||||
}
|
||||
|
||||
void MotionInput::ResetOrientation() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue