From 0774b17846fc7bd12bfe329fbaed6524d96c81cb Mon Sep 17 00:00:00 2001 From: german Date: Wed, 2 Sep 2020 19:59:34 -0500 Subject: Remove RealMotionDevice --- src/input_common/udp/client.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/input_common/udp/client.cpp') diff --git a/src/input_common/udp/client.cpp b/src/input_common/udp/client.cpp index 3f4eaf448..91e13482d 100644 --- a/src/input_common/udp/client.cpp +++ b/src/input_common/udp/client.cpp @@ -170,10 +170,18 @@ void Client::OnPadData(Response::PadData data) { // directions correspond to the ones of the Switch Common::Vec3f accel = Common::MakeVec(data.accel.x, data.accel.y, data.accel.z); Common::Vec3f gyro = Common::MakeVec(data.gyro.pitch, data.gyro.yaw, data.gyro.roll); + + // TODO: Calculate the correct rotation vector and orientation matrix + const auto rotation = Common::MakeVec(0.0f, 0.0f, 0.0f); + const std::array orientation{ + Common::Vec3f(1.0f, 0.0f, 0.0f), + Common::Vec3f(0.0f, 1.0f, 0.0f), + Common::Vec3f(0.0f, 0.0f, 1.0f), + }; { std::lock_guard guard(status->update_mutex); - status->motion_status = {accel, gyro}; + status->motion_status = {accel, gyro, rotation, orientation}; // TODO: add a setting for "click" touch. Click touch refers to a device that differentiates // between a simple "tap" and a hard press that causes the touch screen to click. -- cgit v1.2.3