using RGB.NET.Core; namespace RGB.NET.Devices.WLED; /// /// /// /// Represents a WLED-device. /// public sealed class WledRGBDevice : AbstractRGBDevice, IWledRGBDevice, ILedStripe { #region Constructors /// /// Initializes a new instance of the class. /// internal WledRGBDevice(WledRGBDeviceInfo info, string address, IDeviceUpdateTrigger updateTrigger) : base(info, new WledDeviceUpdateQueue(updateTrigger, address, info.Info.UDPPort, info.Info.Leds.Count)) { InitializeLayout(); } #endregion #region Methods private void InitializeLayout() { for (int i = 0; i < DeviceInfo.Info.Leds.Count; i++) AddLed(LedId.LedStripe1 + i, new Point(i * 10, 0), new Size(10, 10)); } /// protected override object GetLedCustomData(LedId ledId) => ledId - LedId.LedStripe1; #endregion }