Updated device providers to make everything compile again

This commit is contained in:
DarthAffe committed 2021-02-01 23:13:15 +01:00
1 parent 6619539176
commit 57dc9afb32
67 files changed
+190 -661

No files matched your search

@@ -29,25 +29,18 @@ namespace RGB.NET.Devices.Wooting.Keyboard
/// <inheritdoc />
protected override void InitializeLayout()
{
Dictionary<LedId, (int row, int column)> mapping = WootingKeyboardLedMappings.Mapping[DeviceInfo.DeviceIndex][DeviceInfo.PhysicalLayout];
foreach (KeyValuePair<LedId, (int row, int column)> led in mapping)
{
InitializeLed(led.Key, new Point(led.Value.column * 19, led.Value.row * 19), new Size(19,19));
}
string model = DeviceInfo.Model.Replace(" ", string.Empty).ToUpper();
ApplyLayoutFromFile(PathHelper.GetAbsolutePath(this, $@"Layouts\Wooting\Keyboards\{model}", $"{DeviceInfo.PhysicalLayout.ToString().ToUpper()}.xml"),
DeviceInfo.LogicalLayout.ToString());
AddLed(led.Key, new Point(led.Value.column * 19, led.Value.row * 19), new Size(19, 19));
}
/// <inheritdoc />
protected override object GetLedCustomData(LedId ledId) => WootingKeyboardLedMappings.Mapping[DeviceInfo.DeviceIndex][DeviceInfo.PhysicalLayout][ledId];
/// <inheritdoc />
protected override void UpdateLeds(IEnumerable<Led> ledsToUpdate) => UpdateQueue.SetData(ledsToUpdate.Where(x => x.Color.A > 0));
/// <inheritdoc />
protected override object CreateLedCustomData(LedId ledId) => WootingKeyboardLedMappings.Mapping[DeviceInfo.DeviceIndex][DeviceInfo.PhysicalLayout][ledId];
#endregion
}
}