Skip to content

Logitech G915 X returning 0 LEDs #445

@megabytesme

Description

@megabytesme

Hi there,

So I am experiencing an issue with the Logitech G915 X support (related issue: megabytesme/MineLights#12). Currently the keyboard is recognised and picked up by the library, however RGB.Net reports 0 LEDs? Other Logitech devices (such as the Logitech G502 HERO are detected correctly and their LED counts are correct). I'm not too sure what is causing this - You can see the example below:

Generated device data:

{
  "Devices": [
    {
      "Manufacturer": "Logitech",
      "Model": "G915 X",
      "DeviceType": "Keyboard",
      "DeviceName": "Logitech G915 X",
      "Leds": []
    },
    {
      "Manufacturer": "Logitech",
      "Model": "G502 HERO",
      "DeviceType": "Mouse",
      "DeviceName": "Logitech G502 HERO",
      "Leds": [
        {
          "LedId": "Mouse1",
          "A": 1.0,
          "R": 1.0,
          "G": 0.0,
          "B": 0.0,
          "LocationX": 0.0,
          "LocationY": 0.0,
          "SizeWidth": 10.0,
          "SizeHeight": 10.0,
          "AbsX": 0.0,
          "AbsY": 0.0,
          "AbsWidth": 10.0,
          "AbsHeight": 10.0,
          "Shape": "Rectangle",
          "ShapeData": null
        },
        {
          "LedId": "Mouse2",
          "A": 1.0,
          "R": 1.0,
          "G": 0.0,
          "B": 0.0,
          "LocationX": 10.0,
          "LocationY": 0.0,
          "SizeWidth": 10.0,
          "SizeHeight": 10.0,
          "AbsX": 10.0,
          "AbsY": 0.0,
          "AbsWidth": 10.0,
          "AbsHeight": 10.0,
          "Shape": "Rectangle",
          "ShapeData": null
        }
      ]
    }
  ]
}

I generated this JSON with the following code:

    private readonly RGBSurface _surface;

    public RawSnapshotFile BuildRawSnapshot()
    {
        lock (_deviceLock)
        {
            var snapshot = new RawSnapshotFile();

            foreach (var device in _surface.Devices)
            {
                var dev = new RawDeviceSnapshot
                {
                    Manufacturer = device.DeviceInfo.Manufacturer,
                    Model = device.DeviceInfo.Model,
                    DeviceType = device.DeviceInfo.DeviceType.ToString(),
                    DeviceName = device.DeviceInfo.DeviceName
                };

                foreach (var led in device)
                {
                    var abs = led.AbsoluteBoundary;

                    dev.Leds.Add(new RawLedSnapshot
                    {
                        LedId = led.Id.ToString(),

                        A = led.Color.A,
                        R = led.Color.R,
                        G = led.Color.G,
                        B = led.Color.B,

                        LocationX = led.Location.X,
                        LocationY = led.Location.Y,

                        SizeWidth = led.Size.Width,
                        SizeHeight = led.Size.Height,

                        AbsX = abs.Location.X,
                        AbsY = abs.Location.Y,
                        AbsWidth = abs.Size.Width,
                        AbsHeight = abs.Size.Height,

                        Shape = led.Shape.ToString(),
                        ShapeData = led.ShapeData
                    });
                }

                snapshot.Devices.Add(dev);
            }

            return snapshot;
        }
    }

I note that support was seemingly added for this keyboard in #411, and presumably commit ed98714.

Thanks 👍🏻

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions