Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v2.1 #381

Merged
merged 36 commits into from
Mar 9, 2024
Merged

v2.1 #381

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
4f47887
Added Novation Launchpad Mini MK3
DarthAffe Jan 4, 2024
505e748
Small Novation-detection refactoring
DarthAffe Jan 4, 2024
7898c50
Fixed unexpected name of the Launchpad Mini MK3
DarthAffe Jan 4, 2024
af43c0a
Merge pull request #365 from DarthAffe/Devices/Novation
DarthAffe Jan 4, 2024
c89bbfe
Added PID for Razer Naga Classic Edition
DarthAffe Jan 9, 2024
9aee9a1
Renamed Razer Naga Classic Edition To Naga Classic
DarthAffe Jan 9, 2024
1312566
Merge pull request #367 from DarthAffe/Devices/Razer
DarthAffe Jan 9, 2024
f07d228
Update ci.yml
DarthAffe Jan 9, 2024
95f162d
Merge pull request #368 from DarthAffe/DarthAffe-patch-1
DarthAffe Jan 9, 2024
1fe8cab
Added MSI GE78HX LED mapping
Myp3a Jan 16, 2024
3400edc
Merge pull request #370 from Myp3a/GE78LedMapping
DarthAffe Jan 17, 2024
67672be
Added Provider for WLED-Devices
DarthAffe Jan 17, 2024
23bd111
Added helper to auto discover WLED devices to the readme
DarthAffe Jan 17, 2024
b2848cf
Fixed small mistake in WLED readme
DarthAffe Jan 17, 2024
9004c50
Disabled resharper warning about missspelling of MSI
DarthAffe Jan 17, 2024
6ba7e44
Added mising dispose in E131UpdateQueue
DarthAffe Jan 17, 2024
657bca2
Merge pull request #372 from DarthAffe/SmallFixes
DarthAffe Jan 18, 2024
16b2877
Merge pull request #371 from DarthAffe/SDK/Wled
DarthAffe Jan 18, 2024
1df23a6
Changed WLED-devices to flush and reduced heartbeat timer
DarthAffe Jan 18, 2024
ef980f7
Merge pull request #373 from DarthAffe/SDK/Wled
DarthAffe Jan 18, 2024
4959c6e
added Num/Caps/Scroll lock indicator mappings to OpenRGB
Aytackydln Jan 27, 2024
50e20a7
Merge pull request #374 from Aytackydln/num-lock-scroll-indicators
DarthAffe Jan 28, 2024
b56a50a
call shutdown on Logitech provider dispose
Aytackydln Feb 11, 2024
a4bd797
Merge pull request #375 from Aytackydln/logi-shutdown-on-dispose
DarthAffe Feb 12, 2024
3ca782a
Add extra MSI pid to steelseries provider
diogotr7 Mar 2, 2024
d82eebd
Razer: Load Debug Device Properties for Each Device Type
Aytackydln Mar 8, 2024
58ed8bb
Merge pull request #378 from diogotr7/feature/msi-pid
DarthAffe Mar 8, 2024
4f0f25e
Merge pull request #379 from DarthAffe/RazerDebugDevices
DarthAffe Mar 8, 2024
ced13e9
(MINOR) Updated workflows and bumped version for release
DarthAffe Mar 8, 2024
417b9be
Merge pull request #380 from DarthAffe/Actions
DarthAffe Mar 8, 2024
e58d26d
Update ci.yml
DarthAffe Mar 8, 2024
acd4462
Update ci.yml
DarthAffe Mar 8, 2024
08d526a
Update ci.yml
DarthAffe Mar 8, 2024
d1e71ef
Update ci.yml
DarthAffe Mar 8, 2024
5aac20e
Update ci.yml
DarthAffe Mar 8, 2024
29e68ae
Update release.yml
DarthAffe Mar 8, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 6 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ jobs:
runs-on: windows-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4.1.1
with:
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
8.0.x
Expand All @@ -37,25 +37,25 @@ jobs:
- name: Test
run: dotnet test --no-build --verbosity normal --configuration Release
- name: Upload a Build Artifact NET6
uses: actions/upload-artifact@v2.2.4
uses: actions/upload-artifact@v4.3.1
with:
name: RGB.NET-NET6
path: bin/net6.0/RGB.NET.*.dll
if-no-files-found: error
- name: Upload a Build Artifact NET7
uses: actions/upload-artifact@v2.2.4
uses: actions/upload-artifact@v4.3.1
with:
name: RGB.NET-NET7
path: bin/net7.0/RGB.NET.*.dll
if-no-files-found: error
- name: Upload a Build Artifact NET8
uses: actions/upload-artifact@v2.2.4
uses: actions/upload-artifact@v4.3.1
with:
name: RGB.NET-NET8
path: bin/net8.0/RGB.NET.*.dll
if-no-files-found: error
- name: Upload Nuget Build Artifact
uses: actions/upload-artifact@v2.2.4
uses: actions/upload-artifact@v4.3.1
with:
name: RGB.NET-Nugets
path: bin/*nupkg
Expand All @@ -64,9 +64,3 @@ jobs:
run: dotnet nuget push **\*.nupkg --skip-duplicate --api-key ${{ secrets.NUGET_TOKEN }} --source https://api.nuget.org/v3/index.json
- name: Symbols Push
run: dotnet nuget push **\*.snupkg --skip-duplicate --api-key ${{ secrets.NUGET_TOKEN }} --source https://api.nuget.org/v3/index.json
- name: Create Tag
uses: mathieudutour/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
custom_tag: ${{ steps.versioning.outputs.version }}
tag_prefix: v
4 changes: 2 additions & 2 deletions .github/workflows/pr_verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ jobs:
runs-on: windows-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4.1.1
- name: Setup .NET
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
8.0.x
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ jobs:
runs-on: windows-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4.1.1
with:
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
8.0.x
Expand All @@ -28,33 +28,33 @@ jobs:
uses: PaulHatch/[email protected]
with:
short_tags: false
format: "${major}.${minor}.${patch}"
format: "${major}.${minor}.${patch}-prerelease.${increment}"
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore --configuration Release /p:Version=${{ steps.versioning.outputs.version }}
- name: Test
run: dotnet test --no-build --verbosity normal --configuration Release
- name: Upload a Build Artifact NET6
uses: actions/upload-artifact@v2.2.4
uses: actions/upload-artifact@v4.3.1
with:
name: RGB.NET-NET6
path: bin/net6.0/RGB.NET.*.dll
if-no-files-found: error
- name: Upload a Build Artifact NET7
uses: actions/upload-artifact@v2.2.4
uses: actions/upload-artifact@v4.3.1
with:
name: RGB.NET-NET7
path: bin/net7.0/RGB.NET.*.dll
if-no-files-found: error
- name: Upload a Build Artifact NET8
uses: actions/upload-artifact@v2.2.4
uses: actions/upload-artifact@v4.3.1
with:
name: RGB.NET-NET8
path: bin/net8.0/RGB.NET.*.dll
if-no-files-found: error
- name: Upload Nuget Build Artifact
uses: actions/upload-artifact@v2.2.4
uses: actions/upload-artifact@v4.3.1
with:
name: RGB.NET-Nugets
path: bin/*nupkg
Expand Down
7 changes: 7 additions & 0 deletions RGB.NET.Devices.DMX/E131/E131UpdateQueue.cs
Original file line number Diff line number Diff line change
Expand Up @@ -99,5 +99,12 @@ private byte GetNextSequenceNumber()
return _sequenceNumber++;
}

public override void Dispose()
{
base.Dispose();

_socket.Dispose();
}

#endregion
}
3 changes: 3 additions & 0 deletions RGB.NET.Devices.Logitech/LogitechDeviceProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,9 @@ protected override void Dispose(bool disposing)
try { _LogitechGSDK.LogiLedRestoreLighting(); }
catch { /* at least we tried */ }

try { _LogitechGSDK.LogiLedShutdown(); }
catch { /* at least we tried */ }

try { _LogitechGSDK.UnloadLogitechGSDK(); }
catch { /* at least we tried */ }

Expand Down
7 changes: 6 additions & 1 deletion RGB.NET.Devices.Novation/Enum/NovationDevices.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,10 @@ public enum NovationDevices
[DeviceId("Launchpad Open")]
[ColorCapability(NovationColorCapabilities.RGB)]
[LedIdMapping(LedIdMappings.Pro)]
LaunchpadCustomFirmware
LaunchpadCustomFirmware,

[DeviceId("LPMiniMK3")]
[ColorCapability(NovationColorCapabilities.RGB)]
[LedIdMapping(LedIdMappings.Current)]
LaunchpadMiniMK3,
}
3 changes: 1 addition & 2 deletions RGB.NET.Devices.Novation/NovationDeviceProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,10 @@ protected override IEnumerable<IRGBDevice> LoadDevices()
MidiOutCaps outCaps = OutputDeviceBase.GetDeviceCapabilities(index);
if (outCaps.name == null) continue;

string deviceName = outCaps.name.ToUpperInvariant();
NovationDevices? deviceId = (NovationDevices?)Enum.GetValues(typeof(NovationDevices))
.Cast<Enum>()
.Where(x => x.GetDeviceId() != null)
.FirstOrDefault(x => deviceName.Contains(x.GetDeviceId()!.ToUpperInvariant()));
.FirstOrDefault(x => outCaps.name.Contains(x.GetDeviceId()!, StringComparison.InvariantCultureIgnoreCase));

if (deviceId == null) continue;

Expand Down
3 changes: 3 additions & 0 deletions RGB.NET.Devices.OpenRGB/Generic/LedMappings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -141,5 +141,8 @@ internal static class LedMappings
["Key: G9"] = LedId.Keyboard_Programmable9,
["Lighting"] = LedId.Keyboard_Brightness,
["Game Mode"] = LedId.Keyboard_WinLock,
["Num Lock Indicator"] = LedId.Keyboard_IndicatorNumLock,
["Caps Lock Indicator"] = LedId.Keyboard_IndicatorCapsLock,
["Scroll Lock Indicator"] = LedId.Keyboard_IndicatorScrollLock,
};
}
31 changes: 22 additions & 9 deletions RGB.NET.Devices.Razer/Enum/RazerEndpointType.cs
Original file line number Diff line number Diff line change
@@ -1,42 +1,55 @@
namespace RGB.NET.Devices.Razer;
using System;

namespace RGB.NET.Devices.Razer;

/// <summary>
/// Represents a type of Razer SDK endpoint
/// </summary>
[Flags]
public enum RazerEndpointType
{
/// <summary>
/// No endpoint
/// </summary>
None = 0,

/// <summary>
/// The keyboard endpoint
/// </summary>
Keyboard,
Keyboard = 1 << 0,

/// <summary>
/// The laptop keyboard endpoint, shares the <see cref="Keyboard"/> endpoint but has a different LED layout
/// </summary>
LaptopKeyboard,
LaptopKeyboard = 1 << 1,

/// <summary>
/// The mouse endpoint
/// </summary>
Mouse,
Mouse = 1 << 2,

/// <summary>
/// The headset endpoint
/// </summary>
Headset,
Headset = 1 << 3,

/// <summary>
/// The mousepad endpoint
/// </summary>
Mousepad,
Mousepad = 1 << 4,

/// <summary>
/// The keypad endpoint
/// </summary>
Keypad,
Keypad = 1 << 5,

/// <summary>
/// The Chroma Link endpoint
/// </summary>
ChromaLink,
}
ChromaLink = 1 << 6,

/// <summary>
/// All endpoints
/// </summary>
All = ~None
}
24 changes: 15 additions & 9 deletions RGB.NET.Devices.Razer/RazerDeviceProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public static RazerDeviceProvider Instance
/// <summary>
/// Forces to load the devices represented by the emulator even if they aren't reported to exist.
/// </summary>
public bool LoadEmulatorDevices { get; set; } = false;
public RazerEndpointType LoadEmulatorDevices { get; set; } = RazerEndpointType.None;

private const int VENDOR_ID = 0x1532;

Expand Down Expand Up @@ -216,6 +216,7 @@ public static RazerDeviceProvider Instance
{ 0x008F, RGBDeviceType.Mouse, "Naga Pro", LedMappings.Mouse, RazerEndpointType.Mouse }, //this is via usb connection
{ 0x0090, RGBDeviceType.Mouse, "Naga Pro", LedMappings.Mouse, RazerEndpointType.Mouse }, //this is via bluetooth connection
{ 0x0091, RGBDeviceType.Mouse, "Viper 8khz", LedMappings.Mouse, RazerEndpointType.Mouse },
{ 0x0093, RGBDeviceType.Mouse, "Naga Classic", LedMappings.Mouse, RazerEndpointType.Mouse },
{ 0x0094, RGBDeviceType.Mouse, "Orochi V2", LedMappings.Mouse, RazerEndpointType.Mouse },
{ 0x0096, RGBDeviceType.Mouse, "Naga X", LedMappings.Mouse, RazerEndpointType.Mouse },
{ 0x0099, RGBDeviceType.Mouse, "Basilisk v3", LedMappings.Mouse, RazerEndpointType.Mouse },
Expand Down Expand Up @@ -312,21 +313,26 @@ protected override IEnumerable<IRGBDevice> GetLoadedDevices(RGBDeviceType loadFi
{
DeviceDefinitions.LoadFilter = loadFilter;

IList<IRGBDevice> devices = base.GetLoadedDevices(loadFilter).ToList();
List<IRGBDevice> devices = base.GetLoadedDevices(loadFilter).ToList();

if (LoadEmulatorDevices)
if (LoadEmulatorDevices != RazerEndpointType.None)
{
if (loadFilter.HasFlag(RGBDeviceType.Keyboard) && devices.All(d => d is not RazerKeyboardRGBDevice))
if (loadFilter.HasFlag(RGBDeviceType.Keyboard) && (LoadEmulatorDevices.HasFlag(RazerEndpointType.Keyboard) || LoadEmulatorDevices.HasFlag(RazerEndpointType.LaptopKeyboard)) && devices.All(d => d is not RazerKeyboardRGBDevice))
devices.Add(new RazerKeyboardRGBDevice(new RazerKeyboardRGBDeviceInfo("Emulator Keyboard", RazerEndpointType.Keyboard), GetUpdateTrigger(), LedMappings.Keyboard));
if (loadFilter.HasFlag(RGBDeviceType.Mouse) && devices.All(d => d is not RazerMouseRGBDevice))

if (loadFilter.HasFlag(RGBDeviceType.Mouse) && LoadEmulatorDevices.HasFlag(RazerEndpointType.Mouse) && devices.All(d => d is not RazerMouseRGBDevice))
devices.Add(new RazerMouseRGBDevice(new RazerRGBDeviceInfo(RGBDeviceType.Mouse, RazerEndpointType.Mouse, "Emulator Mouse"), GetUpdateTrigger(), LedMappings.Mouse));
if (loadFilter.HasFlag(RGBDeviceType.Headset) && devices.All(d => d is not RazerHeadsetRGBDevice))

if (loadFilter.HasFlag(RGBDeviceType.Headset) && LoadEmulatorDevices.HasFlag(RazerEndpointType.Headset) && devices.All(d => d is not RazerHeadsetRGBDevice))
devices.Add(new RazerHeadsetRGBDevice(new RazerRGBDeviceInfo(RGBDeviceType.Headset, RazerEndpointType.Headset, "Emulator Headset"), GetUpdateTrigger()));
if (loadFilter.HasFlag(RGBDeviceType.Mousepad) && devices.All(d => d is not RazerMousepadRGBDevice))

if (loadFilter.HasFlag(RGBDeviceType.Mousepad) && LoadEmulatorDevices.HasFlag(RazerEndpointType.Mousepad) && devices.All(d => d is not RazerMousepadRGBDevice))
devices.Add(new RazerMousepadRGBDevice(new RazerRGBDeviceInfo(RGBDeviceType.Mousepad, RazerEndpointType.Mousepad, "Emulator Mousepad"), GetUpdateTrigger()));
if (loadFilter.HasFlag(RGBDeviceType.Keypad) && devices.All(d => d is not RazerMousepadRGBDevice))

if (loadFilter.HasFlag(RGBDeviceType.Keypad) && LoadEmulatorDevices.HasFlag(RazerEndpointType.Keypad) && devices.All(d => d is not RazerMousepadRGBDevice))
devices.Add(new RazerKeypadRGBDevice(new RazerRGBDeviceInfo(RGBDeviceType.Keypad, RazerEndpointType.Keypad, "Emulator Keypad"), GetUpdateTrigger()));
if (loadFilter.HasFlag(RGBDeviceType.Unknown) && devices.All(d => d is not RazerChromaLinkRGBDevice))

if (loadFilter.HasFlag(RGBDeviceType.Unknown) && LoadEmulatorDevices.HasFlag(RazerEndpointType.ChromaLink) && devices.All(d => d is not RazerChromaLinkRGBDevice))
devices.Add(new RazerChromaLinkRGBDevice(new RazerRGBDeviceInfo(RGBDeviceType.Unknown, RazerEndpointType.ChromaLink, "Emulator Chroma Link"), GetUpdateTrigger()));
}

Expand Down
Loading
Loading