Skip to content

Commit dc6715b

Browse files
committed
use serial number hash as update trigger id
1 parent 34b0452 commit dc6715b

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

RGB.NET.Devices.Wooting/Grpc/WootingGrpcDeviceProvider.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,15 +71,14 @@ protected override IEnumerable<IRGBDevice> LoadDevices()
7171
{
7272
ArgumentNullException.ThrowIfNull(_client, nameof(_client));
7373

74-
int i = 0;
7574
foreach (RgbGetConnectedDevicesResponse.Types.RgbDevice? device in _client.GetConnectedDevices(new()).Devices)
7675
{
7776
if (device.DeviceType == RgbDeviceType.None)
7877
continue; // Skip devices that are not supported
7978

8079
_client.Initialize(new RgbInitializeRequest { Id = device.Id });
8180

82-
WootingGrpcUpdateQueue updateQueue = new(GetUpdateTrigger(i++), device, _client);
81+
WootingGrpcUpdateQueue updateQueue = new(GetUpdateTrigger(device.SerialNumber.GetHashCode()), device, _client);
8382

8483
WootingDeviceType deviceType = device.DeviceType switch
8584
{

0 commit comments

Comments
 (0)