mirror of
https://github.com/DarthAffe/RGB.NET.git
synced 2025-12-13 01:58:30 +00:00
Merge pull request #365 from DarthAffe/Devices/Novation
Added Novation Launchpad Mini MK3
This commit is contained in:
commit
af43c0ae87
@ -34,5 +34,10 @@ public enum NovationDevices
|
|||||||
[DeviceId("Launchpad Open")]
|
[DeviceId("Launchpad Open")]
|
||||||
[ColorCapability(NovationColorCapabilities.RGB)]
|
[ColorCapability(NovationColorCapabilities.RGB)]
|
||||||
[LedIdMapping(LedIdMappings.Pro)]
|
[LedIdMapping(LedIdMappings.Pro)]
|
||||||
LaunchpadCustomFirmware
|
LaunchpadCustomFirmware,
|
||||||
|
|
||||||
|
[DeviceId("LPMiniMK3")]
|
||||||
|
[ColorCapability(NovationColorCapabilities.RGB)]
|
||||||
|
[LedIdMapping(LedIdMappings.Current)]
|
||||||
|
LaunchpadMiniMK3,
|
||||||
}
|
}
|
||||||
@ -65,11 +65,10 @@ public sealed class NovationDeviceProvider : AbstractRGBDeviceProvider
|
|||||||
MidiOutCaps outCaps = OutputDeviceBase.GetDeviceCapabilities(index);
|
MidiOutCaps outCaps = OutputDeviceBase.GetDeviceCapabilities(index);
|
||||||
if (outCaps.name == null) continue;
|
if (outCaps.name == null) continue;
|
||||||
|
|
||||||
string deviceName = outCaps.name.ToUpperInvariant();
|
|
||||||
NovationDevices? deviceId = (NovationDevices?)Enum.GetValues(typeof(NovationDevices))
|
NovationDevices? deviceId = (NovationDevices?)Enum.GetValues(typeof(NovationDevices))
|
||||||
.Cast<Enum>()
|
.Cast<Enum>()
|
||||||
.Where(x => x.GetDeviceId() != null)
|
.Where(x => x.GetDeviceId() != null)
|
||||||
.FirstOrDefault(x => deviceName.Contains(x.GetDeviceId()!.ToUpperInvariant()));
|
.FirstOrDefault(x => outCaps.name.Contains(x.GetDeviceId()!, StringComparison.InvariantCultureIgnoreCase));
|
||||||
|
|
||||||
if (deviceId == null) continue;
|
if (deviceId == null) continue;
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user