Skip to content
Merged

3.1 #430

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
66843a2
Add workaround for LX Fans with invalid ChannelDeviceType
jonilala796 Feb 8, 2025
1deb1b9
Add support for RX Fan naming
jonilala796 Feb 8, 2025
01bad00
simplify LX Fan logic in CorsairDeviceProvider
jonilala796 Feb 8, 2025
7fabc71
Merge pull request #419 from jonilala796/master
DarthAffe Feb 16, 2025
9499b31
Fix more 80HE layout
diogotr7 Feb 20, 2025
e147585
Merge pull request #420 from DarthAffe/feature/more-80he-fixes
DarthAffe Feb 21, 2025
b0f05ab
Added support for Kraken V3 HyperSense headset
jonilala796 Mar 8, 2025
eb4ea71
Merge pull request #421 from jonilala796/Razer-Kraken-V3-HyperSense
DarthAffe Mar 10, 2025
6a47887
Added support for SteelSeries QCK Prism Cloth 3XL
jonilala796 Mar 11, 2025
d5ce5fc
Merge pull request #422 from jonilala796/SteelSeries-QCK-Prism-Cloth-3XL
DarthAffe Mar 11, 2025
8756ec9
Added Razer BlackWidow V4 Pro 75% (#423)
DarthAffe Apr 27, 2025
80b2365
Adding Razer Huntsman V3 Pro
kyriog May 12, 2025
826a510
Merge pull request #424 from kyriog/patch-1
DarthAffe May 22, 2025
7c65b1d
Added PID for Razer Barracuda X Chroma
DarthAffe May 28, 2025
c0828c1
Merge pull request #426 from DarthAffe/Devices/Razer
DarthAffe May 28, 2025
f26b3c1
Added gRPC sdk client
diogotr7 Jun 18, 2025
a96b994
Fix warning
diogotr7 Jun 18, 2025
34b0452
make wootingcolor readonly, use int for array index
diogotr7 Jun 18, 2025
dc6715b
use serial number hash as update trigger id
diogotr7 Jun 18, 2025
35a4033
connect on ipv4 only
diogotr7 Jun 18, 2025
02d695c
Merge pull request #427 from diogotr7/feature/wooting-grpc
diogotr7 Jun 18, 2025
845efb6
Added detection for logitech G515
DarthAffe Jul 17, 2025
13f3dde
Merge pull request #429 from DarthAffe/logitechpid
DarthAffe Jul 17, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 18 additions & 8 deletions RGB.NET.Devices.Corsair/CorsairDeviceProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,12 @@ private IEnumerable<ICorsairRGBDevice> LoadCorsairDevices()
break;

case CorsairChannelDeviceType.EightLedSeriesFan:
yield return new CorsairFanRGBDevice(new CorsairFanRGBDeviceInfo(device, ledCount, offset, "8-Led-Series Fan Fan"), updateQueue);
string fanModelName = "8-Led-Series Fan";

if (device.model == "iCUE LINK System Hub")
fanModelName = "RX Fan";

yield return new CorsairFanRGBDevice(new CorsairFanRGBDeviceInfo(device, ledCount, offset, fanModelName), updateQueue);
break;

case CorsairChannelDeviceType.DAP:
Expand All @@ -289,28 +294,33 @@ private IEnumerable<ICorsairRGBDevice> LoadCorsairDevices()
break;

case CorsairChannelDeviceType.Strip:
string modelName = "LED Strip";
string stripModelName = "LED Strip";

// LS100 Led Strips are reported as one big strip if configured in monitor mode in iCUE, 138 LEDs for dual monitor, 84 for single
if ((device.model == "LS100 Starter Kit") && (ledCount == 138))
modelName = "LS100 LED Strip (dual monitor)";
stripModelName = "LS100 LED Strip (dual monitor)";
else if ((device.model == "LS100 Starter Kit") && (ledCount == 84))
modelName = "LS100 LED Strip (single monitor)";
stripModelName = "LS100 LED Strip (single monitor)";
// Any other value means an "External LED Strip" in iCUE, these are reported per-strip, 15 for short strips, 27 for long
else if ((device.model == "LS100 Starter Kit") && (ledCount == 15))
modelName = "LS100 LED Strip (short)";
stripModelName = "LS100 LED Strip (short)";
else if ((device.model == "LS100 Starter Kit") && (ledCount == 27))
modelName = "LS100 LED Strip (long)";
stripModelName = "LS100 LED Strip (long)";

yield return new CorsairLedStripRGBDevice(new CorsairLedStripRGBDeviceInfo(device, ledCount, offset, modelName), updateQueue);
yield return new CorsairLedStripRGBDevice(new CorsairLedStripRGBDeviceInfo(device, ledCount, offset, stripModelName), updateQueue);
break;

case CorsairChannelDeviceType.DRAM:
yield return new CorsairMemoryRGBDevice(new CorsairMemoryRGBDeviceInfo(device, ledCount, offset, "DRAM"), updateQueue);
break;

default:
Throw(new RGBDeviceException("Unknown Device-Type"));

//Workaround to support LX Fans because they have an invalid ChannelDeviceType
if ((device.model == "iCUE LINK System Hub") && (ledCount == 18))
yield return new CorsairFanRGBDevice(new CorsairFanRGBDeviceInfo(device, ledCount, offset, "LX Fan"), updateQueue);
else
Throw(new RGBDeviceException("Unknown Device-Type"));
break;
}

Expand Down
1 change: 1 addition & 0 deletions RGB.NET.Devices.Logitech/LogitechDeviceProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ public static LogitechDeviceProvider Instance
{ 0xC541, RGBDeviceType.Keyboard, "G915", LedMappings.PerKey, 0 },
{ 0xC359, RGBDeviceType.Keyboard, "G915 X", LedMappings.PerKey, 0 },
{ 0xC547, RGBDeviceType.Keyboard, "G915 X TKL", LedMappings.PerKey, 0 },
{ 0xC358, RGBDeviceType.Keyboard, "G515", LedMappings.PerKey, 0 },

//non-rgb
{ 0xC333, RGBDeviceType.Keyboard, "G610", LedMappings.PerKey, 0 },
Expand Down
4 changes: 4 additions & 0 deletions RGB.NET.Devices.Razer/RazerDeviceProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,11 @@ public static RazerDeviceProvider Instance
{ 0x02A0, RGBDeviceType.Keyboard, "Blade 18", LedMappings.Blade, RazerEndpointType.Keyboard },
{ 0x02A1, RGBDeviceType.Keyboard, "Ornata V3", LedMappings.Keyboard, RazerEndpointType.Keyboard },
{ 0x02A5, RGBDeviceType.Keyboard, "BlackWidow V4 75%", LedMappings.Keyboard, RazerEndpointType.Keyboard },
{ 0x02A6, RGBDeviceType.Keyboard, "Huntsman V3 Pro", LedMappings.Keyboard, RazerEndpointType.Keyboard },
{ 0x02A7, RGBDeviceType.Keyboard, "Huntsman V3 Pro TKL", LedMappings.Keyboard, RazerEndpointType.Keyboard },
{ 0x0A24, RGBDeviceType.Keyboard, "BlackWidow V3 TKL", LedMappings.Keyboard, RazerEndpointType.Keyboard },
{ 0x02BA, RGBDeviceType.Keyboard, "BlackWidow V4 Mini HyperSpeed", LedMappings.Keyboard, RazerEndpointType.Keyboard },
{ 0x02B4, RGBDeviceType.Keyboard, "BlackWidow V4 Pro 75%", LedMappings.Keyboard, RazerEndpointType.Keyboard },

// Mice
{ 0x0013, RGBDeviceType.Mouse, "Orochi 2011", LedMappings.Mouse, RazerEndpointType.Mouse },
Expand Down Expand Up @@ -255,6 +257,8 @@ public static RazerDeviceProvider Instance
{ 0x0527, RGBDeviceType.Headset, "Kraken Ultimate", LedMappings.Headset, RazerEndpointType.Headset },
{ 0x0560, RGBDeviceType.Headset, "Kraken Kitty V2", LedMappings.Headset, RazerEndpointType.Headset },
{ 0x0F19, RGBDeviceType.Headset, "Kraken Kitty Edition", LedMappings.Headset, RazerEndpointType.Headset },
{ 0X0533, RGBDeviceType.Headset, "Kraken V3 HyperSense", LedMappings.Headset, RazerEndpointType.Headset},
{ 0X0574, RGBDeviceType.Headset, "Barracuda X Chroma", LedMappings.Headset, RazerEndpointType.Headset},

// Keypads
{ 0x0111, RGBDeviceType.Keypad, "Nostromo", LedMappings.Keypad, RazerEndpointType.Keypad },
Expand Down
1 change: 1 addition & 0 deletions RGB.NET.Devices.SteelSeries/SteelSeriesDeviceProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ public static SteelSeriesDeviceProvider Instance
//Mousepads
{ 0x1507, RGBDeviceType.Mousepad, "QCK Prism", LedMappings.MousepadTwelveZone, SteelSeriesDeviceType.TwelveZone },
{ 0x150D, RGBDeviceType.Mousepad, "QCK Prism Cloth", LedMappings.MousepadTwoZone, SteelSeriesDeviceType.TwoZone },
{ 0x1516, RGBDeviceType.Mousepad, "QCK Prism Cloth 3XL", LedMappings.MousepadTwoZone, SteelSeriesDeviceType.TwoZone },

//Monitors
{ 0x1126, RGBDeviceType.Monitor, "MGP27C", LedMappings.MonitorOnehundredandthreeZone, SteelSeriesDeviceType.OneHundredAndThreeZone },
Expand Down
7 changes: 5 additions & 2 deletions RGB.NET.Devices.Wooting/Enum/WootingLayoutType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,8 @@ public enum WootingLayoutType
{
Unknown = -1,
ANSI = 0,
ISO = 1
}
ISO = 1,
JIS = 2,
ANSI_SPLIT_SPACEBAR = 3,
ISO_SPLIT_SPACEBAR = 4,
}
10 changes: 9 additions & 1 deletion RGB.NET.Devices.Wooting/Generic/WootingLedMappings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ namespace RGB.NET.Devices.Wooting.Generic;
/// </summary>
internal static class WootingLedMappings
{

public const int ROWS = 6;
public const int COLUMNS = 21;

#region Properties & Fields

private static readonly Dictionary<LedId, (int row, int column)> TKL = new()
Expand Down Expand Up @@ -126,7 +130,7 @@ internal static class WootingLedMappings
{ LedId.Keyboard_F10, (0, 11) },
{ LedId.Keyboard_F11, (0, 12) },
{ LedId.Keyboard_F12, (0, 13) },
{ LedId.Keyboard_Custom1, (0, 14) },
{ LedId.Keyboard_Profile, (0, 14) },
{ LedId.Keyboard_PrintScreen, (0, 15) },
{ LedId.Keyboard_PauseBreak, (0, 16) },

Expand Down Expand Up @@ -200,7 +204,11 @@ internal static class WootingLedMappings
{ LedId.Keyboard_LeftGui, (5, 1) },
{ LedId.Keyboard_LeftAlt, (5, 2) },
{ LedId.Keyboard_International3, (5, 3) },//JIS key
{ LedId.Keyboard_Custom1, (5, 4) },
{ LedId.Keyboard_Custom2, (5, 5) },
{ LedId.Keyboard_Space, (5, 6) },
{ LedId.Keyboard_Custom3, (5, 7) },
{ LedId.Keyboard_Custom4, (5, 8) },
{ LedId.Keyboard_International4, (5, 9) },//JIS key
{ LedId.Keyboard_RightAlt, (5, 10) },
{ LedId.Keyboard_RightGui, (5, 11) },
Expand Down
43 changes: 25 additions & 18 deletions RGB.NET.Devices.Wooting/Generic/WootingRGBDevice.cs
Original file line number Diff line number Diff line change
@@ -1,40 +1,47 @@
using RGB.NET.Core;
using RGB.NET.Devices.Wooting.Native;
using System.Collections.Generic;
using RGB.NET.Core;
using RGB.NET.Devices.Wooting.Enum;

namespace RGB.NET.Devices.Wooting.Generic;

/// <inheritdoc cref="AbstractRGBDevice{TDeviceInfo}" />
/// <inheritdoc cref="IWootingRGBDevice" />
/// <summary>
/// Represents a Wooting-device
/// </summary>
public abstract class WootingRGBDevice<TDeviceInfo> : AbstractRGBDevice<TDeviceInfo>, IWootingRGBDevice
where TDeviceInfo : WootingRGBDeviceInfo
{
#region Properties & Fields

private readonly Dictionary<LedId, (int row, int column)> _mapping;

#endregion

#region Constructors

/// <summary>
/// Initializes a new instance of the <see cref="WootingRGBDevice{TDeviceInfo}"/> class.
/// </summary>
/// <param name="info">The generic information provided by Wooting for the device.</param>
/// <param name="updateQueue">The update queue used to update this device.</param>
protected WootingRGBDevice(TDeviceInfo info, IUpdateQueue updateQueue)
internal WootingRGBDevice(WootingDeviceType deviceType, TDeviceInfo info, IUpdateQueue updateQueue)
: base(info, updateQueue)
{
_mapping = WootingLedMappings.Mapping[deviceType];
InitializeLayout();
}

#endregion


#region Methods

private void InitializeLayout()
{
foreach (KeyValuePair<LedId, (int row, int column)> led in _mapping)
AddLed(led.Key, new Point(led.Value.column * 19, led.Value.row * 19), new Size(19, 19));
}

/// <inheritdoc />
protected override object GetLedCustomData(LedId ledId) => _mapping[ledId];

/// <inheritdoc />
public override void Dispose()
{
_WootingSDK.SelectDevice(DeviceInfo.WootingDeviceIndex);
_WootingSDK.Reset();
UpdateQueue.Dispose();

base.Dispose();
}

#endregion
}
}
37 changes: 5 additions & 32 deletions RGB.NET.Devices.Wooting/Generic/WootingRGBDeviceInfo.cs
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
using RGB.NET.Core;
using RGB.NET.Devices.Wooting.Enum;
using RGB.NET.Devices.Wooting.Native;

namespace RGB.NET.Devices.Wooting.Generic;

/// <inheritdoc />
/// <summary>
/// Represents a generic information for a Wooting-<see cref="T:RGB.NET.Core.IRGBDevice" />.
/// </summary>
public class WootingRGBDeviceInfo : IRGBDeviceInfo
public abstract class WootingRGBDeviceInfo : IRGBDeviceInfo
{
#region Properties & Fields

Expand All @@ -27,37 +21,16 @@ public class WootingRGBDeviceInfo : IRGBDeviceInfo
/// <inheritdoc />
public object? LayoutMetadata { get; set; }

/// <summary>
/// Gets the <see cref="Enum.WootingDeviceType"/> of the <see cref="WootingRGBDevice{TDeviceInfo}"/>.
/// </summary>
public WootingDeviceType WootingDeviceType { get; }

/// <summary>
/// Gets the <see cref="Enum.WootingLayoutType"/> of the <see cref="WootingRGBDevice{TDeviceInfo}"/>.
/// </summary>
public WootingLayoutType WootingLayoutType { get; }

public byte WootingDeviceIndex { get; }

#endregion

#region Constructors

/// <summary>
/// Internal constructor of managed <see cref="WootingRGBDeviceInfo"/>.
/// </summary>
/// <param name="deviceType">The type of the <see cref="IRGBDevice"/>.</param>
/// <param name="deviceInfo">The <see cref="_WootingDeviceInfo"/> of the <see cref="IRGBDevice"/>.</param>
internal WootingRGBDeviceInfo(RGBDeviceType deviceType, _WootingDeviceInfo deviceInfo, byte deviceIndex)
protected WootingRGBDeviceInfo(RGBDeviceType deviceType, string model, string name)
{
this.DeviceType = deviceType;
this.WootingDeviceType = deviceInfo.DeviceType;
this.WootingLayoutType = deviceInfo.LayoutType;
this.WootingDeviceIndex = deviceIndex;

Model = deviceInfo.Model;
DeviceName = DeviceHelper.CreateDeviceName(Manufacturer, Model);
this.Model = model;
this.DeviceName = name;
}

#endregion
}
}
Loading
Loading