From d778838ad4f511888c096fe0b0518347ea48538a Mon Sep 17 00:00:00 2001 From: Serge <5920850+seerge@users.noreply.github.com> Date: Mon, 19 Jun 2023 16:15:33 +0200 Subject: [PATCH] Release script --- .github/workflows/release.yml | 4 ++-- app/Fans.cs | 12 ++++++------ app/Ryzen/Undervolter.cs | 10 ++++++++++ app/Settings.cs | 6 +++--- 4 files changed, 21 insertions(+), 11 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ad257d74..29fb3fa3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -20,9 +20,9 @@ jobs: - 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-windows8.0/win-x64/publish/GHelper.exe GHelper.zip + powershell Compress-Archive app/bin/x64/Release/net7.0-windows8.0/win-x64/publish/* GHelper.zip - name: Upload env: GH_TOKEN: ${{ github.token }} run: | - gh release upload ${{ github.ref_name }} app/bin/x64/Release/net7.0-windows8.0/win-x64/publish/GHelper.exe GHelper.zip + gh release upload ${{ github.ref_name }} GHelper.zip diff --git a/app/Fans.cs b/app/Fans.cs index 7145565e..651f5b3b 100644 --- a/app/Fans.cs +++ b/app/Fans.cs @@ -133,14 +133,14 @@ namespace GHelper labelFansResult.Visible = false; - trackUV.Minimum = -30; - trackUV.Maximum = 0; + trackUV.Minimum = Undervolter.MinCPUUV; + trackUV.Maximum = Undervolter.MaxCPUUV; - trackUViGPU.Minimum = -20; - trackUViGPU.Maximum = 0; + trackUViGPU.Minimum = Undervolter.MinIGPUUV; + trackUViGPU.Maximum = Undervolter.MaxIGPUUV; - trackTemp.Minimum = 75; - trackTemp.Maximum = 97; + trackTemp.Minimum = Undervolter.MinTemp; + trackTemp.Maximum = Undervolter.MaxTemp; FillModes(); diff --git a/app/Ryzen/Undervolter.cs b/app/Ryzen/Undervolter.cs index 45a6d5fc..35dd7a95 100644 --- a/app/Ryzen/Undervolter.cs +++ b/app/Ryzen/Undervolter.cs @@ -10,6 +10,16 @@ namespace Ryzen { internal class Undervolter { + + public const int MinCPUUV = -30; + public const int MaxCPUUV = 0; + + public const int MinIGPUUV = -20; + public const int MaxIGPUUV = 0; + + public const int MinTemp = 75; + public const int MaxTemp = 98; + public static string[] FAM = { "RAVEN", "PICASSO", "DALI", "RENOIR/LUCIENNE", "MATISSE", "VANGOGH", "VERMEER", "CEZANNE/BARCELO", "REMBRANDT", "PHOENIX", "RAPHAEL/DRAGON RANGE" }; public static int FAMID { get; protected set; } diff --git a/app/Settings.cs b/app/Settings.cs index db9fa206..a093405f 100644 --- a/app/Settings.cs +++ b/app/Settings.cs @@ -1156,17 +1156,17 @@ namespace GHelper try { - if (cpuUV >= -40 && cpuUV <= 0) + if (cpuUV >= Undervolter.MinCPUUV && cpuUV <= Undervolter.MaxCPUUV) { SendCommand.set_coall(cpuUV); } - if (igpuUV >= -40 && igpuUV <= 0) + if (igpuUV >= Undervolter.MinIGPUUV && igpuUV <= Undervolter.MaxIGPUUV) { SendCommand.set_cogfx(igpuUV); } - if (cpuTemp >= 70 && cpuTemp <= 97) + if (cpuTemp >= Undervolter.MinTemp && cpuTemp <= Undervolter.MaxTemp) { SendCommand.set_tctl_temp((uint)cpuTemp); SendCommand.set_apu_skin_temp_limit((uint)cpuTemp);