1
0
mirror of https://github.com/DarthAffe/RGB.NET.git synced 2025-12-13 01:58:30 +00:00

Merge pull request #268 from DarthAffe/SDK/SmallFixAndCorsairUpdate

Sdk/small fix and corsair update
This commit is contained in:
DarthAffe 2022-07-17 13:34:57 +02:00 committed by GitHub
commit 526a4b3411
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 5 deletions

View File

@ -70,7 +70,7 @@ public class CorsairCustomRGBDeviceInfo : CorsairRGBDeviceInfo
CorsairChannelDeviceType.FanML => RGBDeviceType.Fan,
CorsairChannelDeviceType.DAP => RGBDeviceType.Fan,
CorsairChannelDeviceType.FanQL => RGBDeviceType.Fan,
CorsairChannelDeviceType.FanSPPRO => RGBDeviceType.Fan,
CorsairChannelDeviceType.EightLedSeriesFan => RGBDeviceType.Fan,
CorsairChannelDeviceType.Strip => RGBDeviceType.LedStripe,
CorsairChannelDeviceType.Pump => RGBDeviceType.Cooler,
CorsairChannelDeviceType.WaterBlock => RGBDeviceType.Cooler,
@ -117,8 +117,8 @@ public class CorsairCustomRGBDeviceInfo : CorsairRGBDeviceInfo
case CorsairChannelDeviceType.FanQL:
return "QL Fan";
case CorsairChannelDeviceType.FanSPPRO:
return "SP-PRO Fan";
case CorsairChannelDeviceType.EightLedSeriesFan:
return "8-Led-Series Fan Fan";
case CorsairChannelDeviceType.Strip:
// LS100 Led Strips are reported as one big strip if configured in monitor mode in iCUE, 138 LEDs for dual monitor, 84 for single

View File

@ -21,5 +21,5 @@ public enum CorsairChannelDeviceType
Pump = 7,
FanQL = 8,
WaterBlock = 9,
FanSPPRO = 10
EightLedSeriesFan = 10 // Previously called FanSPPRO
};

View File

@ -54,7 +54,11 @@ public class NovationDeviceProvider : AbstractRGBDeviceProvider
NovationDevices? deviceId = (NovationDevices?)Enum.GetValues(typeof(NovationDevices))
.Cast<Enum>()
.FirstOrDefault(x => x.GetDeviceId()?.ToUpperInvariant().Contains(outCaps.name.ToUpperInvariant()) ?? false);
.FirstOrDefault(x =>
{
string? deviceId = x.GetDeviceId();
return (deviceId != null) && outCaps.name.ToUpperInvariant().Contains(deviceId.ToUpperInvariant());
});
if (deviceId == null) continue;