mirror of
https://github.com/DarthAffe/RGB.NET.git
synced 2026-11-10 20:46:24 +00:00
Fixed some code-issues in novation-library
This commit is contained in:
1 parent
b642cd31b0
commit
5440f9844f
11 files changed
+106
-42
No files matched your search
@@ -9,7 +9,7 @@ using Sanford.Multimedia.Midi;
|
||||
namespace RGB.NET.Devices.Novation
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a generic Novation-device. (keyboard, mouse, headset, mousepad).
|
||||
/// Represents a generic Novation-device. (launchpad).
|
||||
/// </summary>
|
||||
public abstract class NovationRGBDevice : AbstractRGBDevice
|
||||
{
|
||||
@@ -30,10 +30,11 @@ namespace RGB.NET.Devices.Novation
|
||||
/// Initializes a new instance of the <see cref="NovationRGBDevice"/> class.
|
||||
/// </summary>
|
||||
/// <param name="info">The generic information provided by Novation for the device.</param>
|
||||
protected NovationRGBDevice(IRGBDeviceInfo info)
|
||||
protected NovationRGBDevice(NovationRGBDeviceInfo info)
|
||||
{
|
||||
this.DeviceInfo = info;
|
||||
_outputDevice = new OutputDevice(((NovationRGBDeviceInfo)DeviceInfo).DeviceId);
|
||||
|
||||
_outputDevice = new OutputDevice(info.DeviceId);
|
||||
}
|
||||
|
||||
#endregion
|
||||
@@ -139,9 +140,9 @@ namespace RGB.NET.Devices.Novation
|
||||
{
|
||||
color = 17;
|
||||
|
||||
if(((led.Color.R > 127) && (led.Color.G < 127)) || ((led.Color.R < 127) && (led.Color.G > 127)))
|
||||
if (((led.Color.R > 127) && (led.Color.G < 127)) || ((led.Color.R < 127) && (led.Color.G > 127)))
|
||||
color = 34;
|
||||
if((led.Color.R > 127) && (led.Color.G > 127))
|
||||
if ((led.Color.R > 127) && (led.Color.G > 127))
|
||||
color = 51;
|
||||
}
|
||||
|
||||
|
||||
@@ -25,7 +25,9 @@ namespace RGB.NET.Devices.Novation
|
||||
/// <inheritdoc />
|
||||
public RGBDeviceLighting Lighting => RGBDeviceLighting.Key;
|
||||
|
||||
/// <inheritdoc />
|
||||
/// <summary>
|
||||
/// Gets the (midi)-id of the <see cref="IRGBDevice"/>..
|
||||
/// </summary>
|
||||
public int DeviceId { get; }
|
||||
|
||||
#endregion
|
||||
@@ -37,6 +39,7 @@ namespace RGB.NET.Devices.Novation
|
||||
/// </summary>
|
||||
/// <param name="deviceType">The type of the <see cref="IRGBDevice"/>.</param>
|
||||
/// <param name="model">The represented device model.</param>
|
||||
/// <param name="deviceId">The (midi)-id of the <see cref="IRGBDevice"/>.</param>
|
||||
internal NovationRGBDeviceInfo(RGBDeviceType deviceType, string model, int deviceId)
|
||||
{
|
||||
this.DeviceType = deviceType;
|
||||
|
||||
Reference in new issue
Block a user