mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
AdjustAllLevels fixes
This commit is contained in:
@@ -36,17 +36,17 @@ public class ASUSWmi
|
|||||||
public const int Temp_CPU = 0x00120094;
|
public const int Temp_CPU = 0x00120094;
|
||||||
public const int Temp_GPU = 0x00120097;
|
public const int Temp_GPU = 0x00120097;
|
||||||
|
|
||||||
|
public const int PPT_TotalA0 = 0x001200A0; // Total PPT on 2022 (PPT_LIMIT_SLOW ) and CPU PPT on 2021
|
||||||
public const int PPT_TotalA0 = 0x001200A0; // Total PPT on 2022 and CPU PPT on 2021
|
|
||||||
public const int PPT_EDCA1 = 0x001200A1; // CPU EDC
|
public const int PPT_EDCA1 = 0x001200A1; // CPU EDC
|
||||||
public const int PPT_TDCA2 = 0x001200A2; // CPU TDC
|
public const int PPT_TDCA2 = 0x001200A2; // CPU TDC
|
||||||
public const int PPT_APUA3 = 0x001200A3; // APU PPT ON 2021, doesn't work on 2022
|
public const int PPT_APUA3 = 0x001200A3; // APU PPT ON 2021, doesn't work on 2022
|
||||||
|
|
||||||
public const int PPT_CPUB0 = 0x001200B0; // CPU PPT on 2022
|
public const int PPT_CPUB0 = 0x001200B0; // CPU PPT on 2022 (PPT_LIMIT_APU)
|
||||||
public const int PPT_CPUB1 = 0x001200B1; // APU PPT on 2022
|
public const int PPT_CPUB1 = 0x001200B1; // Total PPT on 2022 (PPT_LIMIT_SLOW)
|
||||||
|
|
||||||
public const int PPT_APUC1 = 0x001200C1;
|
public const int PPT_APUC0 = 0x001200C0; // does nothing on G14 2022
|
||||||
public const int PPT_APUC2 = 0x001200C2;
|
public const int PPT_APUC1 = 0x001200C1; // Actual Power Limit (PPT_LIMIT_FAST) AND Sustained Power Limit (STAPM_LIMIT)
|
||||||
|
public const int PPT_APUC2 = 0x001200C2; // does nothing on G14 2022
|
||||||
|
|
||||||
public const int TUF_KB = 0x00100056;
|
public const int TUF_KB = 0x00100056;
|
||||||
public const int TUF_KB_STATE = 0x00100057;
|
public const int TUF_KB_STATE = 0x00100057;
|
||||||
|
|||||||
19
app/Fans.cs
19
app/Fans.cs
@@ -433,11 +433,8 @@ namespace GHelper
|
|||||||
curPoint.XValue = dx;
|
curPoint.XValue = dx;
|
||||||
curPoint.YValues[0] = dy;
|
curPoint.YValues[0] = dy;
|
||||||
|
|
||||||
if (hit.Series is not null) {
|
if (hit.Series is not null)
|
||||||
|
AdjustAllLevels(hit.PointIndex, dx, dy, hit.Series);
|
||||||
AdjustAllLevels(hit.PointIndex, dy, dx, hit.Series);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
tip = true;
|
tip = true;
|
||||||
}
|
}
|
||||||
@@ -460,7 +457,7 @@ namespace GHelper
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void AdjustAllLevels(int index, double curYVal, double curXVal, Series series) {
|
private void AdjustAllLevels(int index, double curXVal, double curYVal, Series series) {
|
||||||
|
|
||||||
// Get the neighboring DataPoints of the hit point
|
// Get the neighboring DataPoints of the hit point
|
||||||
DataPoint upperPoint = null;
|
DataPoint upperPoint = null;
|
||||||
@@ -505,20 +502,20 @@ namespace GHelper
|
|||||||
|
|
||||||
if (lowerPoint != null)
|
if (lowerPoint != null)
|
||||||
{
|
{
|
||||||
if (curYVal < lowerPoint.YValues[0])
|
//Debug.WriteLine(curYVal + " <? " + Math.Floor(lowerPoint.YValues[0]));
|
||||||
|
if (curYVal < Math.Floor(lowerPoint.YValues[0]))
|
||||||
{
|
{
|
||||||
for (int i = index - 1; i > 0; i--)
|
for (int i = index - 1; i >= 0; i--)
|
||||||
{
|
{
|
||||||
DataPoint curLower = series.Points[i];
|
DataPoint curLower = series.Points[i];
|
||||||
if (curLower.YValues[0] <= curYVal) break;
|
if (curLower.YValues[0] <= curYVal) break;
|
||||||
|
curLower.YValues[0] = Math.Floor(curYVal);
|
||||||
curLower.YValues[0] = curYVal;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (curXVal < lowerPoint.XValue)
|
if (curXVal < lowerPoint.XValue)
|
||||||
{
|
{
|
||||||
|
|
||||||
for (int i = index - 1; i > 0; i--)
|
for (int i = index - 1; i >= 0; i--)
|
||||||
{
|
{
|
||||||
DataPoint curLower = series.Points[i];
|
DataPoint curLower = series.Points[i];
|
||||||
if (curLower.XValue <= curXVal) break;
|
if (curLower.XValue <= curXVal) break;
|
||||||
|
|||||||
Reference in New Issue
Block a user