mirror of
https://github.com/DarthAffe/RGB.NET.git
synced 2025-12-13 10:08:31 +00:00
Implement Novation device reset
This commit is contained in:
parent
5d3a83335b
commit
0e70cd46dc
@ -122,6 +122,14 @@ namespace RGB.NET.Devices.Novation
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Resets the device leds
|
||||||
|
/// </summary>
|
||||||
|
public virtual void Reset()
|
||||||
|
{
|
||||||
|
SendMessage(0xB0, 0, 0);
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Convert a <see cref="Color"/> to its novation-representation depending on the <see cref="NovationColorCapabilities"/> of the <see cref="NovationRGBDevice"/>.
|
/// Convert a <see cref="Color"/> to its novation-representation depending on the <see cref="NovationColorCapabilities"/> of the <see cref="NovationRGBDevice"/>.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -187,6 +195,7 @@ namespace RGB.NET.Devices.Novation
|
|||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public override void Dispose()
|
public override void Dispose()
|
||||||
{
|
{
|
||||||
|
Reset();
|
||||||
_outputDevice.Dispose();
|
_outputDevice.Dispose();
|
||||||
|
|
||||||
base.Dispose();
|
base.Dispose();
|
||||||
|
|||||||
@ -106,9 +106,8 @@ namespace RGB.NET.Devices.Novation
|
|||||||
{
|
{
|
||||||
foreach (IRGBDevice device in Devices)
|
foreach (IRGBDevice device in Devices)
|
||||||
{
|
{
|
||||||
NovationLaunchpadRGBDeviceInfo deviceInfo = (NovationLaunchpadRGBDeviceInfo)device.DeviceInfo;
|
NovationLaunchpadRGBDevice novationDevice = device as NovationLaunchpadRGBDevice;
|
||||||
OutputDevice outputDevice = new OutputDevice(deviceInfo.DeviceId);
|
novationDevice?.Reset();
|
||||||
outputDevice.Reset();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user