Skip to content

Commit

Permalink
v1.5.7
Browse files Browse the repository at this point in the history
  • Loading branch information
lich426 committed Feb 25, 2023
1 parent b2eabec commit 112001b
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 5 deletions.
2 changes: 1 addition & 1 deletion FanCtrl.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<PublisherName>Lich</PublisherName>
<SuiteName>FanCtrl</SuiteName>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.5.6.0</ApplicationVersion>
<ApplicationVersion>1.5.7.0</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<CreateDesktopShortcut>true</CreateDesktopShortcut>
<PublishWizardCompleted>true</PublishWizardCompleted>
Expand Down
6 changes: 3 additions & 3 deletions Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@
//
// 모든 값을 지정하거나 아래와 같이 '*'를 사용하여 빌드 번호 및 수정 번호를
// 기본값으로 할 수 있습니다.
[assembly: AssemblyVersion("1.5.6")]
[assembly: AssemblyFileVersion("1.5.6")]
[assembly: AssemblyInformationalVersion("1.5.6")]
[assembly: AssemblyVersion("1.5.7")]
[assembly: AssemblyFileVersion("1.5.7")]
[assembly: AssemblyInformationalVersion("1.5.7")]
Binary file modified dll/LibreHardwareMonitorLib.dll
Binary file not shown.
Binary file modified plugin/liquidctl.exe
Binary file not shown.
47 changes: 46 additions & 1 deletion src/libs/Hardware/HWInfo/HWInfoManager.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Newtonsoft.Json.Linq;
using HidSharp.Reports;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.IO;
Expand Down Expand Up @@ -32,6 +33,9 @@ public class HWInfoManager
private List<HWInfoCategory> mHWInfoCategoryList = new List<HWInfoCategory>();

private bool mIsFirstRecv = false;

private bool mIsVersionMore734 = false;

private HWInfoManager() { }
private static HWInfoManager sManager = new HWInfoManager();
public static HWInfoManager getInstance() { return sManager; }
Expand Down Expand Up @@ -220,6 +224,35 @@ private bool getVersion(List<byte> recvList)

if (recvList[0] == 0x50 && recvList[1] == 0x52 && recvList[2] == 0x57 && recvList[3] == 0x48 && recvList[4] == 0x01)
{
try
{
var tempList2 = new List<byte>();
for (int i = 40; i < recvLength; i++)
{
if (recvList[i] == 0x00)
break;
tempList2.Add(recvList[i]);
}

// ex) HWiNFO64 v7.40-5000
string hwinfoVersion = Encoding.Default.GetString(tempList2.ToArray());
var splitArray = hwinfoVersion.Split(' ');
if (splitArray.Length == 2)
{
var splitArray2 = splitArray[1].Split('-');
if (splitArray2.Length == 2)
{
var versionString = splitArray2[0].Replace("v", "");
double version = double.Parse(versionString);
if (version >= 7.34)
{
mIsVersionMore734 = true;
}
}
}

}
catch { }
return true;
}
return false;
Expand Down Expand Up @@ -363,6 +396,12 @@ private void processData(List<byte> recvList)
// category name (repeat)
index = index + 128;

// pass packet
if (mIsVersionMore734 == true)
{
index = index + 128;
}

Monitor.Enter(mLock);
string categoryID = string.Format("{0}/{1}/{2}/{3}", mIDPrefix, id1, id2, name);
HWInfoCategory category = null;
Expand Down Expand Up @@ -442,6 +481,12 @@ private void processData(List<byte> recvList)
double average = BitConverter.ToDouble(datas, 0);
index = index + 8;

// pass packet
if (mIsVersionMore734 == true)
{
index = index + 144;
}

try
{
if (categoryIndex < tempCategoryList.Count && name.Length > 0)
Expand Down

0 comments on commit 112001b

Please sign in to comment.