Refactored LedIds

Everything is now based on the same ids for all devices
This commit is contained in:
DarthAffe committed 2017-12-13 17:19:56 +01:00
1 parent 200e471e4d
commit c5a1825f50
80 files changed
+2923 -3657

No files matched your search

@@ -10,7 +10,7 @@ namespace RGB.NET.Devices.Novation
/// They are represented as Hex 0x[00][11] where [00] is the status flag, [1] the id of the led.
/// </summary>
//TODO DarthAffe 15.08.2017: Check if this is really correct for all devices
public enum NovationLedIds
public enum NovationLedId
{
Invalid = -1,
@@ -1,108 +0,0 @@
using System.Diagnostics;
using RGB.NET.Core;
namespace RGB.NET.Devices.Novation
{
/// <inheritdoc />
/// <summary>
/// Represents a Id of a <see cref="T:RGB.NET.Core.Led" /> on a <see cref="T:RGB.NET.Devices.Novation.NovationRGBDevice" />.
/// </summary>
[DebuggerDisplay("{" + nameof(LedId) + "}")]
public class NovationLedId : ILedId
{
#region Properties & Fields
internal readonly NovationLedIds LedId;
/// <inheritdoc />
public IRGBDevice Device { get; }
/// <inheritdoc />
public bool IsValid => LedId != NovationLedIds.Invalid;
#endregion
#region Constructors
/// <summary>
/// Initializes a new instance of the <see cref="NovationLedId"/> class.
/// </summary>
/// <param name="device">The <see cref="IRGBDevice"/> the <see cref="ILedId"/> belongs to.</param>
/// <param name="ledId">The <see cref="NovationLedId"/> of the represented <see cref="Led"/>.</param>
public NovationLedId(IRGBDevice device, NovationLedIds ledId)
{
this.Device = device;
this.LedId = ledId;
}
#endregion
#region Methods
/// <summary>
/// Converts the Id of this <see cref="NovationLedId"/> to a human-readable string.
/// </summary>
/// <returns>A string that contains the Id of this <see cref="NovationLedId"/>. For example "Enter".</returns>
public override string ToString()
{
return LedId.ToString();
}
/// <summary>
/// Tests whether the specified object is a <see cref="NovationLedId" /> and is equivalent to this <see cref="NovationLedId" />.
/// </summary>
/// <param name="obj">The object to test.</param>
/// <returns><c>true</c> if <paramref name="obj" /> is a <see cref="NovationLedId" /> equivalent to this <see cref="NovationLedId" />; otherwise, <c>false</c>.</returns>
public override bool Equals(object obj)
{
NovationLedId compareLedId = obj as NovationLedId;
if (ReferenceEquals(compareLedId, null))
return false;
if (ReferenceEquals(this, compareLedId))
return true;
if (GetType() != compareLedId.GetType())
return false;
return compareLedId.LedId == LedId;
}
/// <summary>
/// Returns a hash code for this <see cref="NovationLedId" />.
/// </summary>
/// <returns>An integer value that specifies the hash code for this <see cref="NovationLedId" />.</returns>
public override int GetHashCode()
{
return LedId.GetHashCode();
}
#endregion
#region Operators
/// <summary>
/// Returns a value that indicates whether two specified <see cref="NovationLedId" /> are equal.
/// </summary>
/// <param name="ledId1">The first <see cref="NovationLedId" /> to compare.</param>
/// <param name="ledId2">The second <see cref="NovationLedId" /> to compare.</param>
/// <returns><c>true</c> if <paramref name="ledId1" /> and <paramref name="ledId2" /> are equal; otherwise, <c>false</c>.</returns>
public static bool operator ==(NovationLedId ledId1, NovationLedId ledId2)
{
return ReferenceEquals(ledId1, null) ? ReferenceEquals(ledId2, null) : ledId1.Equals(ledId2);
}
/// <summary>
/// Returns a value that indicates whether two specified <see cref="NovationLedId" /> are equal.
/// </summary>
/// <param name="ledId1">The first <see cref="NovationLedId" /> to compare.</param>
/// <param name="ledId2">The second <see cref="NovationLedId" /> to compare.</param>
/// <returns><c>true</c> if <paramref name="ledId1" /> and <paramref name="ledId2" /> are not equal; otherwise, <c>false</c>.</returns>
public static bool operator !=(NovationLedId ledId1, NovationLedId ledId2)
{
return !(ledId1 == ledId2);
}
#endregion
}
}
@@ -1,9 +1,7 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using RGB.NET.Core;
using RGB.NET.Core.Layout;
using Sanford.Multimedia.Midi;
namespace RGB.NET.Devices.Novation
@@ -66,44 +64,6 @@ namespace RGB.NET.Devices.Novation
/// </summary>
protected abstract void InitializeLayout();
/// <summary>
/// Applies the given layout.
/// </summary>
/// <param name="layoutPath">The file containing the layout.</param>
/// <param name="imageLayout">The name of the layout used to get the images of the leds.</param>
/// <param name="imageBasePath">The path images for this device are collected in.</param>
protected void ApplyLayoutFromFile(string layoutPath, string imageLayout, string imageBasePath)
{
DeviceLayout layout = DeviceLayout.Load(layoutPath);
if (layout != null)
{
LedImageLayout ledImageLayout = layout.LedImageLayouts.FirstOrDefault(x => string.Equals(x.Layout, imageLayout, StringComparison.OrdinalIgnoreCase));
Size = new Size(layout.Width, layout.Height);
if (layout.Leds != null)
foreach (LedLayout layoutLed in layout.Leds)
{
if (Enum.TryParse(layoutLed.Id, true, out NovationLedIds ledId))
{
if (LedMapping.TryGetValue(new NovationLedId(this, ledId), out Led led))
{
led.LedRectangle.Location = new Point(layoutLed.X, layoutLed.Y);
led.LedRectangle.Size = new Size(layoutLed.Width, layoutLed.Height);
led.Shape = layoutLed.Shape;
led.ShapeData = layoutLed.ShapeData;
LedImage image = ledImageLayout?.LedImages.FirstOrDefault(x => x.Id == layoutLed.Id);
led.Image = (!string.IsNullOrEmpty(image?.Image))
? new Uri(Path.Combine(imageBasePath, image.Image), UriKind.Absolute)
: new Uri(Path.Combine(imageBasePath, "Missing.png"), UriKind.Absolute);
}
}
}
}
}
/// <inheritdoc />
protected override void UpdateLeds(IEnumerable<Led> ledsToUpdate)
{
@@ -113,11 +73,10 @@ namespace RGB.NET.Devices.Novation
{
foreach (Led led in leds)
{
NovationLedId ledId = led.Id as NovationLedId;
if (ledId == null) continue;
NovationLedId ledId = (NovationLedId)led.CustomData;
int color = ConvertColor(led.Color);
SendMessage(ledId.LedId.GetStatus(), ledId.LedId.GetId(), color);
SendMessage(ledId.GetStatus(), ledId.GetId(), color);
}
}
}
@@ -0,0 +1,10 @@
using System.Collections.Generic;
using System.Linq;
namespace RGB.NET.Devices.Novation
{
internal static class DictionaryExtension
{
public static Dictionary<TValue, TKey> SwapKeyValue<TKey, TValue>(this Dictionary<TKey, TValue> dictionary) => dictionary.ToDictionary(x => x.Value, x => x.Key);
}
}
@@ -0,0 +1,47 @@
namespace RGB.NET.Devices.Novation
{
/// <summary>
/// Offers some extensions and helper-methods for NovationLedId related things.
/// </summary>
public static class NovationLedIdExtension
{
#region Methods
/// <summary>
/// Gets the status-flag associated with the id.
/// </summary>
/// <param name="ledId">The <see cref="NovationLedId"/> whose status-flag should be determinated.</param>
/// <returns>The status-flag of the <see cref="NovationLedId"/>.</returns>
public static int GetStatus(this NovationLedId ledId) => ((int)ledId & 0xFF00) >> 8;
/// <summary>
/// Gets the id associated with the id.
/// </summary>
/// <param name="ledId">The <see cref="NovationLedId"/> whose idshould be determinated.</param>
/// <returns>The id of the <see cref="NovationLedId"/>.</returns>
public static int GetId(this NovationLedId ledId) => (int)ledId & 0x00FF;
/// <summary>
/// Tests if the given <see cref="NovationLedId"/> is a grid-button.
/// </summary>
/// <param name="ledId">the <see cref="NovationLedId"/> to test.</param>
/// <returns><c>true</c> if <paramref name="ledId" /> is a grid-button; otherwise, <c>false</c>.</returns>
public static bool IsGrid(this NovationLedId ledId) => (ledId.GetStatus() == 0x90) && ((ledId.GetId() / 0x10) < 0x08) && ((ledId.GetId() % 0x10) < 0x08);
/// <summary>
/// Tests if the given <see cref="NovationLedId"/> is a scene-button.
/// </summary>
/// <param name="ledId">the <see cref="NovationLedId"/> to test.</param>
/// <returns><c>true</c> if <paramref name="ledId" /> is a scene-button; otherwise, <c>false</c>.</returns>
public static bool IsScene(this NovationLedId ledId) => (ledId.GetStatus() == 0x90) && ((ledId.GetId() / 0x10) < 0x08) && ((ledId.GetId() % 0x10) == 0x09);
/// <summary>
/// Tests if the given <see cref="NovationLedId"/> is custom-button.
/// </summary>
/// <param name="ledId">the <see cref="NovationLedId"/> to test.</param>
/// <returns><c>true</c> if <paramref name="ledId" /> is a custom-button; otherwise, <c>false</c>.</returns>
public static bool IsCustom(this NovationLedId ledId) => (ledId.GetStatus() == 0xB0) && ((ledId.GetId() / 0x10) == 0x06) && ((ledId.GetId() % 0x10) > 0x07);
#endregion
}
}
@@ -1,47 +0,0 @@
namespace RGB.NET.Devices.Novation
{
/// <summary>
/// Offers some extensions and helper-methods for NovationLedIds related things.
/// </summary>
public static class NovationLedIdsExtension
{
#region Methods
/// <summary>
/// Gets the status-flag associated with the id.
/// </summary>
/// <param name="ledId">The <see cref="NovationLedIds"/> whose status-flag should be determinated.</param>
/// <returns>The status-flag of the <see cref="NovationLedIds"/>.</returns>
public static int GetStatus(this NovationLedIds ledId) => ((int)ledId & 0xFF00) >> 8;
/// <summary>
/// Gets the id associated with the id.
/// </summary>
/// <param name="ledId">The <see cref="NovationLedIds"/> whose idshould be determinated.</param>
/// <returns>The id of the <see cref="NovationLedIds"/>.</returns>
public static int GetId(this NovationLedIds ledId) => (int)ledId & 0x00FF;
/// <summary>
/// Tests if the given <see cref="NovationLedIds"/> is a grid-button.
/// </summary>
/// <param name="ledId">the <see cref="NovationLedIds"/> to test.</param>
/// <returns><c>true</c> if <paramref name="ledId" /> is a grid-button; otherwise, <c>false</c>.</returns>
public static bool IsGrid(this NovationLedIds ledId) => (ledId.GetStatus() == 0x90) && ((ledId.GetId() / 0x10) < 0x08) && ((ledId.GetId() % 0x10) < 0x08);
/// <summary>
/// Tests if the given <see cref="NovationLedIds"/> is a scene-button.
/// </summary>
/// <param name="ledId">the <see cref="NovationLedIds"/> to test.</param>
/// <returns><c>true</c> if <paramref name="ledId" /> is a scene-button; otherwise, <c>false</c>.</returns>
public static bool IsScene(this NovationLedIds ledId) => (ledId.GetStatus() == 0x90) && ((ledId.GetId() / 0x10) < 0x08) && ((ledId.GetId() % 0x10) == 0x09);
/// <summary>
/// Tests if the given <see cref="NovationLedIds"/> is custom-button.
/// </summary>
/// <param name="ledId">the <see cref="NovationLedIds"/> to test.</param>
/// <returns><c>true</c> if <paramref name="ledId" /> is a custom-button; otherwise, <c>false</c>.</returns>
public static bool IsCustom(this NovationLedIds ledId) => (ledId.GetStatus() == 0xB0) && ((ledId.GetId() / 0x10) == 0x06) && ((ledId.GetId() % 0x10) > 0x07);
#endregion
}
}
@@ -0,0 +1,96 @@
using System.Collections.Generic;
using RGB.NET.Core;
namespace RGB.NET.Devices.Novation
{
internal static class LaunchpadIdMapping
{
internal static readonly Dictionary<LedId, NovationLedId> DEFAULT = new Dictionary<LedId, NovationLedId>
{
{ LedId.Invalid, NovationLedId.Invalid },
{ LedId.LedMatrix1, NovationLedId.Grid1 },
{ LedId.LedMatrix2, NovationLedId.Grid2 },
{ LedId.LedMatrix3, NovationLedId.Grid3 },
{ LedId.LedMatrix4, NovationLedId.Grid4 },
{ LedId.LedMatrix5, NovationLedId.Grid5 },
{ LedId.LedMatrix6, NovationLedId.Grid6 },
{ LedId.LedMatrix7, NovationLedId.Grid7 },
{ LedId.LedMatrix8, NovationLedId.Grid8 },
{ LedId.LedMatrix9, NovationLedId.Grid9 },
{ LedId.LedMatrix10, NovationLedId.Grid10 },
{ LedId.LedMatrix11, NovationLedId.Grid11 },
{ LedId.LedMatrix12, NovationLedId.Grid12 },
{ LedId.LedMatrix13, NovationLedId.Grid13 },
{ LedId.LedMatrix14, NovationLedId.Grid14 },
{ LedId.LedMatrix15, NovationLedId.Grid15 },
{ LedId.LedMatrix16, NovationLedId.Grid16 },
{ LedId.LedMatrix17, NovationLedId.Grid17 },
{ LedId.LedMatrix18, NovationLedId.Grid18 },
{ LedId.LedMatrix19, NovationLedId.Grid19 },
{ LedId.LedMatrix20, NovationLedId.Grid20 },
{ LedId.LedMatrix21, NovationLedId.Grid21 },
{ LedId.LedMatrix22, NovationLedId.Grid22 },
{ LedId.LedMatrix23, NovationLedId.Grid23 },
{ LedId.LedMatrix24, NovationLedId.Grid24 },
{ LedId.LedMatrix25, NovationLedId.Grid25 },
{ LedId.LedMatrix26, NovationLedId.Grid26 },
{ LedId.LedMatrix27, NovationLedId.Grid27 },
{ LedId.LedMatrix28, NovationLedId.Grid28 },
{ LedId.LedMatrix29, NovationLedId.Grid29 },
{ LedId.LedMatrix30, NovationLedId.Grid30 },
{ LedId.LedMatrix31, NovationLedId.Grid31 },
{ LedId.LedMatrix32, NovationLedId.Grid32 },
{ LedId.LedMatrix33, NovationLedId.Grid33 },
{ LedId.LedMatrix34, NovationLedId.Grid34 },
{ LedId.LedMatrix35, NovationLedId.Grid35 },
{ LedId.LedMatrix36, NovationLedId.Grid36 },
{ LedId.LedMatrix37, NovationLedId.Grid37 },
{ LedId.LedMatrix38, NovationLedId.Grid38 },
{ LedId.LedMatrix39, NovationLedId.Grid39 },
{ LedId.LedMatrix40, NovationLedId.Grid40 },
{ LedId.LedMatrix41, NovationLedId.Grid41 },
{ LedId.LedMatrix42, NovationLedId.Grid42 },
{ LedId.LedMatrix43, NovationLedId.Grid43 },
{ LedId.LedMatrix44, NovationLedId.Grid44 },
{ LedId.LedMatrix45, NovationLedId.Grid45 },
{ LedId.LedMatrix46, NovationLedId.Grid46 },
{ LedId.LedMatrix47, NovationLedId.Grid47 },
{ LedId.LedMatrix48, NovationLedId.Grid48 },
{ LedId.LedMatrix49, NovationLedId.Grid49 },
{ LedId.LedMatrix50, NovationLedId.Grid50 },
{ LedId.LedMatrix51, NovationLedId.Grid51 },
{ LedId.LedMatrix52, NovationLedId.Grid52 },
{ LedId.LedMatrix53, NovationLedId.Grid53 },
{ LedId.LedMatrix54, NovationLedId.Grid54 },
{ LedId.LedMatrix55, NovationLedId.Grid55 },
{ LedId.LedMatrix56, NovationLedId.Grid56 },
{ LedId.LedMatrix57, NovationLedId.Grid57 },
{ LedId.LedMatrix58, NovationLedId.Grid58 },
{ LedId.LedMatrix59, NovationLedId.Grid59 },
{ LedId.LedMatrix60, NovationLedId.Grid60 },
{ LedId.LedMatrix61, NovationLedId.Grid61 },
{ LedId.LedMatrix62, NovationLedId.Grid62 },
{ LedId.LedMatrix63, NovationLedId.Grid63 },
{ LedId.LedMatrix64, NovationLedId.Grid64 },
{ LedId.Custom1, NovationLedId.Up },
{ LedId.Custom2, NovationLedId.Down },
{ LedId.Custom3, NovationLedId.Left },
{ LedId.Custom4, NovationLedId.Right },
{ LedId.Custom5, NovationLedId.Session },
{ LedId.Custom6, NovationLedId.User1 },
{ LedId.Custom7, NovationLedId.User2 },
{ LedId.Custom8, NovationLedId.Mix },
{ LedId.Custom9, NovationLedId.Scene1 },
{ LedId.Custom10, NovationLedId.Scene2 },
{ LedId.Custom11, NovationLedId.Scene3 },
{ LedId.Custom12, NovationLedId.Scene4 },
{ LedId.Custom13, NovationLedId.Scene5 },
{ LedId.Custom14, NovationLedId.Scene6 },
{ LedId.Custom15, NovationLedId.Scene7 },
{ LedId.Custom16, NovationLedId.Scene8 },
};
}
}
@@ -1,4 +1,5 @@
using System;
using System.Collections.Generic;
using RGB.NET.Core;
namespace RGB.NET.Devices.Novation
@@ -27,9 +28,11 @@ namespace RGB.NET.Devices.Novation
/// <inheritdoc />
protected override void InitializeLayout()
{
Dictionary<NovationLedId, LedId> mapping = LaunchpadIdMapping.DEFAULT.SwapKeyValue();
//TODO DarthAffe 15.08.2017: Check if all launchpads are using the same basic layout
const int BUTTON_SIZE = 20;
foreach (NovationLedIds ledId in Enum.GetValues(typeof(NovationLedIds)))
foreach (NovationLedId ledId in Enum.GetValues(typeof(NovationLedId)))
{
Rectangle rectangle;
if (ledId.IsCustom())
@@ -40,7 +43,7 @@ namespace RGB.NET.Devices.Novation
rectangle = new Rectangle(BUTTON_SIZE * ((int)ledId.GetId() % 0x10), BUTTON_SIZE * (((int)ledId.GetId() / 0x10) + 1), BUTTON_SIZE, BUTTON_SIZE);
else continue;
InitializeLed(new NovationLedId(this, ledId), rectangle);
InitializeLed(mapping[ledId], rectangle);
}
string model = DeviceInfo.Model.Replace(" ", string.Empty).ToUpper();
@@ -48,6 +51,9 @@ namespace RGB.NET.Devices.Novation
$@"Layouts\Novation\Launchpads\{model.ToUpper()}.xml"), "Default", PathHelper.GetAbsolutePath(@"Images\Novation\Launchpads"));
}
/// <inheritdoc />
protected override object CreateLedCustomData(LedId ledId) => LaunchpadIdMapping.DEFAULT[ledId];
#endregion
}
}
@@ -12,50 +12,50 @@
<LedUnitHeight>20</LedUnitHeight>
<Leds>
<!-- Custom-buttons -->
<Led Id="Up">
<Led Id="Custom1">
<Shape>Circle</Shape>
<X>16</X>
<Y>18</Y>
<Width>16mm</Width>
<Height>16mm</Height>
</Led>
<Led Id="Down">
<Led Id="Custom2">
<Shape>Circle</Shape>
<X>+8</X>
<Width>16mm</Width>
<Height>16mm</Height>
</Led>
<Led Id="Left">
<Led Id="Custom3">
<Shape>Circle</Shape>
<X>+8</X>
<Width>16mm</Width>
<Height>16mm</Height>
</Led>
<Led Id="Right">
<Led Id="Custom4">
<Shape>Circle</Shape>
<X>+8</X>
<Width>16mm</Width>
<Height>16mm</Height>
</Led>
<Led Id="Session">
<Led Id="Custom5">
<Shape>Circle</Shape>
<X>+8</X>
<Width>16mm</Width>
<Height>16mm</Height>
</Led>
<Led Id="User1">
<Led Id="Custom6">
<Shape>Circle</Shape>
<X>+8</X>
<Width>16mm</Width>
<Height>16mm</Height>
</Led>
<Led Id="User2">
<Led Id="Custom7">
<Shape>Circle</Shape>
<X>+8</X>
<Width>16mm</Width>
<Height>16mm</Height>
</Led>
<Led Id="Mix">
<Led Id="Custom8">
<Shape>Circle</Shape>
<X>+8</X>
<Width>16mm</Width>
@@ -63,269 +63,269 @@
</Led>
<!-- Grid -->
<Led Id="Grid1">
<Led Id="LedMatrix1">
<X>14</X>
<Y>+4</Y>
</Led>
<Led Id="Grid2">
<Led Id="LedMatrix2">
<X>+4</X>
</Led>
<Led Id="Grid3">
<Led Id="LedMatrix3">
<X>+4</X>
</Led>
<Led Id="Grid4">
<Led Id="LedMatrix4">
<X>+4</X>
</Led>
<Led Id="Grid5">
<Led Id="LedMatrix5">
<X>+4</X>
</Led>
<Led Id="Grid6">
<Led Id="LedMatrix6">
<X>+4</X>
</Led>
<Led Id="Grid7">
<Led Id="LedMatrix7">
<X>+4</X>
</Led>
<Led Id="Grid8">
<Led Id="LedMatrix8">
<X>+4</X>
</Led>
<Led Id="Grid9">
<Led Id="LedMatrix9">
<X>14</X>
<Y>+4</Y>
</Led>
<Led Id="Grid10">
<Led Id="LedMatrix10">
<X>+4</X>
</Led>
<Led Id="Grid11">
<Led Id="LedMatrix11">
<X>+4</X>
</Led>
<Led Id="Grid12">
<Led Id="LedMatrix12">
<X>+4</X>
</Led>
<Led Id="Grid13">
<Led Id="LedMatrix13">
<X>+4</X>
</Led>
<Led Id="Grid14">
<Led Id="LedMatrix14">
<X>+4</X>
</Led>
<Led Id="Grid15">
<Led Id="LedMatrix15">
<X>+4</X>
</Led>
<Led Id="Grid16">
<Led Id="LedMatrix16">
<X>+4</X>
</Led>
<Led Id="Grid17">
<Led Id="LedMatrix17">
<X>14</X>
<Y>+4</Y>
</Led>
<Led Id="Grid18">
<Led Id="LedMatrix18">
<X>+4</X>
</Led>
<Led Id="Grid19">
<Led Id="LedMatrix19">
<X>+4</X>
</Led>
<Led Id="Grid20">
<Led Id="LedMatrix20">
<X>+4</X>
</Led>
<Led Id="Grid21">
<Led Id="LedMatrix21">
<X>+4</X>
</Led>
<Led Id="Grid22">
<Led Id="LedMatrix22">
<X>+4</X>
</Led>
<Led Id="Grid23">
<Led Id="LedMatrix23">
<X>+4</X>
</Led>
<Led Id="Grid24">
<Led Id="LedMatrix24">
<X>+4</X>
</Led>
<Led Id="Grid25">
<Led Id="LedMatrix25">
<X>14</X>
<Y>+4</Y>
</Led>
<Led Id="Grid26">
<Led Id="LedMatrix26">
<X>+4</X>
</Led>
<Led Id="Grid27">
<Led Id="LedMatrix27">
<X>+4</X>
</Led>
<Led Id="Grid28">
<Led Id="LedMatrix28">
<X>+4</X>
<Shape>M0,0 L0,1 L0.75,1 L1,0.75 L1,0 Z</Shape>
</Led>
<Led Id="Grid29">
<Led Id="LedMatrix29">
<X>+4</X>
<Shape>M0,0 L0,0.75 L0.25,1 L1,1 L1,0 Z</Shape>
</Led>
<Led Id="Grid30">
<Led Id="LedMatrix30">
<X>+4</X>
</Led>
<Led Id="Grid31">
<Led Id="LedMatrix31">
<X>+4</X>
</Led>
<Led Id="Grid32">
<Led Id="LedMatrix32">
<X>+4</X>
</Led>
<Led Id="Grid33">
<Led Id="LedMatrix33">
<X>14</X>
<Y>+4</Y>
</Led>
<Led Id="Grid34">
<Led Id="LedMatrix34">
<X>+4</X>
</Led>
<Led Id="Grid35">
<Led Id="LedMatrix35">
<X>+4</X>
</Led>
<Led Id="Grid36">
<Led Id="LedMatrix36">
<X>+4</X>
<Shape>M0,0 L0,1 L1,1 L1,0.25 L0.75,0 Z</Shape>
</Led>
<Led Id="Grid37">
<Led Id="LedMatrix37">
<X>+4</X>
<Shape>M0,0.25 L0,1 L1,1 L1,0 L0.25,0 Z</Shape>
</Led>
<Led Id="Grid38">
<Led Id="LedMatrix38">
<X>+4</X>
</Led>
<Led Id="Grid39">
<Led Id="LedMatrix39">
<X>+4</X>
</Led>
<Led Id="Grid40">
<Led Id="LedMatrix40">
<X>+4</X>
</Led>
<Led Id="Grid41">
<Led Id="LedMatrix41">
<X>14</X>
<Y>+4</Y>
</Led>
<Led Id="Grid42">
<Led Id="LedMatrix42">
<X>+4</X>
</Led>
<Led Id="Grid43">
<Led Id="LedMatrix43">
<X>+4</X>
</Led>
<Led Id="Grid44">
<Led Id="LedMatrix44">
<X>+4</X>
</Led>
<Led Id="Grid45">
<Led Id="LedMatrix45">
<X>+4</X>
</Led>
<Led Id="Grid46">
<Led Id="LedMatrix46">
<X>+4</X>
</Led>
<Led Id="Grid47">
<Led Id="LedMatrix47">
<X>+4</X>
</Led>
<Led Id="Grid48">
<Led Id="LedMatrix48">
<X>+4</X>
</Led>
<Led Id="Grid49">
<Led Id="LedMatrix49">
<X>14</X>
<Y>+4</Y>
</Led>
<Led Id="Grid50">
<Led Id="LedMatrix50">
<X>+4</X>
</Led>
<Led Id="Grid51">
<Led Id="LedMatrix51">
<X>+4</X>
</Led>
<Led Id="Grid52">
<Led Id="LedMatrix52">
<X>+4</X>
</Led>
<Led Id="Grid53">
<Led Id="LedMatrix53">
<X>+4</X>
</Led>
<Led Id="Grid54">
<Led Id="LedMatrix54">
<X>+4</X>
</Led>
<Led Id="Grid55">
<Led Id="LedMatrix55">
<X>+4</X>
</Led>
<Led Id="Grid56">
<Led Id="LedMatrix56">
<X>+4</X>
</Led>
<Led Id="Grid57">
<Led Id="LedMatrix57">
<X>14</X>
<Y>+4</Y>
</Led>
<Led Id="Grid58">
<Led Id="LedMatrix58">
<X>+4</X>
</Led>
<Led Id="Grid59">
<Led Id="LedMatrix59">
<X>+4</X>
</Led>
<Led Id="Grid60">
<Led Id="LedMatrix60">
<X>+4</X>
</Led>
<Led Id="Grid61">
<Led Id="LedMatrix61">
<X>+4</X>
</Led>
<Led Id="Grid62">
<Led Id="LedMatrix62">
<X>+4</X>
</Led>
<Led Id="Grid63">
<Led Id="LedMatrix63">
<X>+4</X>
</Led>
<Led Id="Grid64">
<Led Id="LedMatrix64">
<X>+4</X>
</Led>
<!-- Scene-buttons -->
<Led Id="Scene1">
<Led Id="Custom9">
<Shape>Circle</Shape>
<X>+4</X>
<Y>40</Y>
<Width>16mm</Width>
<Height>16mm</Height>
</Led>
<Led Id="Scene2">
<Led Id="Custom10">
<Shape>Circle</Shape>
<X>~</X>
<Y>+8</Y>
<Width>16mm</Width>
<Height>16mm</Height>
</Led>
<Led Id="Scene3">
<Led Id="Custom11">
<Shape>Circle</Shape>
<X>~</X>
<Y>+8</Y>
<Width>16mm</Width>
<Height>16mm</Height>
</Led>
<Led Id="Scene4">
<Led Id="Custom12">
<Shape>Circle</Shape>
<X>~</X>
<Y>+8</Y>
<Width>16mm</Width>
<Height>16mm</Height>
</Led>
<Led Id="Scene5">
<Led Id="Custom13">
<Shape>Circle</Shape>
<X>~</X>
<Y>+8</Y>
<Width>16mm</Width>
<Height>16mm</Height>
</Led>
<Led Id="Scene6">
<Led Id="Custom14">
<Shape>Circle</Shape>
<X>~</X>
<Y>+8</Y>
<Width>16mm</Width>
<Height>16mm</Height>
</Led>
<Led Id="Scene7">
<Led Id="Custom15">
<Shape>Circle</Shape>
<X>~</X>
<Y>+8</Y>
<Width>16mm</Width>
<Height>16mm</Height>
</Led>
<Led Id="Scene8">
<Led Id="Custom16">
<Shape>Circle</Shape>
<X>~</X>
<Y>+8</Y>
@@ -337,88 +337,88 @@
<LedImageLayouts>
<LedImageLayout Layout="Default">
<LedImages>
<LedImage Id="Up" Image="Buttons\Round.png" />
<LedImage Id="Down" Image="Buttons\Round.png" />
<LedImage Id="Left" Image="Buttons\Round.png" />
<LedImage Id="Right" Image="Buttons\Round.png" />
<LedImage Id="Session" Image="Buttons\Round.png" />
<LedImage Id="User1" Image="Buttons\Round.png" />
<LedImage Id="User2" Image="Buttons\Round.png" />
<LedImage Id="Mix" Image="Buttons\Round.png" />
<LedImage Id="Custom1" Image="Buttons\Round.png" />
<LedImage Id="Custom2" Image="Buttons\Round.png" />
<LedImage Id="Custom3" Image="Buttons\Round.png" />
<LedImage Id="Custom4" Image="Buttons\Round.png" />
<LedImage Id="Custom5" Image="Buttons\Round.png" />
<LedImage Id="Custom6" Image="Buttons\Round.png" />
<LedImage Id="Custom7" Image="Buttons\Round.png" />
<LedImage Id="Custom8" Image="Buttons\Round.png" />
<LedImage Id="Scene1" Image="Buttons\Round.png" />
<LedImage Id="Scene2" Image="Buttons\Round.png" />
<LedImage Id="Scene3" Image="Buttons\Round.png" />
<LedImage Id="Scene4" Image="Buttons\Round.png" />
<LedImage Id="Scene5" Image="Buttons\Round.png" />
<LedImage Id="Scene6" Image="Buttons\Round.png" />
<LedImage Id="Scene7" Image="Buttons\Round.png" />
<LedImage Id="Scene8" Image="Buttons\Round.png" />
<LedImage Id="Custom9" Image="Buttons\Round.png" />
<LedImage Id="Custom10" Image="Buttons\Round.png" />
<LedImage Id="Custom11" Image="Buttons\Round.png" />
<LedImage Id="Custom12" Image="Buttons\Round.png" />
<LedImage Id="Custom13" Image="Buttons\Round.png" />
<LedImage Id="Custom14" Image="Buttons\Round.png" />
<LedImage Id="Custom15" Image="Buttons\Round.png" />
<LedImage Id="Custom16" Image="Buttons\Round.png" />
<LedImage Id="Grid1" Image="Buttons\Grid.png" />
<LedImage Id="Grid2" Image="Buttons\Grid.png" />
<LedImage Id="Grid3" Image="Buttons\Grid.png" />
<LedImage Id="Grid4" Image="Buttons\Grid.png" />
<LedImage Id="Grid5" Image="Buttons\Grid.png" />
<LedImage Id="Grid6" Image="Buttons\Grid.png" />
<LedImage Id="Grid7" Image="Buttons\Grid.png" />
<LedImage Id="Grid8" Image="Buttons\Grid.png" />
<LedImage Id="Grid9" Image="Buttons\Grid.png" />
<LedImage Id="Grid10" Image="Buttons\Grid.png" />
<LedImage Id="Grid11" Image="Buttons\Grid.png" />
<LedImage Id="Grid12" Image="Buttons\Grid.png" />
<LedImage Id="Grid13" Image="Buttons\Grid.png" />
<LedImage Id="Grid14" Image="Buttons\Grid.png" />
<LedImage Id="Grid15" Image="Buttons\Grid.png" />
<LedImage Id="Grid16" Image="Buttons\Grid.png" />
<LedImage Id="Grid17" Image="Buttons\Grid.png" />
<LedImage Id="Grid18" Image="Buttons\Grid.png" />
<LedImage Id="Grid19" Image="Buttons\Grid.png" />
<LedImage Id="Grid20" Image="Buttons\Grid.png" />
<LedImage Id="Grid21" Image="Buttons\Grid.png" />
<LedImage Id="Grid22" Image="Buttons\Grid.png" />
<LedImage Id="Grid23" Image="Buttons\Grid.png" />
<LedImage Id="Grid24" Image="Buttons\Grid.png" />
<LedImage Id="Grid25" Image="Buttons\Grid.png" />
<LedImage Id="Grid26" Image="Buttons\Grid.png" />
<LedImage Id="Grid27" Image="Buttons\Grid.png" />
<LedImage Id="Grid28" Image="Buttons\GridCenter1.png" />
<LedImage Id="Grid29" Image="Buttons\GridCenter2.png" />
<LedImage Id="Grid30" Image="Buttons\Grid.png" />
<LedImage Id="Grid31" Image="Buttons\Grid.png" />
<LedImage Id="Grid32" Image="Buttons\Grid.png" />
<LedImage Id="Grid33" Image="Buttons\Grid.png" />
<LedImage Id="Grid34" Image="Buttons\Grid.png" />
<LedImage Id="Grid35" Image="Buttons\Grid.png" />
<LedImage Id="Grid36" Image="Buttons\GridCenter3.png" />
<LedImage Id="Grid37" Image="Buttons\GridCenter4.png" />
<LedImage Id="Grid38" Image="Buttons\Grid.png" />
<LedImage Id="Grid39" Image="Buttons\Grid.png" />
<LedImage Id="Grid40" Image="Buttons\Grid.png" />
<LedImage Id="Grid41" Image="Buttons\Grid.png" />
<LedImage Id="Grid42" Image="Buttons\Grid.png" />
<LedImage Id="Grid43" Image="Buttons\Grid.png" />
<LedImage Id="Grid44" Image="Buttons\Grid.png" />
<LedImage Id="Grid45" Image="Buttons\Grid.png" />
<LedImage Id="Grid46" Image="Buttons\Grid.png" />
<LedImage Id="Grid47" Image="Buttons\Grid.png" />
<LedImage Id="Grid48" Image="Buttons\Grid.png" />
<LedImage Id="Grid49" Image="Buttons\Grid.png" />
<LedImage Id="Grid50" Image="Buttons\Grid.png" />
<LedImage Id="Grid51" Image="Buttons\Grid.png" />
<LedImage Id="Grid52" Image="Buttons\Grid.png" />
<LedImage Id="Grid53" Image="Buttons\Grid.png" />
<LedImage Id="Grid54" Image="Buttons\Grid.png" />
<LedImage Id="Grid55" Image="Buttons\Grid.png" />
<LedImage Id="Grid56" Image="Buttons\Grid.png" />
<LedImage Id="Grid57" Image="Buttons\Grid.png" />
<LedImage Id="Grid58" Image="Buttons\Grid.png" />
<LedImage Id="Grid59" Image="Buttons\Grid.png" />
<LedImage Id="Grid60" Image="Buttons\Grid.png" />
<LedImage Id="Grid61" Image="Buttons\Grid.png" />
<LedImage Id="Grid62" Image="Buttons\Grid.png" />
<LedImage Id="Grid63" Image="Buttons\Grid.png" />
<LedImage Id="Grid64" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix1" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix2" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix3" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix4" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix5" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix6" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix7" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix8" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix9" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix10" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix11" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix12" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix13" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix14" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix15" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix16" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix17" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix18" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix19" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix20" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix21" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix22" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix23" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix24" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix25" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix26" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix27" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix28" Image="Buttons\GridCenter1.png" />
<LedImage Id="LedMatrix29" Image="Buttons\GridCenter2.png" />
<LedImage Id="LedMatrix30" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix31" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix32" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix33" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix34" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix35" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix36" Image="Buttons\GridCenter3.png" />
<LedImage Id="LedMatrix37" Image="Buttons\GridCenter4.png" />
<LedImage Id="LedMatrix38" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix39" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix40" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix41" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix42" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix43" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix44" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix45" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix46" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix47" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix48" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix49" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix50" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix51" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix52" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix53" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix54" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix55" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix56" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix57" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix58" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix59" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix60" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix61" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix62" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix63" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix64" Image="Buttons\Grid.png" />
</LedImages>
</LedImageLayout>
</LedImageLayouts>
@@ -53,13 +53,14 @@
<Compile Include="Attributes\DeviceIdAttribute.cs" />
<Compile Include="Enum\NovationColorCapabilities.cs" />
<Compile Include="Enum\NovationDevices.cs" />
<Compile Include="Enum\NovationLedIds.cs" />
<Compile Include="Generic\NovationLedId.cs" />
<Compile Include="Enum\NovationLedId.cs" />
<Compile Include="Generic\NovationRGBDevice.cs" />
<Compile Include="Generic\NovationRGBDeviceInfo.cs" />
<Compile Include="Helper\DictionaryExtension.cs" />
<Compile Include="Helper\EnumExtension.cs" />
<Compile Include="Helper\NovationLedIdsExtension.cs" />
<Compile Include="Helper\NovationLedIdExtension.cs" />
<Compile Include="Generic\INovationRGBDevice.cs" />
<Compile Include="Launchpad\LaunchpadIdMapping.cs" />
<Compile Include="Launchpad\NovationLaunchpadRGBDevice.cs" />
<Compile Include="Launchpad\NovationLaunchpadRGBDeviceInfo.cs" />
<Compile Include="NovationDeviceProvider.cs" />