diff --git a/app/AnimeMatrix/AniMatrixControl.cs b/app/AnimeMatrix/AniMatrixControl.cs index e6c93490..40c418e1 100644 --- a/app/AnimeMatrix/AniMatrixControl.cs +++ b/app/AnimeMatrix/AniMatrixControl.cs @@ -19,6 +19,7 @@ namespace GHelper.AnimeMatrix public SlashDevice? deviceSlash; public static bool lidClose = false; + private static bool _wakeUp = false; double[]? AudioValues; WasapiCapture? AudioDevice; @@ -91,15 +92,21 @@ namespace GHelper.AnimeMatrix return; } - if (wakeUp) deviceSlash.WakeUp(); + if (wakeUp) _wakeUp = true; if (brightness == 0 || (auto && SystemInformation.PowerStatus.PowerLineStatus != PowerLineStatus.Online) || (lid && lidClose)) { - //deviceSlash.Init(); + deviceSlash.Init(); deviceSlash.SetOptions(false, 0, 0); } else { + if (_wakeUp) + { + deviceSlash.WakeUp(); + _wakeUp = false; + } + deviceSlash.Init(); deviceSlash.SetMode((SlashMode)running); deviceSlash.SetOptions(true, brightness, inteval); diff --git a/app/AnimeMatrix/SlashDevice.cs b/app/AnimeMatrix/SlashDevice.cs index bcc9216d..4f4c0c38 100644 --- a/app/AnimeMatrix/SlashDevice.cs +++ b/app/AnimeMatrix/SlashDevice.cs @@ -84,18 +84,18 @@ namespace GHelper.AnimeMatrix public void WakeUp() { - Set(Packet(Encoding.ASCII.GetBytes("ASUS Tech.Inc."))); + Set(Packet(Encoding.ASCII.GetBytes("ASUS Tech.Inc.")), "SlashWakeUp"); } public void Init() { - Set(Packet(0xD7, 0x00, 0x00, 0x01, 0xAC)); - Set(Packet(0xD2, 0x02, 0x01, 0x08, 0xAB)); + Set(Packet(0xD7, 0x00, 0x00, 0x01, 0xAC), "SlashInit"); + Set(Packet(0xD2, 0x02, 0x01, 0x08, 0xAB), "SlashInit"); } public void Save() { - Set(Packet(0xD4, 0x00, 0x00, 0x01, 0xAB)); + Set(Packet(0xD4, 0x00, 0x00, 0x01, 0xAB), "SlashSave"); } public void SetMode(SlashMode mode) @@ -111,20 +111,20 @@ namespace GHelper.AnimeMatrix modeByte = 0x00; } - Set(Packet(0xD2, 0x03, 0x00, 0x0C)); - Set(Packet(0xD3, 0x04, 0x00, 0x0C, 0x01, modeByte, 0x02, 0x19, 0x03, 0x13, 0x04, 0x11, 0x05, 0x12, 0x06, 0x13)); + Set(Packet(0xD2, 0x03, 0x00, 0x0C), "SlashMode"); + Set(Packet(0xD3, 0x04, 0x00, 0x0C, 0x01, modeByte, 0x02, 0x19, 0x03, 0x13, 0x04, 0x11, 0x05, 0x12, 0x06, 0x13), "SlashMode"); } public void SetOptions(bool status, int brightness = 0, int interval = 0) { byte brightnessByte = (byte)(brightness * 85.333); - Set(Packet(0xD3, 0x03, 0x01, 0x08, 0xAB, 0xFF, 0x01, status ? (byte)0x01 : (byte)0x00, 0x06, brightnessByte, 0xFF, (byte)interval)); + Set(Packet(0xD3, 0x03, 0x01, 0x08, 0xAB, 0xFF, 0x01, status ? (byte)0x01 : (byte)0x00, 0x06, brightnessByte, 0xFF, (byte)interval), "SlashOptions"); } public void SetBatterySaver(bool status) { - Set(Packet(0xD8, 0x01, 0x00, 0x01, status ? (byte)0x80 : (byte)0x00)); + Set(Packet(0xD8, 0x01, 0x00, 0x01, status ? (byte)0x80 : (byte)0x00), "SlashBatterySaver"); } public void SetLidMode(bool status) @@ -132,10 +132,10 @@ namespace GHelper.AnimeMatrix Set(Packet(0xD8, 0x00, 0x00, 0x02, 0xA5, status ? (byte)0x80 : (byte)0x00)); } - public void Set(Packet packet) + public void Set(Packet packet, string? log = null) { _usbProvider?.Set(packet.Data); - Logger.WriteLine("Slash:" + BitConverter.ToString(packet.Data)); + if (log is not null) Logger.WriteLine("Slash:" + BitConverter.ToString(packet.Data)); } diff --git a/app/AppConfig.cs b/app/AppConfig.cs index 4e720e62..a63f26ec 100644 --- a/app/AppConfig.cs +++ b/app/AppConfig.cs @@ -587,6 +587,11 @@ public static class AppConfig return ContainsModel("G834") || ContainsModel("G614") || ContainsModel("G834") || ContainsModel("G634"); } + public static bool IsNoFNV() + { + return ContainsModel("FX507") || ContainsModel("FX707"); + } + public static bool IsROG() { return ContainsModel("ROG"); @@ -601,4 +606,6 @@ public static class AppConfig return Is("bw_icon"); } + + } diff --git a/app/Extra.cs b/app/Extra.cs index 8bbd6a10..d4f5f2d0 100644 --- a/app/Extra.cs +++ b/app/Extra.cs @@ -205,15 +205,16 @@ namespace GHelper labelFNF4.Visible = comboFNF4.Visible = textFNF4.Visible = false; } - if (AppConfig.IsTUF()) - { - labelFNV.Visible = comboFNV.Visible = textFNV.Visible = false; - } - else + if (!AppConfig.IsTUF()) { labelFNE.Visible = comboFNE.Visible = textFNE.Visible = false; } + if (AppConfig.IsNoFNV()) + { + labelFNV.Visible = comboFNV.Visible = textFNV.Visible = false; + } + if (Program.acpi.DeviceGet(AsusACPI.GPUEco) < 0) { checkGpuApps.Visible = false; diff --git a/app/Properties/Strings.es.resx b/app/Properties/Strings.es.resx index 6b98cb5c..84f418ad 100644 --- a/app/Properties/Strings.es.resx +++ b/app/Properties/Strings.es.resx @@ -250,16 +250,16 @@ Encendida - Low + Bajo - Max + Máximo - Mid + Medio - Off + Apagado Tiempo de espera conectado / con batería (0 - ON) @@ -355,7 +355,7 @@ Descargando - Download Color Profiles + Descargar perfiles de color Descargar @@ -585,7 +585,7 @@ Multizona fuerte - Muted + Silenciado Silenciar micrófono @@ -603,10 +603,10 @@ No conectado - Off + Apagado - On + Encendido Una zona @@ -753,7 +753,7 @@ Undervolting es una característica experimental. Aplicar valores demasiado bajos puede causar inestabilidad en el hardware o corrupción de datos. Si desea probar, empiece con valores pequeños, haga click en Aplicar y pruebe. - Unmuted + No silenciado Actualización @@ -765,7 +765,7 @@ Intensidad de vibración - Visual Mode + Modo visual Bajar volumen diff --git a/docs/README.md b/docs/README.md index ca5bb818..00b3a408 100644 --- a/docs/README.md +++ b/docs/README.md @@ -3,8 +3,8 @@ [![GitHub release](https://img.shields.io/github/release/seerge/g-helper)](https://GitHub.com/seerge/g-helper/releases/) [![Github all releases](https://img.shields.io/github/downloads/seerge/g-helper/total)](https://GitHub.com/seerge/g-helper/releases/) [![GitHub stars](https://img.shields.io/github/stars/seerge/g-helper.svg?style=social)](https://GitHub.com/seerge/g-helper/stargazers/) -Small and lightweight Armoury Crate alternative for Asus laptops offering almost same functionality without extra bloat 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, Ally and many more! +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)