From 40cce7aaaf972fc3d158c5591bd695be61195076 Mon Sep 17 00:00:00 2001 From: Robert Date: Mon, 29 Mar 2021 00:59:26 +0200 Subject: [PATCH] Core - Added Unknown LED IDs Core - Moved Custom LED IDs from 0xFF to 0xFE ASUS - Use Unknown LED IDs for missing LED mappings --- RGB.NET.Core/Leds/LedId.cs | 386 ++++++++++++------ RGB.NET.Devices.Asus/Enum/AsusLedId.cs | 6 +- .../Keyboard/AsusKeyboardLedMapping.cs | 6 +- .../Keyboard/AsusKeyboardRGBDevice.cs | 7 +- 4 files changed, 273 insertions(+), 132 deletions(-) diff --git a/RGB.NET.Core/Leds/LedId.cs b/RGB.NET.Core/Leds/LedId.cs index f3e3bac..9f60cbf 100644 --- a/RGB.NET.Core/Leds/LedId.cs +++ b/RGB.NET.Core/Leds/LedId.cs @@ -1234,133 +1234,263 @@ namespace RGB.NET.Core Cooler64 = 0x00D00040, /*### Custom ###*/ - Custom1 = 0x0FF00001, - Custom2 = 0x0FF00002, - Custom3 = 0x0FF00003, - Custom4 = 0x0FF00004, - Custom5 = 0x0FF00005, - Custom6 = 0x0FF00006, - Custom7 = 0x0FF00007, - Custom8 = 0x0FF00008, - Custom9 = 0x0FF00009, - Custom10 = 0x0FF0000A, - Custom11 = 0x0FF0000B, - Custom12 = 0x0FF0000C, - Custom13 = 0x0FF0000D, - Custom14 = 0x0FF0000E, - Custom15 = 0x0FF0000F, - Custom16 = 0x0FF00010, - Custom17 = 0x0FF00011, - Custom18 = 0x0FF00012, - Custom19 = 0x0FF00013, - Custom20 = 0x0FF00014, - Custom21 = 0x0FF00015, - Custom22 = 0x0FF00016, - Custom23 = 0x0FF00017, - Custom24 = 0x0FF00018, - Custom25 = 0x0FF00019, - Custom26 = 0x0FF0001A, - Custom27 = 0x0FF0001B, - Custom28 = 0x0FF0001C, - Custom29 = 0x0FF0001D, - Custom30 = 0x0FF0001E, - Custom31 = 0x0FF0001F, - Custom32 = 0x0FF00020, - Custom33 = 0x0FF00021, - Custom34 = 0x0FF00022, - Custom35 = 0x0FF00023, - Custom36 = 0x0FF00024, - Custom37 = 0x0FF00025, - Custom38 = 0x0FF00026, - Custom39 = 0x0FF00027, - Custom40 = 0x0FF00028, - Custom41 = 0x0FF00029, - Custom42 = 0x0FF0002A, - Custom43 = 0x0FF0002B, - Custom44 = 0x0FF0002C, - Custom45 = 0x0FF0002D, - Custom46 = 0x0FF0002E, - Custom47 = 0x0FF0002F, - Custom48 = 0x0FF00030, - Custom49 = 0x0FF00031, - Custom50 = 0x0FF00032, - Custom51 = 0x0FF00033, - Custom52 = 0x0FF00034, - Custom53 = 0x0FF00035, - Custom54 = 0x0FF00036, - Custom55 = 0x0FF00037, - Custom56 = 0x0FF00038, - Custom57 = 0x0FF00039, - Custom58 = 0x0FF0003A, - Custom59 = 0x0FF0003B, - Custom60 = 0x0FF0003C, - Custom61 = 0x0FF0003D, - Custom62 = 0x0FF0003E, - Custom63 = 0x0FF0003F, - Custom64 = 0x0FF00040, - Custom65 = 0x0FF00041, - Custom66 = 0x0FF00042, - Custom67 = 0x0FF00043, - Custom68 = 0x0FF00044, - Custom69 = 0x0FF00045, - Custom70 = 0x0FF00046, - Custom71 = 0x0FF00047, - Custom72 = 0x0FF00048, - Custom73 = 0x0FF00049, - Custom74 = 0x0FF0004A, - Custom75 = 0x0FF0004B, - Custom76 = 0x0FF0004C, - Custom77 = 0x0FF0004D, - Custom78 = 0x0FF0004E, - Custom79 = 0x0FF0004F, - Custom80 = 0x0FF00050, - Custom81 = 0x0FF00051, - Custom82 = 0x0FF00052, - Custom83 = 0x0FF00053, - Custom84 = 0x0FF00054, - Custom85 = 0x0FF00055, - Custom86 = 0x0FF00056, - Custom87 = 0x0FF00057, - Custom88 = 0x0FF00058, - Custom89 = 0x0FF00059, - Custom90 = 0x0FF0005A, - Custom91 = 0x0FF0005B, - Custom92 = 0x0FF0005C, - Custom93 = 0x0FF0005D, - Custom94 = 0x0FF0005E, - Custom95 = 0x0FF0005F, - Custom96 = 0x0FF00060, - Custom97 = 0x0FF00061, - Custom98 = 0x0FF00062, - Custom99 = 0x0FF00063, - Custom100 = 0x0FF00064, - Custom101 = 0x0FF00065, - Custom102 = 0x0FF00066, - Custom103 = 0x0FF00067, - Custom104 = 0x0FF00068, - Custom105 = 0x0FF00069, - Custom106 = 0x0FF0006A, - Custom107 = 0x0FF0006B, - Custom108 = 0x0FF0006C, - Custom109 = 0x0FF0006D, - Custom110 = 0x0FF0006E, - Custom111 = 0x0FF0006F, - Custom112 = 0x0FF00070, - Custom113 = 0x0FF00071, - Custom114 = 0x0FF00072, - Custom115 = 0x0FF00073, - Custom116 = 0x0FF00074, - Custom117 = 0x0FF00075, - Custom118 = 0x0FF00076, - Custom119 = 0x0FF00077, - Custom120 = 0x0FF00078, - Custom121 = 0x0FF00079, - Custom122 = 0x0FF0007A, - Custom123 = 0x0FF0007B, - Custom124 = 0x0FF0007C, - Custom125 = 0x0FF0007D, - Custom126 = 0x0FF0007E, - Custom127 = 0x0FF0007F, - Custom128 = 0x0FF00080, + Custom1 = 0x0FE00001, + Custom2 = 0x0FE00002, + Custom3 = 0x0FE00003, + Custom4 = 0x0FE00004, + Custom5 = 0x0FE00005, + Custom6 = 0x0FE00006, + Custom7 = 0x0FE00007, + Custom8 = 0x0FE00008, + Custom9 = 0x0FE00009, + Custom10 = 0x0FE0000A, + Custom11 = 0x0FE0000B, + Custom12 = 0x0FE0000C, + Custom13 = 0x0FE0000D, + Custom14 = 0x0FE0000E, + Custom15 = 0x0FE0000F, + Custom16 = 0x0FE00010, + Custom17 = 0x0FE00011, + Custom18 = 0x0FE00012, + Custom19 = 0x0FE00013, + Custom20 = 0x0FE00014, + Custom21 = 0x0FE00015, + Custom22 = 0x0FE00016, + Custom23 = 0x0FE00017, + Custom24 = 0x0FE00018, + Custom25 = 0x0FE00019, + Custom26 = 0x0FE0001A, + Custom27 = 0x0FE0001B, + Custom28 = 0x0FE0001C, + Custom29 = 0x0FE0001D, + Custom30 = 0x0FE0001E, + Custom31 = 0x0FE0001F, + Custom32 = 0x0FE00020, + Custom33 = 0x0FE00021, + Custom34 = 0x0FE00022, + Custom35 = 0x0FE00023, + Custom36 = 0x0FE00024, + Custom37 = 0x0FE00025, + Custom38 = 0x0FE00026, + Custom39 = 0x0FE00027, + Custom40 = 0x0FE00028, + Custom41 = 0x0FE00029, + Custom42 = 0x0FE0002A, + Custom43 = 0x0FE0002B, + Custom44 = 0x0FE0002C, + Custom45 = 0x0FE0002D, + Custom46 = 0x0FE0002E, + Custom47 = 0x0FE0002F, + Custom48 = 0x0FE00030, + Custom49 = 0x0FE00031, + Custom50 = 0x0FE00032, + Custom51 = 0x0FE00033, + Custom52 = 0x0FE00034, + Custom53 = 0x0FE00035, + Custom54 = 0x0FE00036, + Custom55 = 0x0FE00037, + Custom56 = 0x0FE00038, + Custom57 = 0x0FE00039, + Custom58 = 0x0FE0003A, + Custom59 = 0x0FE0003B, + Custom60 = 0x0FE0003C, + Custom61 = 0x0FE0003D, + Custom62 = 0x0FE0003E, + Custom63 = 0x0FE0003F, + Custom64 = 0x0FE00040, + Custom65 = 0x0FE00041, + Custom66 = 0x0FE00042, + Custom67 = 0x0FE00043, + Custom68 = 0x0FE00044, + Custom69 = 0x0FE00045, + Custom70 = 0x0FE00046, + Custom71 = 0x0FE00047, + Custom72 = 0x0FE00048, + Custom73 = 0x0FE00049, + Custom74 = 0x0FE0004A, + Custom75 = 0x0FE0004B, + Custom76 = 0x0FE0004C, + Custom77 = 0x0FE0004D, + Custom78 = 0x0FE0004E, + Custom79 = 0x0FE0004F, + Custom80 = 0x0FE00050, + Custom81 = 0x0FE00051, + Custom82 = 0x0FE00052, + Custom83 = 0x0FE00053, + Custom84 = 0x0FE00054, + Custom85 = 0x0FE00055, + Custom86 = 0x0FE00056, + Custom87 = 0x0FE00057, + Custom88 = 0x0FE00058, + Custom89 = 0x0FE00059, + Custom90 = 0x0FE0005A, + Custom91 = 0x0FE0005B, + Custom92 = 0x0FE0005C, + Custom93 = 0x0FE0005D, + Custom94 = 0x0FE0005E, + Custom95 = 0x0FE0005F, + Custom96 = 0x0FE00060, + Custom97 = 0x0FE00061, + Custom98 = 0x0FE00062, + Custom99 = 0x0FE00063, + Custom100 = 0x0FE00064, + Custom101 = 0x0FE00065, + Custom102 = 0x0FE00066, + Custom103 = 0x0FE00067, + Custom104 = 0x0FE00068, + Custom105 = 0x0FE00069, + Custom106 = 0x0FE0006A, + Custom107 = 0x0FE0006B, + Custom108 = 0x0FE0006C, + Custom109 = 0x0FE0006D, + Custom110 = 0x0FE0006E, + Custom111 = 0x0FE0006F, + Custom112 = 0x0FE00070, + Custom113 = 0x0FE00071, + Custom114 = 0x0FE00072, + Custom115 = 0x0FE00073, + Custom116 = 0x0FE00074, + Custom117 = 0x0FE00075, + Custom118 = 0x0FE00076, + Custom119 = 0x0FE00077, + Custom120 = 0x0FE00078, + Custom121 = 0x0FE00079, + Custom122 = 0x0FE0007A, + Custom123 = 0x0FE0007B, + Custom124 = 0x0FE0007C, + Custom125 = 0x0FE0007D, + Custom126 = 0x0FE0007E, + Custom127 = 0x0FE0007F, + Custom128 = 0x0FE00080, + + /*### Unknown ###*/ + Unknown1 = 0x0FF00001, + Unknown2 = 0x0FF00002, + Unknown3 = 0x0FF00003, + Unknown4 = 0x0FF00004, + Unknown5 = 0x0FF00005, + Unknown6 = 0x0FF00006, + Unknown7 = 0x0FF00007, + Unknown8 = 0x0FF00008, + Unknown9 = 0x0FF00009, + Unknown10 = 0x0FF0000A, + Unknown11 = 0x0FF0000B, + Unknown12 = 0x0FF0000C, + Unknown13 = 0x0FF0000D, + Unknown14 = 0x0FF0000E, + Unknown15 = 0x0FF0000F, + Unknown16 = 0x0FF00010, + Unknown17 = 0x0FF00011, + Unknown18 = 0x0FF00012, + Unknown19 = 0x0FF00013, + Unknown20 = 0x0FF00014, + Unknown21 = 0x0FF00015, + Unknown22 = 0x0FF00016, + Unknown23 = 0x0FF00017, + Unknown24 = 0x0FF00018, + Unknown25 = 0x0FF00019, + Unknown26 = 0x0FF0001A, + Unknown27 = 0x0FF0001B, + Unknown28 = 0x0FF0001C, + Unknown29 = 0x0FF0001D, + Unknown30 = 0x0FF0001E, + Unknown31 = 0x0FF0001F, + Unknown32 = 0x0FF00020, + Unknown33 = 0x0FF00021, + Unknown34 = 0x0FF00022, + Unknown35 = 0x0FF00023, + Unknown36 = 0x0FF00024, + Unknown37 = 0x0FF00025, + Unknown38 = 0x0FF00026, + Unknown39 = 0x0FF00027, + Unknown40 = 0x0FF00028, + Unknown41 = 0x0FF00029, + Unknown42 = 0x0FF0002A, + Unknown43 = 0x0FF0002B, + Unknown44 = 0x0FF0002C, + Unknown45 = 0x0FF0002D, + Unknown46 = 0x0FF0002E, + Unknown47 = 0x0FF0002F, + Unknown48 = 0x0FF00030, + Unknown49 = 0x0FF00031, + Unknown50 = 0x0FF00032, + Unknown51 = 0x0FF00033, + Unknown52 = 0x0FF00034, + Unknown53 = 0x0FF00035, + Unknown54 = 0x0FF00036, + Unknown55 = 0x0FF00037, + Unknown56 = 0x0FF00038, + Unknown57 = 0x0FF00039, + Unknown58 = 0x0FF0003A, + Unknown59 = 0x0FF0003B, + Unknown60 = 0x0FF0003C, + Unknown61 = 0x0FF0003D, + Unknown62 = 0x0FF0003E, + Unknown63 = 0x0FF0003F, + Unknown64 = 0x0FF00040, + Unknown65 = 0x0FF00041, + Unknown66 = 0x0FF00042, + Unknown67 = 0x0FF00043, + Unknown68 = 0x0FF00044, + Unknown69 = 0x0FF00045, + Unknown70 = 0x0FF00046, + Unknown71 = 0x0FF00047, + Unknown72 = 0x0FF00048, + Unknown73 = 0x0FF00049, + Unknown74 = 0x0FF0004A, + Unknown75 = 0x0FF0004B, + Unknown76 = 0x0FF0004C, + Unknown77 = 0x0FF0004D, + Unknown78 = 0x0FF0004E, + Unknown79 = 0x0FF0004F, + Unknown80 = 0x0FF00050, + Unknown81 = 0x0FF00051, + Unknown82 = 0x0FF00052, + Unknown83 = 0x0FF00053, + Unknown84 = 0x0FF00054, + Unknown85 = 0x0FF00055, + Unknown86 = 0x0FF00056, + Unknown87 = 0x0FF00057, + Unknown88 = 0x0FF00058, + Unknown89 = 0x0FF00059, + Unknown90 = 0x0FF0005A, + Unknown91 = 0x0FF0005B, + Unknown92 = 0x0FF0005C, + Unknown93 = 0x0FF0005D, + Unknown94 = 0x0FF0005E, + Unknown95 = 0x0FF0005F, + Unknown96 = 0x0FF00060, + Unknown97 = 0x0FF00061, + Unknown98 = 0x0FF00062, + Unknown99 = 0x0FF00063, + Unknown100 = 0x0FF00064, + Unknown101 = 0x0FF00065, + Unknown102 = 0x0FF00066, + Unknown103 = 0x0FF00067, + Unknown104 = 0x0FF00068, + Unknown105 = 0x0FF00069, + Unknown106 = 0x0FF0006A, + Unknown107 = 0x0FF0006B, + Unknown108 = 0x0FF0006C, + Unknown109 = 0x0FF0006D, + Unknown110 = 0x0FF0006E, + Unknown111 = 0x0FF0006F, + Unknown112 = 0x0FF00070, + Unknown113 = 0x0FF00071, + Unknown114 = 0x0FF00072, + Unknown115 = 0x0FF00073, + Unknown116 = 0x0FF00074, + Unknown117 = 0x0FF00075, + Unknown118 = 0x0FF00076, + Unknown119 = 0x0FF00077, + Unknown120 = 0x0FF00078, + Unknown121 = 0x0FF00079, + Unknown122 = 0x0FF0007A, + Unknown123 = 0x0FF0007B, + Unknown124 = 0x0FF0007C, + Unknown125 = 0x0FF0007D, + Unknown126 = 0x0FF0007E, + Unknown127 = 0x0FF0007F, + Unknown128 = 0x0FF00080, } } diff --git a/RGB.NET.Devices.Asus/Enum/AsusLedId.cs b/RGB.NET.Devices.Asus/Enum/AsusLedId.cs index a5ee8e1..27be15f 100644 --- a/RGB.NET.Devices.Asus/Enum/AsusLedId.cs +++ b/RGB.NET.Devices.Asus/Enum/AsusLedId.cs @@ -158,6 +158,10 @@ namespace RGB.NET.Devices.Asus UNDOCUMENTED_5 = 0x103, UNDOCUMENTED_6 = 0x1EB, // ISO tilde UNDOCUMENTED_7 = 0x1EC, // ISO backslash - UNDOCUMENTED_8 = 0x14E, + + // UNDOCUMENTED_8 = 0x14E, + // UNDOCUMENTED_9 = 0x424, + // UNDOCUMENTED_10 = 0x1A8, + // UNDOCUMENTED_11 = 0x415, } } diff --git a/RGB.NET.Devices.Asus/Keyboard/AsusKeyboardLedMapping.cs b/RGB.NET.Devices.Asus/Keyboard/AsusKeyboardLedMapping.cs index 3bb0de9..ebe8a49 100644 --- a/RGB.NET.Devices.Asus/Keyboard/AsusKeyboardLedMapping.cs +++ b/RGB.NET.Devices.Asus/Keyboard/AsusKeyboardLedMapping.cs @@ -158,7 +158,11 @@ namespace RGB.NET.Devices.Asus { AsusLedId.UNDOCUMENTED_5, LedId.Keyboard_Custom2 }, { AsusLedId.UNDOCUMENTED_6, LedId.Keyboard_NonUsTilde }, { AsusLedId.UNDOCUMENTED_7, LedId.Keyboard_NonUsBackslash }, - { AsusLedId.UNDOCUMENTED_8, LedId.Keyboard_Custom37 }, + + // { AsusLedId.UNDOCUMENTED_8, LedId.Keyboard_Custom37 }, + // { AsusLedId.UNDOCUMENTED_9, LedId.Keyboard_Custom38 }, + // { AsusLedId.UNDOCUMENTED_10, LedId.Keyboard_Custom39 }, + // { AsusLedId.UNDOCUMENTED_11, LedId.Keyboard_Custom40 }, }; } } diff --git a/RGB.NET.Devices.Asus/Keyboard/AsusKeyboardRGBDevice.cs b/RGB.NET.Devices.Asus/Keyboard/AsusKeyboardRGBDevice.cs index 7b31d21..3071feb 100644 --- a/RGB.NET.Devices.Asus/Keyboard/AsusKeyboardRGBDevice.cs +++ b/RGB.NET.Devices.Asus/Keyboard/AsusKeyboardRGBDevice.cs @@ -40,13 +40,16 @@ namespace RGB.NET.Devices.Asus if (DeviceInfo.Device.Type != (uint)AsusDeviceType.NB_KB_4ZONE_RGB) { int pos = 0; + int unknownLed = (int) LedId.Unknown1; foreach (IAuraRgbKey key in ((IAuraSyncKeyboard)DeviceInfo.Device).Keys) { if (AsusKeyboardLedMapping.MAPPING.TryGetValue((AsusLedId)key.Code, out LedId ledId)) AddAsusLed((AsusLedId)key.Code, ledId, new Point(pos++ * 19, 0), new Size(19, 19)); else - throw new RGBDeviceException($"Couldn't find a LED mapping for key {key.Code:X} named '{key.Name}' on device '{DeviceInfo.DeviceName}'"); - + { + AddAsusLed((AsusLedId)key.Code, (LedId)unknownLed, new Point(pos++ * 19, 0), new Size(19, 19)); + unknownLed++; + } } // UK Layout