From 741523d6ef9ca6817ef387b9c46e0fec50846829 Mon Sep 17 00:00:00 2001 From: Darth Affe Date: Mon, 18 Dec 2017 22:06:19 +0100 Subject: [PATCH] Fixed some small mistakes left from the LedId-conversion --- NuGet/RGB.NET.Devices.Logitech.nuspec | 1 + RGB.NET.Devices.Logitech/Layouts/Logitech/Keyboards/G610/UK.xml | 2 +- RGB.NET.Devices.Logitech/Layouts/Logitech/Keyboards/G910/UK.xml | 2 +- RGB.NET.Devices.Logitech/PerKey/LogitechPerKeyRGBDevice.cs | 2 +- RGB.NET.Devices.Logitech/PerKey/PerKeyIdMapping.cs | 2 ++ .../Launchpad/NovationLaunchpadRGBDevice.cs | 2 +- 6 files changed, 7 insertions(+), 4 deletions(-) diff --git a/NuGet/RGB.NET.Devices.Logitech.nuspec b/NuGet/RGB.NET.Devices.Logitech.nuspec index 85e3a5b..0825751 100644 --- a/NuGet/RGB.NET.Devices.Logitech.nuspec +++ b/NuGet/RGB.NET.Devices.Logitech.nuspec @@ -17,6 +17,7 @@ + diff --git a/RGB.NET.Devices.Logitech/Layouts/Logitech/Keyboards/G610/UK.xml b/RGB.NET.Devices.Logitech/Layouts/Logitech/Keyboards/G610/UK.xml index da085af..959ae32 100644 --- a/RGB.NET.Devices.Logitech/Layouts/Logitech/Keyboards/G610/UK.xml +++ b/RGB.NET.Devices.Logitech/Layouts/Logitech/Keyboards/G610/UK.xml @@ -203,7 +203,7 @@ 1.5 - + +6.75 diff --git a/RGB.NET.Devices.Logitech/Layouts/Logitech/Keyboards/G910/UK.xml b/RGB.NET.Devices.Logitech/Layouts/Logitech/Keyboards/G910/UK.xml index b7f5d22..bc30030 100644 --- a/RGB.NET.Devices.Logitech/Layouts/Logitech/Keyboards/G910/UK.xml +++ b/RGB.NET.Devices.Logitech/Layouts/Logitech/Keyboards/G910/UK.xml @@ -203,7 +203,7 @@ 1.5 - + +6.75 diff --git a/RGB.NET.Devices.Logitech/PerKey/LogitechPerKeyRGBDevice.cs b/RGB.NET.Devices.Logitech/PerKey/LogitechPerKeyRGBDevice.cs index 56b440e..78603ea 100644 --- a/RGB.NET.Devices.Logitech/PerKey/LogitechPerKeyRGBDevice.cs +++ b/RGB.NET.Devices.Logitech/PerKey/LogitechPerKeyRGBDevice.cs @@ -28,7 +28,7 @@ namespace RGB.NET.Devices.Logitech #region Methods /// - protected override object CreateLedCustomData(LedId ledId) => PerKeyIdMapping.DEFAULT[ledId]; + protected override object CreateLedCustomData(LedId ledId) => PerKeyIdMapping.DEFAULT.TryGetValue(ledId, out LogitechLedId logitechLedId) ? logitechLedId : LogitechLedId.Invalid; /// protected override void UpdateLeds(IEnumerable ledsToUpdate) diff --git a/RGB.NET.Devices.Logitech/PerKey/PerKeyIdMapping.cs b/RGB.NET.Devices.Logitech/PerKey/PerKeyIdMapping.cs index f891f90..68d2cf4 100644 --- a/RGB.NET.Devices.Logitech/PerKey/PerKeyIdMapping.cs +++ b/RGB.NET.Devices.Logitech/PerKey/PerKeyIdMapping.cs @@ -122,6 +122,8 @@ namespace RGB.NET.Devices.Logitech { LedId.Keyboard_Programmable7, LogitechLedId.G_7 }, { LedId.Keyboard_Programmable8, LogitechLedId.G_8 }, { LedId.Keyboard_Programmable9, LogitechLedId.G_9 }, + { LedId.Logo, LogitechLedId.G_LOGO }, + { LedId.Keyboard_Custom1, LogitechLedId.G_BADGE }, }; } } diff --git a/RGB.NET.Devices.Novation/Launchpad/NovationLaunchpadRGBDevice.cs b/RGB.NET.Devices.Novation/Launchpad/NovationLaunchpadRGBDevice.cs index 50f7460..cab89d6 100644 --- a/RGB.NET.Devices.Novation/Launchpad/NovationLaunchpadRGBDevice.cs +++ b/RGB.NET.Devices.Novation/Launchpad/NovationLaunchpadRGBDevice.cs @@ -52,7 +52,7 @@ namespace RGB.NET.Devices.Novation } /// - protected override object CreateLedCustomData(LedId ledId) => LaunchpadIdMapping.DEFAULT[ledId]; + protected override object CreateLedCustomData(LedId ledId) => LaunchpadIdMapping.DEFAULT.TryGetValue(ledId, out NovationLedId novationLedId) ? novationLedId : NovationLedId.Invalid; #endregion }