Skip to content

Commit

Permalink
Add new Kraken X3 PID (0x2014)
Browse files Browse the repository at this point in the history
  • Loading branch information
lich426 committed Oct 20, 2022
1 parent a7c8e03 commit f56a9b6
Show file tree
Hide file tree
Showing 6 changed files with 52 additions and 41 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.4.9.0</ApplicationVersion>
<ApplicationVersion>1.5.0.0</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<CreateDesktopShortcut>true</CreateDesktopShortcut>
<PublishWizardCompleted>true</PublishWizardCompleted>
Expand Down
3 changes: 3 additions & 0 deletions FanCtrl/Controller/USBController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ public enum USBProductID : int
// KrakenX3 series
KrakenX3 = 0x2007,

// KrakenX3 series
KrakenX3_NEW = 0x2014,

// EVGA CLC
CLC = 0xb200,

Expand Down
73 changes: 39 additions & 34 deletions FanCtrl/Hardware/HardwareManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -367,50 +367,55 @@ public void start()
}

// X3
tempDevice = new HardwareDevice("NZXT Kraken X3");
fanDevice = new HardwareDevice("NZXT Kraken X3");
controlDevice = new HardwareDevice("NZXT Kraken X3");
devCount = HidUSBController.getDeviceCount(USBVendorID.NZXT, USBProductID.KrakenX3);
for (uint i = 0; i < devCount; i++)
for (int n = 0; n < 2; n++)
{
var kraken = new Kraken();
if (kraken.start(i, USBProductID.KrakenX3) == true)
var productID = (n == 0) ? USBProductID.KrakenX3 : USBProductID.KrakenX3_NEW;

tempDevice = new HardwareDevice("NZXT Kraken X3");
fanDevice = new HardwareDevice("NZXT Kraken X3");
controlDevice = new HardwareDevice("NZXT Kraken X3");
devCount = HidUSBController.getDeviceCount(USBVendorID.NZXT, productID);
for (uint i = 0; i < devCount; i++)
{
KrakenList.Add(kraken);
var kraken = new Kraken();
if (kraken.start(i, productID) == true)
{
KrakenList.Add(kraken);

var id = string.Format("NZXT/KrakenX3/{0}/Temp", i);
var temp = new KrakenLiquidTemp(id, kraken, num);
tempDevice.addDevice(temp);
var id = string.Format("NZXT/KrakenX3/{0}/Temp", i);
var temp = new KrakenLiquidTemp(id, kraken, num);
tempDevice.addDevice(temp);

id = string.Format("NZXT/KrakenX3/{0}/Pump", i);
var pump = new KrakenPumpSpeed(id, kraken, num);
fanDevice.addDevice(pump);
id = string.Format("NZXT/KrakenX3/{0}/Pump", i);
var pump = new KrakenPumpSpeed(id, kraken, num);
fanDevice.addDevice(pump);

id = string.Format("NZXT/KrakenX3/{0}/Control/Pump", i);
var pumpControl = new KrakenPumpControl(id, kraken, num);
controlDevice.addDevice(pumpControl);
this.addChangeValue(50, pumpControl, false);
id = string.Format("NZXT/KrakenX3/{0}/Control/Pump", i);
var pumpControl = new KrakenPumpControl(id, kraken, num);
controlDevice.addDevice(pumpControl);
this.addChangeValue(50, pumpControl, false);

num++;
num++;
}
}
}

if (tempDevice.DeviceList.Count > 0)
{
var tempList = TempList[(int)LIBRARY_TYPE.NZXT_Kraken];
tempList.Add(tempDevice);
}
if (tempDevice.DeviceList.Count > 0)
{
var tempList = TempList[(int)LIBRARY_TYPE.NZXT_Kraken];
tempList.Add(tempDevice);
}

if (fanDevice.DeviceList.Count > 0)
{
var fanList = FanList[(int)LIBRARY_TYPE.NZXT_Kraken];
fanList.Add(fanDevice);
}
if (fanDevice.DeviceList.Count > 0)
{
var fanList = FanList[(int)LIBRARY_TYPE.NZXT_Kraken];
fanList.Add(fanDevice);
}

if (controlDevice.DeviceList.Count > 0)
{
var controlList = ControlList[(int)LIBRARY_TYPE.NZXT_Kraken];
controlList.Add(controlDevice);
if (controlDevice.DeviceList.Count > 0)
{
var controlList = ControlList[(int)LIBRARY_TYPE.NZXT_Kraken];
controlList.Add(controlDevice);
}
}
}
catch { }
Expand Down
9 changes: 6 additions & 3 deletions FanCtrl/Hardware/Kraken.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ public int getMaxFanSpeed()
public int getMinPumpSpeed()
{
// X3
if (mUSBController.ProductID == USBProductID.KrakenX3)
if (mUSBController.ProductID == USBProductID.KrakenX3 ||
mUSBController.ProductID == USBProductID.KrakenX3_NEW)
{
return 20;
}
Expand Down Expand Up @@ -121,7 +122,8 @@ private void onRecv(byte[] recvArray, int recvDataSize)
try
{
// X3
if (mUSBController.ProductID == USBProductID.KrakenX3)
if (mUSBController.ProductID == USBProductID.KrakenX3 ||
mUSBController.ProductID == USBProductID.KrakenX3_NEW)
{
if(recvDataSize >= 18)
{
Expand Down Expand Up @@ -165,7 +167,8 @@ private void onTimer(object sender, EventArgs e)
try
{
// X3
if (mUSBController.ProductID == USBProductID.KrakenX3)
if (mUSBController.ProductID == USBProductID.KrakenX3 ||
mUSBController.ProductID == USBProductID.KrakenX3_NEW)
{
mLastPumpSpeed = mPumpSpeed;

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.4.9")]
[assembly: AssemblyFileVersion("1.4.9")]
[assembly: AssemblyInformationalVersion("1.4.9")]
[assembly: AssemblyVersion("1.5.0")]
[assembly: AssemblyFileVersion("1.5.0")]
[assembly: AssemblyInformationalVersion("1.5.0")]
Binary file modified dll/LibreHardwareMonitorLib.dll
Binary file not shown.

0 comments on commit f56a9b6

Please sign in to comment.