mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
Cleanup
This commit is contained in:
@@ -4,7 +4,6 @@ using System.Diagnostics;
|
|||||||
using System.Drawing.Drawing2D;
|
using System.Drawing.Drawing2D;
|
||||||
using System.Drawing.Imaging;
|
using System.Drawing.Imaging;
|
||||||
using System.Timers;
|
using System.Timers;
|
||||||
using static GHelper.AnimeMatrix.BuiltInAnimation;
|
|
||||||
|
|
||||||
namespace GHelper.AnimeMatrix
|
namespace GHelper.AnimeMatrix
|
||||||
{
|
{
|
||||||
@@ -36,7 +35,7 @@ namespace GHelper.AnimeMatrix
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (AppConfig.ContainsModel("GA403") || AppConfig.ContainsModel("GU605"))
|
if (AppConfig.IsSlash())
|
||||||
deviceSlash = new SlashDevice();
|
deviceSlash = new SlashDevice();
|
||||||
else
|
else
|
||||||
deviceMatrix = new AnimeMatrixDevice();
|
deviceMatrix = new AnimeMatrixDevice();
|
||||||
@@ -165,9 +164,9 @@ namespace GHelper.AnimeMatrix
|
|||||||
private void SetBuiltIn(int running)
|
private void SetBuiltIn(int running)
|
||||||
{
|
{
|
||||||
BuiltInAnimation animation = new BuiltInAnimation(
|
BuiltInAnimation animation = new BuiltInAnimation(
|
||||||
(Running)running,
|
(BuiltInAnimation.Running)running,
|
||||||
Sleeping.Starfield,
|
BuiltInAnimation.Sleeping.Starfield,
|
||||||
Shutdown.SeeYa,
|
BuiltInAnimation.Shutdown.SeeYa,
|
||||||
BuiltInAnimation.Startup.StaticEmergence
|
BuiltInAnimation.Startup.StaticEmergence
|
||||||
);
|
);
|
||||||
deviceMatrix.SetBuiltInAnimation(true, animation);
|
deviceMatrix.SetBuiltInAnimation(true, animation);
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using GHelper.AnimeMatrix.Communication;
|
using GHelper.AnimeMatrix.Communication;
|
||||||
using GHelper.Mode;
|
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
namespace GHelper.AnimeMatrix
|
namespace GHelper.AnimeMatrix
|
||||||
@@ -38,10 +37,10 @@ namespace GHelper.AnimeMatrix
|
|||||||
{ SlashMode.Bounce, "Bounce"},
|
{ SlashMode.Bounce, "Bounce"},
|
||||||
{ SlashMode.Slash, "Slash"},
|
{ SlashMode.Slash, "Slash"},
|
||||||
{ SlashMode.Loading, "Loading"},
|
{ SlashMode.Loading, "Loading"},
|
||||||
|
|
||||||
{ SlashMode.BitStream, "Bit Stream"},
|
{ SlashMode.BitStream, "Bit Stream"},
|
||||||
{ SlashMode.Transmission, "Transmission"},
|
{ SlashMode.Transmission, "Transmission"},
|
||||||
|
|
||||||
{ SlashMode.Flow, "Flow"},
|
{ SlashMode.Flow, "Flow"},
|
||||||
{ SlashMode.Flux, "Flux"},
|
{ SlashMode.Flux, "Flux"},
|
||||||
{ SlashMode.Phantom, "Phantom"},
|
{ SlashMode.Phantom, "Phantom"},
|
||||||
@@ -106,7 +105,8 @@ namespace GHelper.AnimeMatrix
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
modeByte = modeCodes[mode];
|
modeByte = modeCodes[mode];
|
||||||
} catch (Exception)
|
}
|
||||||
|
catch (Exception)
|
||||||
{
|
{
|
||||||
modeByte = 0x00;
|
modeByte = 0x00;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ public static class AppConfig
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_model.Contains("GA402")) _model = "ROG Zephyrus G14 GA403UI"; // Debug Purposes
|
//if (_model.Contains("GA402RK")) _model = "ROG Zephyrus G14 GA403UI"; // Debug Purposes
|
||||||
|
|
||||||
return _model;
|
return _model;
|
||||||
}
|
}
|
||||||
@@ -379,9 +379,14 @@ public static class AppConfig
|
|||||||
return ContainsModel("GA401") || ContainsModel("FX517Z") || ContainsModel("FX516P") || ContainsModel("X13") || IsARCNM() || ContainsModel("GA502IU");
|
return ContainsModel("GA401") || ContainsModel("FX517Z") || ContainsModel("FX516P") || ContainsModel("X13") || IsARCNM() || ContainsModel("GA502IU");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static bool IsSlash()
|
||||||
|
{
|
||||||
|
return ContainsModel("GA403") || ContainsModel("GU605");
|
||||||
|
}
|
||||||
|
|
||||||
public static bool IsInputBacklight()
|
public static bool IsInputBacklight()
|
||||||
{
|
{
|
||||||
return ContainsModel("GA503") || ContainsModel("GA403");
|
return ContainsModel("GA503") || IsSlash();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static bool IsStrix()
|
public static bool IsStrix()
|
||||||
|
|||||||
@@ -294,7 +294,10 @@ namespace GHelper.USB
|
|||||||
if (delay) await Task.Delay(TimeSpan.FromSeconds(1));
|
if (delay) await Task.Delay(TimeSpan.FromSeconds(1));
|
||||||
if (isACPI) Program.acpi.TUFKeyboardBrightness(brightness);
|
if (isACPI) Program.acpi.TUFKeyboardBrightness(brightness);
|
||||||
|
|
||||||
AsusHid.WriteInput(new byte[] { AsusHid.INPUT_ID, 0xBA, 0xC5, 0xC4, (byte)brightness }, log);
|
if (AppConfig.IsInputBacklight())
|
||||||
|
AsusHid.WriteInput(new byte[] { AsusHid.INPUT_ID, 0xBA, 0xC5, 0xC4, (byte)brightness }, log);
|
||||||
|
else
|
||||||
|
AsusHid.Write(new byte[] { AsusHid.AURA_ID, 0xBA, 0xC5, 0xC4, (byte)brightness }, log);
|
||||||
|
|
||||||
if (AppConfig.IsAlly()) ApplyAura();
|
if (AppConfig.IsAlly()) ApplyAura();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user