mirror of
https://github.com/DarthAffe/RGB.NET.git
synced 2026-11-10 20:46:24 +00:00
Updated device providers to make everything compile again
This commit is contained in:
1 parent
6619539176
commit
57dc9afb32
67 files changed
+190
-661
No files matched your search
@@ -24,11 +24,8 @@ namespace RGB.NET.Devices.Novation
|
||||
public string Model { get; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public Uri Image { get; set; }
|
||||
public object? LayoutMetadata { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public RGBDeviceLighting Lighting => RGBDeviceLighting.Key;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the <see cref="NovationColorCapabilities"/> of the <see cref="IRGBDevice"/>.
|
||||
/// </summary>
|
||||
|
||||
@@ -34,15 +34,12 @@ namespace RGB.NET.Devices.Novation
|
||||
foreach (LedId ledId in mapping.Keys)
|
||||
{
|
||||
(_, _, int x, int y) = mapping[ledId];
|
||||
InitializeLed(ledId, new Point(BUTTON_SIZE * x, BUTTON_SIZE * y), new Size(BUTTON_SIZE));
|
||||
AddLed(ledId, new Point(BUTTON_SIZE * x, BUTTON_SIZE * y), new Size(BUTTON_SIZE));
|
||||
}
|
||||
|
||||
string model = DeviceInfo.Model.Replace(" ", string.Empty).ToUpper();
|
||||
ApplyLayoutFromFile(PathHelper.GetAbsolutePath(this, @"Layouts\Novation\Launchpads", $"{model.ToUpper()}.xml"), "Default");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override object CreateLedCustomData(LedId ledId) => GetDeviceMapping().TryGetValue(ledId, out (byte mode, byte id, int _, int __) data) ? (data.mode, data.id) : ((byte)0x00, (byte)0x00);
|
||||
protected override object GetLedCustomData(LedId ledId) => GetDeviceMapping().TryGetValue(ledId, out (byte mode, byte id, int _, int __) data) ? (data.mode, data.id) : ((byte)0x00, (byte)0x00);
|
||||
|
||||
protected virtual Dictionary<LedId, (byte mode, byte id, int x, int y)> GetDeviceMapping()
|
||||
=> DeviceInfo.LedIdMapping switch
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
using RGB.NET.Core;
|
||||
|
||||
namespace RGB.NET.Devices.Novation
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a device provider loaded used to dynamically load novation devices into an application.
|
||||
/// </summary>
|
||||
public class NovationDeviceProviderLoader : IRGBDeviceProviderLoader
|
||||
{
|
||||
#region Properties & Fields
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool RequiresInitialization => false;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Methods
|
||||
|
||||
/// <inheritdoc />
|
||||
public IRGBDeviceProvider GetDeviceProvider() => NovationDeviceProvider.Instance;
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user