mirror of
https://github.com/DarthAffe/RGB.NET.git
synced 2026-11-11 04:57:15 +00:00
Wooting - Added Multi device support
This commit is contained in:
1 parent
f17c18e5ec
commit
819e6ef1df
5 files changed
+50
-37
No files matched your search
@@ -16,9 +16,9 @@ public abstract class WootingRGBDevice<TDeviceInfo> : AbstractRGBDevice<TDeviceI
|
||||
/// 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="updateTrigger">The update trigger used to update this device.</param>
|
||||
protected WootingRGBDevice(TDeviceInfo info, IDeviceUpdateTrigger updateTrigger)
|
||||
: base(info, new WootingUpdateQueue(updateTrigger))
|
||||
/// <param name="updateQueue">The update queue used to update this device.</param>
|
||||
protected WootingRGBDevice(TDeviceInfo info, IUpdateQueue updateQueue)
|
||||
: base(info, updateQueue)
|
||||
{ }
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -10,15 +10,20 @@ namespace RGB.NET.Devices.Wooting.Generic;
|
||||
/// </summary>
|
||||
public class WootingUpdateQueue : UpdateQueue
|
||||
{
|
||||
#region Properties & Fields
|
||||
private readonly byte _deviceid;
|
||||
#endregion
|
||||
|
||||
#region Constructors
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="WootingUpdateQueue"/> class.
|
||||
/// </summary>
|
||||
/// <param name="updateTrigger">The update trigger used by this queue.</param>
|
||||
public WootingUpdateQueue(IDeviceUpdateTrigger updateTrigger)
|
||||
public WootingUpdateQueue(IDeviceUpdateTrigger updateTrigger, byte deviceId)
|
||||
: base(updateTrigger)
|
||||
{
|
||||
_deviceid = deviceId;
|
||||
}
|
||||
|
||||
#endregion
|
||||
@@ -30,6 +35,8 @@ public class WootingUpdateQueue : UpdateQueue
|
||||
{
|
||||
lock (_WootingSDK.SdkLock)
|
||||
{
|
||||
_WootingSDK.SelectDevice(_deviceid);
|
||||
|
||||
foreach ((object key, Color color) in dataSet)
|
||||
{
|
||||
(int row, int column) = ((int, int))key;
|
||||
|
||||
Reference in new issue
Block a user