Fix more typos
This commit is contained in:
parent
cff668e1c4
commit
8f8a15827f
36 changed files with 86 additions and 86 deletions
|
@ -451,11 +451,11 @@ ButtonMapping GCAdapter::GetButtonMappingForDevice(const Common::ParamPackage& p
|
|||
std::tuple{Settings::NativeButton::ZL, PadButton::TriggerL, PadAxes::TriggerLeft},
|
||||
{Settings::NativeButton::ZR, PadButton::TriggerR, PadAxes::TriggerRight},
|
||||
};
|
||||
for (const auto& [switch_button, gcadapter_buton, gcadapter_axis] : switch_to_gcadapter_axis) {
|
||||
for (const auto& [switch_button, gcadapter_button, gcadapter_axis] : switch_to_gcadapter_axis) {
|
||||
Common::ParamPackage button_params{};
|
||||
button_params.Set("engine", GetEngineName());
|
||||
button_params.Set("port", params.Get("port", 0));
|
||||
button_params.Set("button", static_cast<s32>(gcadapter_buton));
|
||||
button_params.Set("button", static_cast<s32>(gcadapter_button));
|
||||
button_params.Set("axis", static_cast<s32>(gcadapter_axis));
|
||||
button_params.Set("threshold", 0.5f);
|
||||
button_params.Set("range", 1.9f);
|
||||
|
|
|
@ -236,9 +236,9 @@ Common::Input::DriverResult IrsProtocol::WriteRegistersStep2() {
|
|||
.number_of_registers = 0x8,
|
||||
.registers =
|
||||
{
|
||||
IrsRegister{IrRegistersAddress::LedIntensitiyMSB,
|
||||
IrsRegister{IrRegistersAddress::LedIntensityMSB,
|
||||
static_cast<u8>(led_intensity >> 8)},
|
||||
{IrRegistersAddress::LedIntensitiyLSB, static_cast<u8>(led_intensity & 0xff)},
|
||||
{IrRegistersAddress::LedIntensityLSB, static_cast<u8>(led_intensity & 0xff)},
|
||||
{IrRegistersAddress::ImageFlip, static_cast<u8>(image_flip)},
|
||||
{IrRegistersAddress::DenoiseSmoothing, static_cast<u8>((denoise >> 16) & 0xff)},
|
||||
{IrRegistersAddress::DenoiseEdge, static_cast<u8>((denoise >> 8) & 0xff)},
|
||||
|
|
|
@ -282,7 +282,7 @@ enum class NFCCommand : u8 {
|
|||
CancelAll = 0x00,
|
||||
StartPolling = 0x01,
|
||||
StopPolling = 0x02,
|
||||
StartWaitingRecieve = 0x04,
|
||||
StartWaitingReceive = 0x04,
|
||||
ReadNtag = 0x06,
|
||||
WriteNtag = 0x08,
|
||||
Mifare = 0x0F,
|
||||
|
@ -382,8 +382,8 @@ enum class IrRegistersAddress : u16 {
|
|||
FinalizeConfig = 0x0700,
|
||||
LedFilter = 0x0e00,
|
||||
Leds = 0x1000,
|
||||
LedIntensitiyMSB = 0x1100,
|
||||
LedIntensitiyLSB = 0x1200,
|
||||
LedIntensityMSB = 0x1100,
|
||||
LedIntensityLSB = 0x1200,
|
||||
ImageFlip = 0x2d00,
|
||||
Resolution = 0x2e00,
|
||||
DigitalGainLSB = 0x2e01,
|
||||
|
|
|
@ -519,13 +519,13 @@ Common::Input::DriverResult NfcProtocol::GetMifareData(
|
|||
}
|
||||
|
||||
if (output.mcu_report == MCUReport::NFCState && output.mcu_data[1] == 0x10) {
|
||||
constexpr std::size_t DATA_LENGHT = 0x10 + 1;
|
||||
constexpr std::size_t DATA_LENGTH = 0x10 + 1;
|
||||
constexpr std::size_t DATA_START = 11;
|
||||
const u8 number_of_elements = output.mcu_data[10];
|
||||
for (std::size_t i = 0; i < number_of_elements; i++) {
|
||||
out_data[i].sector = output.mcu_data[DATA_START + (i * DATA_LENGHT)];
|
||||
out_data[i].sector = output.mcu_data[DATA_START + (i * DATA_LENGTH)];
|
||||
memcpy(out_data[i].data.data(),
|
||||
output.mcu_data.data() + DATA_START + 1 + (i * DATA_LENGHT),
|
||||
output.mcu_data.data() + DATA_START + 1 + (i * DATA_LENGTH),
|
||||
sizeof(MifareReadData::data));
|
||||
}
|
||||
package_index++;
|
||||
|
@ -659,7 +659,7 @@ Common::Input::DriverResult NfcProtocol::SendStopPollingRequest(MCUCommandRespon
|
|||
Common::Input::DriverResult NfcProtocol::SendNextPackageRequest(MCUCommandResponse& output,
|
||||
u8 packet_id) {
|
||||
NFCRequestState request{
|
||||
.command_argument = NFCCommand::StartWaitingRecieve,
|
||||
.command_argument = NFCCommand::StartWaitingReceive,
|
||||
.block_id = {},
|
||||
.packet_id = packet_id,
|
||||
.packet_flag = MCUPacketFlag::LastCommandPacket,
|
||||
|
|
|
@ -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<std::pair<f32, int>, 101> high_fequency_amplitude{
|
||||
static constexpr std::array<std::pair<f32, int>, 101> high_frequency_amplitude{
|
||||
std::pair<f32, int>{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<u8>(code);
|
||||
}
|
||||
}
|
||||
|
||||
return static_cast<u8>(high_fequency_amplitude[high_fequency_amplitude.size() - 1].second);
|
||||
return static_cast<u8>(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<std::pair<f32, int>, 101> high_fequency_amplitude{
|
||||
static constexpr std::array<std::pair<f32, int>, 101> high_frequency_amplitude{
|
||||
std::pair<f32, int>{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<u16>(code);
|
||||
}
|
||||
}
|
||||
|
||||
return static_cast<u16>(high_fequency_amplitude[high_fequency_amplitude.size() - 1].second);
|
||||
return static_cast<u16>(high_frequency_amplitude[high_frequency_amplitude.size() - 1].second);
|
||||
}
|
||||
|
||||
} // namespace InputCommon::Joycon
|
||||
|
|
|
@ -78,7 +78,7 @@ namespace Request {
|
|||
enum RegisterFlags : u8 {
|
||||
AllPads,
|
||||
PadID,
|
||||
PadMACAdddress,
|
||||
PadMACAddress,
|
||||
};
|
||||
|
||||
struct Version {};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue