From 2044ae6b3af6fab4d79996a661fef43f6db8d825 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viktor=20Sz=C3=A9pe?= Date: Mon, 15 Jan 2024 23:26:53 +0000 Subject: Fix more typos --- src/input_common/helpers/joycon_protocol/rumble.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/input_common/helpers/joycon_protocol/rumble.cpp') diff --git a/src/input_common/helpers/joycon_protocol/rumble.cpp b/src/input_common/helpers/joycon_protocol/rumble.cpp index 7647f505e..9fd0b8470 100644 --- a/src/input_common/helpers/joycon_protocol/rumble.cpp +++ b/src/input_common/helpers/joycon_protocol/rumble.cpp @@ -67,7 +67,7 @@ u8 RumbleProtocol::EncodeHighAmplitude(f32 amplitude) const { // More information about these values can be found here: // https://github.com/dekuNukem/Nintendo_Switch_Reverse_Engineering/blob/master/rumble_data_table.md - static constexpr std::array, 101> high_fequency_amplitude{ + static constexpr std::array, 101> high_frequency_amplitude{ std::pair{0.0f, 0x0}, {0.01f, 0x2}, {0.012f, 0x4}, @@ -171,20 +171,20 @@ u8 RumbleProtocol::EncodeHighAmplitude(f32 amplitude) const { {1.003f, 0xc8}, }; - for (const auto& [amplitude_value, code] : high_fequency_amplitude) { + for (const auto& [amplitude_value, code] : high_frequency_amplitude) { if (amplitude <= amplitude_value) { return static_cast(code); } } - return static_cast(high_fequency_amplitude[high_fequency_amplitude.size() - 1].second); + return static_cast(high_frequency_amplitude[high_frequency_amplitude.size() - 1].second); } u16 RumbleProtocol::EncodeLowAmplitude(f32 amplitude) const { // More information about these values can be found here: // https://github.com/dekuNukem/Nintendo_Switch_Reverse_Engineering/blob/master/rumble_data_table.md - static constexpr std::array, 101> high_fequency_amplitude{ + static constexpr std::array, 101> high_frequency_amplitude{ std::pair{0.0f, 0x0040}, {0.01f, 0x8040}, {0.012f, 0x0041}, @@ -288,13 +288,13 @@ u16 RumbleProtocol::EncodeLowAmplitude(f32 amplitude) const { {1.003f, 0x0072}, }; - for (const auto& [amplitude_value, code] : high_fequency_amplitude) { + for (const auto& [amplitude_value, code] : high_frequency_amplitude) { if (amplitude <= amplitude_value) { return static_cast(code); } } - return static_cast(high_fequency_amplitude[high_fequency_amplitude.size() - 1].second); + return static_cast(high_frequency_amplitude[high_frequency_amplitude.size() - 1].second); } } // namespace InputCommon::Joycon -- cgit v1.2.3