summaryrefslogtreecommitdiff
path: root/src/input_common
diff options
context:
space:
mode:
Diffstat (limited to 'src/input_common')
-rw-r--r--src/input_common/gcadapter/gc_adapter.h6
-rw-r--r--src/input_common/motion_input.cpp2
-rw-r--r--src/input_common/mouse/mouse_input.h2
-rw-r--r--src/input_common/udp/udp.cpp8
4 files changed, 9 insertions, 9 deletions
diff --git a/src/input_common/gcadapter/gc_adapter.h b/src/input_common/gcadapter/gc_adapter.h
index f1256c9da..7a6c545bd 100644
--- a/src/input_common/gcadapter/gc_adapter.h
+++ b/src/input_common/gcadapter/gc_adapter.h
@@ -120,17 +120,17 @@ private:
120 /// For use in initialization, querying devices to find the adapter 120 /// For use in initialization, querying devices to find the adapter
121 void Setup(); 121 void Setup();
122 122
123 /// Resets status of all GC controller devices to a disconected state 123 /// Resets status of all GC controller devices to a disconnected state
124 void ResetDevices(); 124 void ResetDevices();
125 125
126 /// Resets status of device connected to a disconected state 126 /// Resets status of device connected to a disconnected state
127 void ResetDevice(std::size_t port); 127 void ResetDevice(std::size_t port);
128 128
129 /// Returns true if we successfully gain access to GC Adapter 129 /// Returns true if we successfully gain access to GC Adapter
130 bool CheckDeviceAccess(); 130 bool CheckDeviceAccess();
131 131
132 /// Captures GC Adapter endpoint address 132 /// Captures GC Adapter endpoint address
133 /// Returns true if the endpoind was set correctly 133 /// Returns true if the endpoint was set correctly
134 bool GetGCEndpoint(libusb_device* device); 134 bool GetGCEndpoint(libusb_device* device);
135 135
136 /// For shutting down, clear all data, join all threads, release usb 136 /// For shutting down, clear all data, join all threads, release usb
diff --git a/src/input_common/motion_input.cpp b/src/input_common/motion_input.cpp
index f77ba535d..6a65f175e 100644
--- a/src/input_common/motion_input.cpp
+++ b/src/input_common/motion_input.cpp
@@ -129,7 +129,7 @@ void MotionInput::UpdateOrientation(u64 elapsed_time) {
129 rad_gyro += ki * integral_error; 129 rad_gyro += ki * integral_error;
130 rad_gyro += kd * derivative_error; 130 rad_gyro += kd * derivative_error;
131 } else { 131 } else {
132 // Give more weight to acelerometer values to compensate for the lack of gyro 132 // Give more weight to accelerometer values to compensate for the lack of gyro
133 rad_gyro += 35.0f * kp * real_error; 133 rad_gyro += 35.0f * kp * real_error;
134 rad_gyro += 10.0f * ki * integral_error; 134 rad_gyro += 10.0f * ki * integral_error;
135 rad_gyro += 10.0f * kd * derivative_error; 135 rad_gyro += 10.0f * kd * derivative_error;
diff --git a/src/input_common/mouse/mouse_input.h b/src/input_common/mouse/mouse_input.h
index 65e64bee7..58803c1bf 100644
--- a/src/input_common/mouse/mouse_input.h
+++ b/src/input_common/mouse/mouse_input.h
@@ -20,7 +20,7 @@ enum class MouseButton {
20 Left, 20 Left,
21 Wheel, 21 Wheel,
22 Right, 22 Right,
23 Foward, 23 Forward,
24 Backward, 24 Backward,
25 Undefined, 25 Undefined,
26}; 26};
diff --git a/src/input_common/udp/udp.cpp b/src/input_common/udp/udp.cpp
index 8686a059c..c5da27a38 100644
--- a/src/input_common/udp/udp.cpp
+++ b/src/input_common/udp/udp.cpp
@@ -28,14 +28,14 @@ private:
28 mutable std::mutex mutex; 28 mutable std::mutex mutex;
29}; 29};
30 30
31/// A motion device factory that creates motion devices from JC Adapter 31/// A motion device factory that creates motion devices from a UDP client
32UDPMotionFactory::UDPMotionFactory(std::shared_ptr<CemuhookUDP::Client> client_) 32UDPMotionFactory::UDPMotionFactory(std::shared_ptr<CemuhookUDP::Client> client_)
33 : client(std::move(client_)) {} 33 : client(std::move(client_)) {}
34 34
35/** 35/**
36 * Creates motion device 36 * Creates motion device
37 * @param params contains parameters for creating the device: 37 * @param params contains parameters for creating the device:
38 * - "port": the nth jcpad on the adapter 38 * - "port": the UDP port number
39 */ 39 */
40std::unique_ptr<Input::MotionDevice> UDPMotionFactory::Create(const Common::ParamPackage& params) { 40std::unique_ptr<Input::MotionDevice> UDPMotionFactory::Create(const Common::ParamPackage& params) {
41 auto ip = params.Get("ip", "127.0.0.1"); 41 auto ip = params.Get("ip", "127.0.0.1");
@@ -90,14 +90,14 @@ private:
90 mutable std::mutex mutex; 90 mutable std::mutex mutex;
91}; 91};
92 92
93/// A motion device factory that creates motion devices from JC Adapter 93/// A motion device factory that creates motion devices from a UDP client
94UDPTouchFactory::UDPTouchFactory(std::shared_ptr<CemuhookUDP::Client> client_) 94UDPTouchFactory::UDPTouchFactory(std::shared_ptr<CemuhookUDP::Client> client_)
95 : client(std::move(client_)) {} 95 : client(std::move(client_)) {}
96 96
97/** 97/**
98 * Creates motion device 98 * Creates motion device
99 * @param params contains parameters for creating the device: 99 * @param params contains parameters for creating the device:
100 * - "port": the nth jcpad on the adapter 100 * - "port": the UDP port number
101 */ 101 */
102std::unique_ptr<Input::TouchDevice> UDPTouchFactory::Create(const Common::ParamPackage& params) { 102std::unique_ptr<Input::TouchDevice> UDPTouchFactory::Create(const Common::ParamPackage& params) {
103 auto ip = params.Get("ip", "127.0.0.1"); 103 auto ip = params.Get("ip", "127.0.0.1");