diff --git a/RGB.NET.Devices.Novation/Generic/NovationRGBDevice.cs b/RGB.NET.Devices.Novation/Generic/NovationRGBDevice.cs index 29f8dba..d4b4df4 100644 --- a/RGB.NET.Devices.Novation/Generic/NovationRGBDevice.cs +++ b/RGB.NET.Devices.Novation/Generic/NovationRGBDevice.cs @@ -122,6 +122,14 @@ namespace RGB.NET.Devices.Novation } } + /// + /// Resets the device leds + /// + public virtual void Reset() + { + SendMessage(0xB0, 0, 0); + } + /// /// Convert a to its novation-representation depending on the of the . /// @@ -187,6 +195,7 @@ namespace RGB.NET.Devices.Novation /// public override void Dispose() { + Reset(); _outputDevice.Dispose(); base.Dispose(); diff --git a/RGB.NET.Devices.Novation/NovationDeviceProvider.cs b/RGB.NET.Devices.Novation/NovationDeviceProvider.cs index cde43b5..40d2de9 100644 --- a/RGB.NET.Devices.Novation/NovationDeviceProvider.cs +++ b/RGB.NET.Devices.Novation/NovationDeviceProvider.cs @@ -106,9 +106,8 @@ namespace RGB.NET.Devices.Novation { foreach (IRGBDevice device in Devices) { - NovationLaunchpadRGBDeviceInfo deviceInfo = (NovationLaunchpadRGBDeviceInfo)device.DeviceInfo; - OutputDevice outputDevice = new OutputDevice(deviceInfo.DeviceId); - outputDevice.Reset(); + NovationLaunchpadRGBDevice novationDevice = device as NovationLaunchpadRGBDevice; + novationDevice?.Reset(); } }