mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
Compare commits
37 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
01630dc195 | ||
|
|
8ff9d1203b | ||
|
|
0eb31b75a1 | ||
|
|
675317dcc1 | ||
|
|
2ed6f1fefb | ||
|
|
b80a069220 | ||
|
|
652ed23bed | ||
|
|
6a71fe5665 | ||
|
|
3129741fcd | ||
|
|
c2db0fc36d | ||
|
|
810d2e5f75 | ||
|
|
977ced629d | ||
|
|
ce76537687 | ||
|
|
ce3ccf965b | ||
|
|
7b1e088f0b | ||
|
|
7e79da221e | ||
|
|
35c7f4283e | ||
|
|
d0d409b37f | ||
|
|
1c1cdf1bec | ||
|
|
d177fac656 | ||
|
|
7591eb1043 | ||
|
|
fd66254130 | ||
|
|
f8efcb047a | ||
|
|
aaf2fb15f4 | ||
|
|
e68c29fc6f | ||
|
|
5ddc93d275 | ||
|
|
fe6f3bc3bf | ||
|
|
9bf31c3235 | ||
|
|
0f333e90c3 | ||
|
|
33c4406f95 | ||
|
|
2abae6ac86 | ||
|
|
c795807c75 | ||
|
|
16bdb5d32a | ||
|
|
773c50579c | ||
|
|
59bfe845c6 | ||
|
|
95909bd951 | ||
|
|
ac89645476 |
4
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
4
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
@@ -16,10 +16,6 @@ body:
|
||||
required: true
|
||||
validations:
|
||||
required: true
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
<b>NOTICE:</b> Issues like "my fans are not working properly" will be closed without answer. Neither G-Helper nor Armoury don't control fans in realtime anyhow. Fans are <b>always</b> controlled by BIOS, even when you set a custom fan curve.
|
||||
- type: textarea
|
||||
id: description
|
||||
attributes:
|
||||
|
||||
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
@@ -19,7 +19,7 @@ jobs:
|
||||
uses: actions/setup-dotnet@v3
|
||||
with:
|
||||
dotnet-version: |
|
||||
7.0.x
|
||||
8.0.x
|
||||
- name: Build
|
||||
run: |
|
||||
dotnet build app/GHelper.sln
|
||||
|
||||
6
.github/workflows/release.yml
vendored
6
.github/workflows/release.yml
vendored
@@ -18,13 +18,13 @@ jobs:
|
||||
uses: actions/setup-dotnet@v3
|
||||
with:
|
||||
dotnet-version: |
|
||||
7.0.x
|
||||
8.0.x
|
||||
- name: Publish
|
||||
run: |
|
||||
dotnet publish app/GHelper.sln --configuration Release --runtime win-x64 -p:PublishSingleFile=true --no-self-contained
|
||||
powershell Compress-Archive app/bin/x64/Release/net7.0-windows/win-x64/publish/GHelper.exe GHelper.zip
|
||||
powershell Compress-Archive app/bin/x64/Release/net8.0-windows/win-x64/publish/GHelper.exe GHelper.zip
|
||||
- name: Upload
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
run: |
|
||||
gh release upload ${{ github.ref_name }} app/bin/x64/Release/net7.0-windows/win-x64/publish/GHelper.exe GHelper.zip
|
||||
gh release upload ${{ github.ref_name }} app/bin/x64/Release/net8.0-windows/win-x64/publish/GHelper.exe GHelper.zip
|
||||
|
||||
@@ -140,7 +140,7 @@ namespace GHelper.AnimeMatrix
|
||||
|
||||
if (deviceSlash is not null)
|
||||
{
|
||||
deviceSlash.SetLidMode(matrixLid);
|
||||
deviceSlash.SetLidMode(true);
|
||||
}
|
||||
|
||||
if (matrixLid || force)
|
||||
|
||||
@@ -417,7 +417,7 @@ public static class AppConfig
|
||||
|
||||
public static bool IsOLED()
|
||||
{
|
||||
return ContainsModel("OLED") || IsSlash() || ContainsModel("M7600") || ContainsModel("UX64") || ContainsModel("UX34") || ContainsModel("UX53") || ContainsModel("K360") || ContainsModel("X150") || ContainsModel("M350") || ContainsModel("K650") || ContainsModel("UM53") || ContainsModel("K660") || ContainsModel("UX84") || ContainsModel("M650") || ContainsModel("K340") || ContainsModel("K350") || ContainsModel("M140") || ContainsModel("UM340") || ContainsModel("S540");
|
||||
return ContainsModel("OLED") || IsSlash() || ContainsModel("M7600") || ContainsModel("UX64") || ContainsModel("UX34") || ContainsModel("UX53") || ContainsModel("K360") || ContainsModel("X150") || ContainsModel("M350") || ContainsModel("K650") || ContainsModel("UM53") || ContainsModel("K660") || ContainsModel("UX84") || ContainsModel("M650") || ContainsModel("K340") || ContainsModel("K350") || ContainsModel("M140") || ContainsModel("UM340") || ContainsModel("S540") || ContainsModel("M7400");
|
||||
}
|
||||
|
||||
public static bool IsNoOverdrive()
|
||||
@@ -527,7 +527,7 @@ public static class AppConfig
|
||||
|
||||
public static bool NoAutoUltimate()
|
||||
{
|
||||
return ContainsModel("G614") || ContainsModel("GU604") || ContainsModel("FX507") || ContainsModel("G513") || ContainsModel("FA617") || ContainsModel("G834") || ContainsModel("GA403") || ContainsModel("GU605");
|
||||
return ContainsModel("G614") || ContainsModel("GU604") || ContainsModel("FX507") || ContainsModel("G513") || ContainsModel("FA617") || ContainsModel("G834") || ContainsModel("GA403") || ContainsModel("GU605") || ContainsModel("GU603VV");
|
||||
}
|
||||
|
||||
|
||||
@@ -657,4 +657,9 @@ public static class AppConfig
|
||||
return IsSlash() || ContainsModel("JIR") || ContainsModel("JZR") || ContainsModel("JVR") || ContainsModel("JYR") || ContainsModel("FA607P") || ContainsModel("FX607J") || ContainsModel("FA507U");
|
||||
}
|
||||
|
||||
public static bool IsForceMiniled()
|
||||
{
|
||||
return ContainsModel("G834JYR") || Is("force_miniled");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -60,6 +60,13 @@ namespace GHelper.Display
|
||||
}
|
||||
}
|
||||
|
||||
SetMiniled(miniled);
|
||||
|
||||
InitScreen();
|
||||
}
|
||||
|
||||
public void SetMiniled(int miniled = -1)
|
||||
{
|
||||
if (miniled >= 0)
|
||||
{
|
||||
if (Program.acpi.DeviceGet(AsusACPI.ScreenMiniled1) >= 0)
|
||||
@@ -70,8 +77,12 @@ namespace GHelper.Display
|
||||
Thread.Sleep(100);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
InitScreen();
|
||||
public void InitMiniled()
|
||||
{
|
||||
if (AppConfig.IsForceMiniled())
|
||||
SetMiniled(AppConfig.Get("miniled"));
|
||||
}
|
||||
|
||||
public void ToogleFHD()
|
||||
|
||||
13
app/Extra.Designer.cs
generated
13
app/Extra.Designer.cs
generated
@@ -791,30 +791,35 @@ namespace GHelper
|
||||
tableBacklight.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 25F));
|
||||
tableBacklight.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 25F));
|
||||
tableBacklight.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 25F));
|
||||
tableBacklight.Controls.Add(checkBatteryLogo, 0, 5);
|
||||
tableBacklight.Controls.Add(checkBattery, 0, 5);
|
||||
tableBacklight.Controls.Add(checkBatteryLid, 0, 5);
|
||||
tableBacklight.Controls.Add(checkBatteryBar, 0, 5);
|
||||
|
||||
tableBacklight.Controls.Add(labelBacklightKeyboard, 0, 0);
|
||||
tableBacklight.Controls.Add(checkAwake, 0, 1);
|
||||
tableBacklight.Controls.Add(checkBoot, 0, 2);
|
||||
tableBacklight.Controls.Add(checkSleep, 0, 3);
|
||||
tableBacklight.Controls.Add(checkShutdown, 0, 4);
|
||||
tableBacklight.Controls.Add(checkBattery, 0, 5);
|
||||
|
||||
tableBacklight.Controls.Add(labelBacklightLogo, 1, 0);
|
||||
tableBacklight.Controls.Add(checkAwakeLogo, 1, 1);
|
||||
tableBacklight.Controls.Add(checkBootLogo, 1, 2);
|
||||
tableBacklight.Controls.Add(checkSleepLogo, 1, 3);
|
||||
tableBacklight.Controls.Add(checkShutdownLogo, 1, 4);
|
||||
tableBacklight.Controls.Add(checkBatteryLogo, 1, 5);
|
||||
|
||||
tableBacklight.Controls.Add(labelBacklightBar, 2, 0);
|
||||
tableBacklight.Controls.Add(checkAwakeBar, 2, 1);
|
||||
tableBacklight.Controls.Add(checkBootBar, 2, 2);
|
||||
tableBacklight.Controls.Add(checkSleepBar, 2, 3);
|
||||
tableBacklight.Controls.Add(checkShutdownBar, 2, 4);
|
||||
tableBacklight.Controls.Add(checkBatteryBar, 2, 5);
|
||||
|
||||
tableBacklight.Controls.Add(labelBacklightLid, 3, 0);
|
||||
tableBacklight.Controls.Add(checkAwakeLid, 3, 1);
|
||||
tableBacklight.Controls.Add(checkBootLid, 3, 2);
|
||||
tableBacklight.Controls.Add(checkSleepLid, 3, 3);
|
||||
tableBacklight.Controls.Add(checkShutdownLid, 3, 4);
|
||||
tableBacklight.Controls.Add(checkBatteryLid, 3, 5);
|
||||
|
||||
tableBacklight.Dock = DockStyle.Top;
|
||||
tableBacklight.Location = new Point(0, 5);
|
||||
tableBacklight.Margin = new Padding(0);
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<TargetFramework>net7.0-windows</TargetFramework>
|
||||
<TargetFramework>net8.0-windows</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<UseWindowsForms>True</UseWindowsForms>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
@@ -15,7 +15,7 @@
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<ProduceReferenceAssembly>False</ProduceReferenceAssembly>
|
||||
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
|
||||
<AssemblyVersion>0.177</AssemblyVersion>
|
||||
<AssemblyVersion>0.180</AssemblyVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
||||
@@ -62,7 +62,7 @@
|
||||
<PackageReference Include="HidSharpCore" Version="1.2.1.1" />
|
||||
<PackageReference Include="NAudio" Version="2.1.0" />
|
||||
<PackageReference Include="NvAPIWrapper.Net" Version="0.8.1.101" />
|
||||
<PackageReference Include="System.Management" Version="7.0.1" />
|
||||
<PackageReference Include="System.Management" Version="8.0.0" />
|
||||
<PackageReference Include="TaskScheduler" Version="2.10.1" />
|
||||
<PackageReference Include="WinForms.DataVisualization" Version="1.8.0" />
|
||||
</ItemGroup>
|
||||
@@ -71,18 +71,6 @@
|
||||
<Content Include="Resources\eco.ico">
|
||||
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Resources\icons8-charging-battery-48.png">
|
||||
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Resources\icons8-laptop-48.png">
|
||||
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Resources\icons8-speed-48.png">
|
||||
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Resources\icons8-video-card-48.png">
|
||||
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Resources\ultimate.ico">
|
||||
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
|
||||
</Content>
|
||||
|
||||
@@ -108,6 +108,9 @@ namespace GHelper.Helpers
|
||||
if (Program.settingsForm.Visible)
|
||||
Program.screenControl.InitScreen();
|
||||
|
||||
if (AppConfig.IsForceMiniled())
|
||||
Program.screenControl.InitMiniled();
|
||||
|
||||
}
|
||||
|
||||
private static int CheckAndSaveLidAction()
|
||||
|
||||
124
app/Peripherals/Mouse/Models/KerisIIAce.cs
Normal file
124
app/Peripherals/Mouse/Models/KerisIIAce.cs
Normal file
@@ -0,0 +1,124 @@
|
||||
namespace GHelper.Peripherals.Mouse.Models
|
||||
{
|
||||
|
||||
public class KerisIIAceWired : AsusMouse
|
||||
{
|
||||
public KerisIIAceWired() : base(0x0B05, 0x1B16, "mi_00", true)
|
||||
{
|
||||
}
|
||||
|
||||
protected KerisIIAceWired(ushort vendorId, bool wireless) : base(0x0B05, vendorId, "mi_00", wireless)
|
||||
{
|
||||
}
|
||||
|
||||
public override int DPIProfileCount()
|
||||
{
|
||||
return 4;
|
||||
}
|
||||
|
||||
public override string GetDisplayName()
|
||||
{
|
||||
return "ROG Keris II Ace";
|
||||
}
|
||||
|
||||
|
||||
public override PollingRate[] SupportedPollingrates()
|
||||
{
|
||||
return new PollingRate[] {
|
||||
PollingRate.PR125Hz,
|
||||
PollingRate.PR250Hz,
|
||||
PollingRate.PR500Hz,
|
||||
PollingRate.PR1000Hz
|
||||
};
|
||||
}
|
||||
|
||||
public override int ProfileCount()
|
||||
{
|
||||
return 5;
|
||||
}
|
||||
public override int MaxDPI()
|
||||
{
|
||||
return 42_000;
|
||||
}
|
||||
|
||||
public override bool HasLiftOffSetting()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool HasRGB()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool HasXYDPI()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
public override bool IsLightingModeSupported(LightingMode lightingMode)
|
||||
{
|
||||
return lightingMode == LightingMode.Static
|
||||
|| lightingMode == LightingMode.Breathing
|
||||
|| lightingMode == LightingMode.ColorCycle
|
||||
|| lightingMode == LightingMode.BatteryState
|
||||
|| lightingMode == LightingMode.React;
|
||||
}
|
||||
|
||||
public override bool HasAutoPowerOff()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool HasAngleSnapping()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool HasAngleTuning()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool HasLowBatteryWarning()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool HasDPIColors()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
protected override PollingRate ParsePollingRate(byte[] packet)
|
||||
{
|
||||
if (packet[1] == 0x12 && packet[2] == 0x04 && packet[3] == 0x00)
|
||||
{
|
||||
if ((int)packet[13] > 7)
|
||||
return (PollingRate)packet[13] - 96;
|
||||
return (PollingRate)packet[13];
|
||||
}
|
||||
|
||||
return PollingRate.PR125Hz;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
*
|
||||
Mouse uses Omni Reciever
|
||||
public class KerisIIAce : KerisIIAce
|
||||
{
|
||||
public KerisIIAce() : base(0xAAAA, false)
|
||||
{
|
||||
}
|
||||
|
||||
public override string GetDisplayName()
|
||||
{
|
||||
return "ROG Keris II Ace (Wired)";
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
}
|
||||
218
app/Peripherals/Mouse/Models/Pugio.cs
Normal file
218
app/Peripherals/Mouse/Models/Pugio.cs
Normal file
@@ -0,0 +1,218 @@
|
||||
namespace GHelper.Peripherals.Mouse.Models
|
||||
{
|
||||
//P503
|
||||
public class Pugio : AsusMouse
|
||||
{
|
||||
public Pugio() : base(0x0B05, 0x1846, "mi_02", false)
|
||||
{
|
||||
}
|
||||
|
||||
public override int DPIProfileCount()
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
|
||||
public override string GetDisplayName()
|
||||
{
|
||||
return "ROG Pugio";
|
||||
}
|
||||
|
||||
public override PollingRate[] SupportedPollingrates()
|
||||
{
|
||||
return new PollingRate[] {
|
||||
PollingRate.PR125Hz,
|
||||
PollingRate.PR250Hz,
|
||||
PollingRate.PR500Hz,
|
||||
PollingRate.PR1000Hz
|
||||
};
|
||||
}
|
||||
|
||||
public override int ProfileCount()
|
||||
{
|
||||
return 3;
|
||||
}
|
||||
public override int MaxDPI()
|
||||
{
|
||||
return 7_200;
|
||||
}
|
||||
public override int DPIIncrements()
|
||||
{
|
||||
return 50;
|
||||
}
|
||||
|
||||
public override int MinDPI()
|
||||
{
|
||||
return 50;
|
||||
}
|
||||
|
||||
public override bool HasLiftOffSetting()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool HasRGB()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool HasAngleSnapping()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool CanChangeDPIProfile()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool HasBattery()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool HasAutoPowerOff()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
//00 12 04 00 00 1f 00 07 00 [03] 00 02 00 00 00
|
||||
protected override PollingRate ParsePollingRate(byte[] packet)
|
||||
{
|
||||
if (packet[1] == 0x12 && packet[2] == 0x04 && packet[3] == 0x00)
|
||||
{
|
||||
return (PollingRate)packet[9];
|
||||
}
|
||||
|
||||
return PollingRate.PR125Hz;
|
||||
}
|
||||
|
||||
public override int MaxBrightness()
|
||||
{
|
||||
return 4;
|
||||
}
|
||||
|
||||
public override LightingZone[] SupportedLightingZones()
|
||||
{
|
||||
return new LightingZone[] { LightingZone.Logo, LightingZone.Scrollwheel, LightingZone.Underglow };
|
||||
}
|
||||
|
||||
public override bool IsLightingModeSupported(LightingMode lightingMode)
|
||||
{
|
||||
return lightingMode == LightingMode.Static
|
||||
|| lightingMode == LightingMode.Breathing
|
||||
|| lightingMode == LightingMode.ColorCycle
|
||||
|| lightingMode == LightingMode.Rainbow
|
||||
|| lightingMode == LightingMode.React
|
||||
|| lightingMode == LightingMode.Comet;
|
||||
}
|
||||
|
||||
protected override byte[] GetUpdateLightingModePacket(LightingSetting lightingSetting, LightingZone zone)
|
||||
{
|
||||
// 00 51 28 03 00 00 04 00 ff 40 00 00 00 00 00 00 00 00 00 00
|
||||
|
||||
/*
|
||||
* This mouse uses different speed values for rainbow mode compared to others.
|
||||
* 00 51 28 03 00 03 04 FF 00 00 00 00 [8C] 00 00 00 00
|
||||
* 00 51 28 03 00 03 04 FF 00 00 00 00 [64] 00 00 00 00
|
||||
* 00 51 28 03 00 03 04 FF 00 00 00 00 [3F] 00 00 00 00
|
||||
*/
|
||||
|
||||
if (lightingSetting.LightingMode == LightingMode.Rainbow)
|
||||
{
|
||||
byte speed = 0x3F;
|
||||
|
||||
switch (lightingSetting.AnimationSpeed)
|
||||
{
|
||||
case AnimationSpeed.Slow:
|
||||
speed = 0x3F;
|
||||
break;
|
||||
case AnimationSpeed.Medium:
|
||||
speed = 0x64;
|
||||
break;
|
||||
case AnimationSpeed.Fast:
|
||||
speed = 0x8C;
|
||||
break;
|
||||
}
|
||||
|
||||
return new byte[] { reportId, 0x51, 0x28, (byte)zone, 0x00,
|
||||
IndexForLightingMode(lightingSetting.LightingMode),
|
||||
(byte)lightingSetting.Brightness,
|
||||
0xFF, 0x00, 0x00,
|
||||
(byte)(SupportsAnimationDirection(lightingSetting.LightingMode) ? lightingSetting.AnimationDirection : 0x00),
|
||||
(byte)((lightingSetting.RandomColor && SupportsRandomColor(lightingSetting.LightingMode)) ? 0x01: 0x00),
|
||||
(byte)(SupportsAnimationSpeed(lightingSetting.LightingMode) ? speed : 0x00)
|
||||
};
|
||||
}
|
||||
|
||||
return base.GetUpdateLightingModePacket(lightingSetting, zone);
|
||||
}
|
||||
|
||||
protected override byte[] GetReadLightingModePacket(LightingZone zone)
|
||||
{
|
||||
return new byte[] { 0x00, 0x12, 0x03, 0x00 };
|
||||
}
|
||||
|
||||
protected LightingSetting? ParseLightingSetting(byte[] packet, LightingZone zone)
|
||||
{
|
||||
if (packet[1] != 0x12 || packet[2] != 0x03)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
int offset = 5 + (((int)zone) * 5);
|
||||
|
||||
LightingSetting setting = new LightingSetting();
|
||||
|
||||
setting.LightingMode = LightingModeForIndex(packet[offset + 0]);
|
||||
setting.Brightness = packet[offset + 1];
|
||||
|
||||
setting.RGBColor = Color.FromArgb(packet[offset + 2], packet[offset + 3], packet[offset + 4]);
|
||||
|
||||
|
||||
return setting;
|
||||
}
|
||||
|
||||
public override void ReadLightingSetting()
|
||||
{
|
||||
if (!HasRGB())
|
||||
{
|
||||
return;
|
||||
}
|
||||
//Mouse sends all lighting zones in one response (0x19) Direction, Random col, Speed
|
||||
//00 12 03 00 00 [03 04 00 00 00] [03 04 00 00 00] [03 04 00 00 00] 01 [00] [00] [8c] 00
|
||||
//00 12 03 00 00 [00 04 00 00 00] [00 04 00 00 00] [00 04 00 00 00] 01 [00] [00] [00] 00
|
||||
byte[]? response = WriteForResponse(GetReadLightingModePacket(LightingZone.All));
|
||||
if (response is null) return;
|
||||
|
||||
LightingZone[] lz = SupportedLightingZones();
|
||||
for (int i = 0; i < lz.Length; ++i)
|
||||
{
|
||||
LightingSetting? ls = ParseLightingSetting(response, lz[i]);
|
||||
if (ls is null)
|
||||
{
|
||||
Logger.WriteLine(GetDisplayName() + ": Failed to read RGB Setting for Zone " + lz[i].ToString());
|
||||
continue;
|
||||
}
|
||||
ls.AnimationDirection = SupportsAnimationDirection(ls.LightingMode)
|
||||
? (AnimationDirection)response[21]
|
||||
: AnimationDirection.Clockwise;
|
||||
|
||||
ls.RandomColor = SupportsRandomColor(ls.LightingMode) && response[22] == 0x01;
|
||||
|
||||
ls.AnimationSpeed = SupportsAnimationSpeed(ls.LightingMode)
|
||||
? (AnimationSpeed)response[23]
|
||||
: AnimationSpeed.Medium;
|
||||
|
||||
if (ls.AnimationSpeed != AnimationSpeed.Fast
|
||||
&& ls.AnimationSpeed != AnimationSpeed.Medium
|
||||
&& ls.AnimationSpeed != AnimationSpeed.Slow)
|
||||
{
|
||||
ls.AnimationSpeed = AnimationSpeed.Medium;
|
||||
}
|
||||
|
||||
Logger.WriteLine(GetDisplayName() + ": Read RGB Setting for Zone " + lz[i].ToString() + ": " + ls.ToString());
|
||||
LightingSetting[i] = ls;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -130,5 +130,40 @@
|
||||
return 100;
|
||||
}
|
||||
|
||||
public override int MaxDPI()
|
||||
{
|
||||
return 8_000;
|
||||
}
|
||||
|
||||
public override int MinDPI()
|
||||
{
|
||||
return 100;
|
||||
}
|
||||
|
||||
public override int DPIIncrements()
|
||||
{
|
||||
return 50;
|
||||
}
|
||||
|
||||
public override bool HasDPIColors()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
protected override int ParseDPIProfile(byte[] packet)
|
||||
{
|
||||
return base.ParseDPIProfile(packet) + 1;
|
||||
}
|
||||
|
||||
protected override byte[] GetChangeDPIProfilePacket(int profile)
|
||||
{
|
||||
return new byte[] { reportId, 0x51, 0x31, 0x0A, 0x00, 0x04 };
|
||||
}
|
||||
|
||||
protected override byte[] GetChangeDPIProfilePacket2(int profile)
|
||||
{
|
||||
return new byte[] { reportId, 0x51, 0x31, 0x09, 0x00, (byte)(profile - 1) };
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,11 +42,6 @@
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool HasDebounceSetting()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool HasAngleSnapping()
|
||||
{
|
||||
return true;
|
||||
@@ -62,20 +57,10 @@
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool HasDPIColors()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public override int DPIIncrements()
|
||||
{
|
||||
return 100;
|
||||
}
|
||||
|
||||
public override bool CanChangeDPIProfile()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
{
|
||||
}
|
||||
|
||||
public TUFM4Wirelss(ushort productId) : base(0x0B05, productId, "mi_00", true)
|
||||
public TUFM4Wirelss(ushort productId, bool wireless) : base(0x0B05, productId, "mi_00", wireless)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
//P310
|
||||
public class TUFM4WirelssCN : TUFM4Wirelss
|
||||
{
|
||||
public TUFM4WirelssCN() : base(0x1A8D)
|
||||
public TUFM4WirelssCN() : base(0x1A8D, true)
|
||||
{
|
||||
|
||||
}
|
||||
@@ -101,4 +101,41 @@
|
||||
return "TX GAMING MOUSE (Wireless)";
|
||||
}
|
||||
}
|
||||
|
||||
//P519_Wireless
|
||||
public class TXGamingMini : TUFM4Wirelss
|
||||
{
|
||||
public TXGamingMini() : base(0x1AF5, true)
|
||||
{
|
||||
}
|
||||
|
||||
public TXGamingMini(ushort productId, bool wireless) : base(productId, wireless)
|
||||
{
|
||||
}
|
||||
|
||||
public override string GetDisplayName()
|
||||
{
|
||||
return "TX GAMING MOUSE Mini (Wireless)";
|
||||
}
|
||||
|
||||
public override bool HasXYDPI()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//P519_Wired
|
||||
public class TXGamingMiniWired : TXGamingMini
|
||||
{
|
||||
public TXGamingMiniWired() : base(0x1AF3, false)
|
||||
{
|
||||
}
|
||||
|
||||
public override string GetDisplayName()
|
||||
{
|
||||
return "TX GAMING MOUSE Mini (Wired)";
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -214,6 +214,7 @@ namespace GHelper.Peripherals
|
||||
DetectMouse(new TUFM5());
|
||||
DetectMouse(new KerisWirelssAimpoint());
|
||||
DetectMouse(new KerisWirelssAimpointWired());
|
||||
DetectMouse(new KerisIIAceWired());
|
||||
DetectMouse(new PugioII());
|
||||
DetectMouse(new PugioIIWired());
|
||||
DetectMouse(new StrixImpactII());
|
||||
@@ -225,6 +226,9 @@ namespace GHelper.Peripherals
|
||||
DetectMouse(new StrixCarry());
|
||||
DetectMouse(new StrixImpactIII());
|
||||
DetectMouse(new StrixImpact());
|
||||
DetectMouse(new TXGamingMini());
|
||||
DetectMouse(new TXGamingMiniWired());
|
||||
DetectMouse(new Pugio());
|
||||
}
|
||||
|
||||
public static void DetectMouse(AsusMouse am)
|
||||
|
||||
@@ -208,16 +208,17 @@ namespace GHelper
|
||||
|
||||
|
||||
|
||||
public static void SetAutoModes(bool powerChanged = false, bool init = false)
|
||||
public static bool SetAutoModes(bool powerChanged = false, bool init = false)
|
||||
{
|
||||
|
||||
if (Math.Abs(DateTimeOffset.Now.ToUnixTimeMilliseconds() - lastAuto) < 3000) return;
|
||||
if (Math.Abs(DateTimeOffset.Now.ToUnixTimeMilliseconds() - lastAuto) < 3000) return false;
|
||||
lastAuto = DateTimeOffset.Now.ToUnixTimeMilliseconds();
|
||||
|
||||
isPlugged = SystemInformation.PowerStatus.PowerLineStatus;
|
||||
Logger.WriteLine("AutoSetting for " + isPlugged.ToString());
|
||||
|
||||
BatteryControl.AutoBattery(init);
|
||||
if (init) screenControl.InitMiniled();
|
||||
|
||||
inputDispatcher.Init();
|
||||
|
||||
@@ -240,6 +241,8 @@ namespace GHelper
|
||||
{
|
||||
settingsForm.AutoKeyboard();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private static void SystemEvents_PowerModeChanged(object sender, PowerModeChangedEventArgs e)
|
||||
|
||||
@@ -674,7 +674,7 @@ namespace GHelper
|
||||
break;
|
||||
case 1:
|
||||
Logger.WriteLine("Monitor Power On");
|
||||
Program.SetAutoModes();
|
||||
if (!Program.SetAutoModes()) BatteryControl.AutoBattery();
|
||||
break;
|
||||
case 2:
|
||||
Logger.WriteLine("Monitor Dimmed");
|
||||
|
||||
@@ -241,20 +241,20 @@ namespace GHelper.USB
|
||||
}
|
||||
|
||||
|
||||
public static byte[] AuraMessage(AuraMode mode, Color color, Color color2, int speed, bool mono = false, byte zoneByte = 0x00)
|
||||
public static byte[] AuraMessage(AuraMode mode, Color color, Color color2, int speed, bool mono = false)
|
||||
{
|
||||
|
||||
byte[] msg = new byte[17];
|
||||
msg[0] = AsusHid.AURA_ID;
|
||||
msg[1] = 0xB3;
|
||||
msg[2] = zoneByte; // Zone
|
||||
msg[2] = 0x00; // Zone
|
||||
msg[3] = (byte)mode; // Aura Mode
|
||||
msg[4] = color.R; // R
|
||||
msg[5] = mono ? (byte)0 : color.G; // G
|
||||
msg[6] = mono ? (byte)0 : color.B; // B
|
||||
msg[7] = (byte)speed; // aura.speed as u8;
|
||||
msg[8] = 0x00; // aura.direction as u8;
|
||||
msg[9] = mode == AuraMode.AuraBreathe ? (byte)1 : (byte)0;
|
||||
msg[9] = (color.R == 0 && color.G == 0 && color.B == 0) ? (byte)0xFF : (byte)0x00; // random color flag
|
||||
msg[10] = color2.R; // R
|
||||
msg[11] = mono ? (byte)0 : color2.G; // G
|
||||
msg[12] = mono ? (byte)0 : color2.B; // B
|
||||
|
||||
@@ -7,15 +7,16 @@ namespace GHelper.USB
|
||||
{
|
||||
public static class XGM
|
||||
{
|
||||
const int XGM_ID = 0x1970;
|
||||
const int ASUS_ID = 0x0b05;
|
||||
|
||||
static int[] deviceIds = { 0x1970, 0x1a9a};
|
||||
|
||||
public static void Write(byte[] data)
|
||||
{
|
||||
HidDeviceLoader loader = new HidDeviceLoader();
|
||||
try
|
||||
{
|
||||
HidDevice device = loader.GetDevices(ASUS_ID, XGM_ID).Where(device => device.CanOpen && device.GetMaxFeatureReportLength() >= 300).FirstOrDefault();
|
||||
HidDevice device = loader.GetDevices(ASUS_ID).Where(device => deviceIds.Contains(device.ProductID) && device.CanOpen && device.GetMaxFeatureReportLength() >= 300).FirstOrDefault();
|
||||
|
||||
if (device is null)
|
||||
{
|
||||
|
||||
@@ -1,5 +1,2 @@
|
||||
{
|
||||
"sdk": {
|
||||
"version": "7.0.406"
|
||||
}
|
||||
}
|
||||
@@ -4,9 +4,11 @@
|
||||
[](https://GitHub.com/seerge/g-helper/releases/) [](https://GitHub.com/seerge/g-helper/stargazers/) <sup>[中文版点这里](https://github.com/seerge/g-helper/blob/main/docs/README.zh-CN.md)</sup>
|
||||
|
||||
Small and lightweight Armoury Crate alternative for Asus laptops offering almost same functionality without extra load and unnecessary services.
|
||||
|
||||
Works with all popular models, such as ROG Zephyrus G14, G15, G16, M16, Flow X13, Flow X16, Flow Z13, TUF Series, Strix / Scar Series, ProArt, Vivobook, Zenbook, ROG Ally and many more!
|
||||
|
||||
# [:floppy_disk:Download](https://github.com/seerge/g-helper/releases/latest/download/GHelper.zip)
|
||||
**⭐ If you like the app - please spread the word about it online**
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
@@ -103,19 +105,25 @@ Each BIOS mode is paired with matching Windows Power Mode. You can adjust this s
|
||||
- ROG Chakram X (P708)
|
||||
- ROG Chakram Core (P511)
|
||||
- ROG Gladius II and Gladius II Origin (P502 and P504)
|
||||
- ROG Gladius II Wireless
|
||||
- ROG Gladius III
|
||||
- ROG Gladius III Wireless
|
||||
- ROG Harpe Ace Aim Lab Edition
|
||||
- ROG Keris (P509)
|
||||
- ROG Keris Wireless
|
||||
- ROG Keris II Ace
|
||||
- ROG Strix Carry (P508)
|
||||
- ROG Strix III Gladius III Aimpoint Wireless (P711)
|
||||
- ROG Strix Impact III (P518)
|
||||
- ROG Spatha
|
||||
- ROG Strix Impact II Wireless
|
||||
- ROG Pugio
|
||||
- ROG Pugio II
|
||||
- TUF Gaming M4 Wireless (P306)
|
||||
- TUF Gaming M3
|
||||
- TUF Gaming M3 Gen II
|
||||
- TUF Gaming M4 AIR
|
||||
- TUF Gaming M5
|
||||
- TX Gaming Mini
|
||||
|
||||
Huge thanks to [@IceStormNG](https://github.com/IceStormNG) 👑 for contribution and research (!).
|
||||
|
||||
@@ -169,6 +177,6 @@ The role of G-Helper for your laptop is similar to the role of a remote control
|
||||
- [AsusCtl](https://gitlab.com/asus-linux/asusctl) for inspiration and some reverse engineering
|
||||
|
||||
### Disclaimers
|
||||
"ROG", "TUF", and "Armoury Crate" are trademarked by and belong to AsusTek Computer, Inc. I make no claims to these or any assets belonging to AsusTek Computer and use them purely for informational purposes only.
|
||||
"Asus", "ROG", "TUF", and "Armoury Crate" are trademarked by and belong to AsusTek Computer, Inc. I make no claims to these or any assets belonging to AsusTek Computer and use them purely for informational purposes only.
|
||||
|
||||
THE SOFTWARE IS PROVIDED “AS IS” AND WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. MISUSE OF THIS SOFTWARE COULD CAUSE SYSTEM INSTABILITY OR MALFUNCTION.
|
||||
|
||||
Reference in New Issue
Block a user