From 240f59a4c8319ec5f0c0e5fd34e8f9c5a458751e Mon Sep 17 00:00:00 2001 From: german77 Date: Sat, 21 May 2022 17:10:20 -0500 Subject: service: hid: Implement LoadSixAxisSensorCalibrationParameter and GetSixAxisSensorIcInformation Needed by Nintendo Switch Sports --- src/core/hid/hid_types.h | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) (limited to 'src/core/hid') diff --git a/src/core/hid/hid_types.h b/src/core/hid/hid_types.h index 26ec1091b..00ba23535 100644 --- a/src/core/hid/hid_types.h +++ b/src/core/hid/hid_types.h @@ -498,6 +498,39 @@ struct SixAxisSensorFusionParameters { static_assert(sizeof(SixAxisSensorFusionParameters) == 8, "SixAxisSensorFusionParameters is an invalid size"); +// This is nn::hid::SixAxisSensorCalibrationParameter +struct SixAxisSensorCalibrationParameter { + std::array unknown_data{}; +}; +static_assert(sizeof(SixAxisSensorCalibrationParameter) == 0x744, + "SixAxisSensorCalibrationParameter is an invalid size"); + +// This is nn::hid::SixAxisSensorIcInformation +struct SixAxisSensorIcInformation { + f32 angular_rate{2000.0f}; // dps + std::array unknown_gyro_data1{ + -10.0f, -10.0f, -10.0f, 10.0f, 10.0f, 10.0f, + }; // dps + std::array unknown_gyro_data2{ + 0.95f, -0.003f, -0.003f, -0.003f, 0.95f, -0.003f, -0.003f, -0.003f, 0.95f, + }; + std::array unknown_gyro_data3{ + 1.05f, 0.003f, 0.003f, 0.003f, 1.05f, 0.003f, 0.003f, 0.003f, 1.05f, + }; + f32 acceleration_range{8.0f}; // g force + std::array unknown_accel_data1{ + -0.0612f, -0.0612f, -0.0612f, 0.0612f, 0.0612f, 0.0612f, + }; // g force + std::array unknown_accel_data2{ + 0.95f, -0.003f, -0.003f, -0.003f, 0.95f, -0.003f, -0.003f, -0.003f, 0.95f, + }; + std::array unknown_accel_data3{ + 1.05f, 0.003f, 0.003f, 0.003f, 1.05f, 0.003f, 0.003f, 0.003f, 1.05f, + }; +}; +static_assert(sizeof(SixAxisSensorIcInformation) == 0xC8, + "SixAxisSensorIcInformation is an invalid size"); + // This is nn::hid::VibrationDeviceHandle struct VibrationDeviceHandle { NpadStyleIndex npad_type{NpadStyleIndex::None}; -- cgit v1.2.3