mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
TDP tweaks
This commit is contained in:
@@ -4,9 +4,10 @@ using GHelper.Input;
|
||||
using GHelper.Mode;
|
||||
using GHelper.USB;
|
||||
using HidSharp;
|
||||
using System.Diagnostics;
|
||||
using System.Text;
|
||||
|
||||
|
||||
|
||||
namespace GHelper.Ally
|
||||
{
|
||||
|
||||
@@ -381,7 +382,7 @@ namespace GHelper.Ally
|
||||
if (_applyMode != newMode) _autoCount++;
|
||||
else _autoCount = 0;
|
||||
|
||||
if (_autoCount > 2)
|
||||
if (_autoCount == 3)
|
||||
{
|
||||
_autoCount = 0;
|
||||
ApplyMode(newMode);
|
||||
@@ -575,7 +576,7 @@ namespace GHelper.Ally
|
||||
DecodeBinding(KeyR2).CopyTo(bindings, 38);
|
||||
|
||||
//AsusHid.WriteInput(CommandReady, null);
|
||||
AsusHid.WriteInput(bindings, $"B{zone}");
|
||||
AsusHid.WriteInput(bindings, null);
|
||||
|
||||
}
|
||||
|
||||
@@ -591,19 +592,19 @@ namespace GHelper.Ally
|
||||
(byte)AppConfig.Get("ls_max", 100),
|
||||
(byte)AppConfig.Get("rs_min", 0),
|
||||
(byte)AppConfig.Get("rs_max", 100)
|
||||
}, "StickDeadzone");
|
||||
}, null);
|
||||
|
||||
AsusHid.WriteInput(new byte[] { AsusHid.INPUT_ID, 0xd1, 5, 4,
|
||||
(byte)AppConfig.Get("lt_min", 0),
|
||||
(byte)AppConfig.Get("lt_max", 100),
|
||||
(byte)AppConfig.Get("rt_min", 0),
|
||||
(byte)AppConfig.Get("rt_max", 100)
|
||||
}, "TriggerDeadzone");
|
||||
}, null);
|
||||
|
||||
AsusHid.WriteInput(new byte[] { AsusHid.INPUT_ID, 0xd1, 6, 2,
|
||||
(byte)AppConfig.Get("vibra", 100),
|
||||
(byte)AppConfig.Get("vibra", 100)
|
||||
}, "Vibration");
|
||||
}, null);
|
||||
|
||||
}
|
||||
|
||||
@@ -668,6 +669,7 @@ namespace GHelper.Ally
|
||||
_mode = mode;
|
||||
AppConfig.Set("controller_mode", (int)mode);
|
||||
|
||||
amdControl.StopFPS();
|
||||
ApplyMode(mode, init);
|
||||
|
||||
amdControl.StartFPS();
|
||||
|
||||
@@ -218,7 +218,9 @@ namespace GHelper
|
||||
|
||||
buttonUpdates.Click += ButtonUpdates_Click;
|
||||
|
||||
sliderBattery.ValueChanged += SliderBattery_ValueChanged;
|
||||
sliderBattery.MouseUp += SliderBattery_MouseUp;
|
||||
sliderBattery.KeyUp += SliderBattery_KeyUp;
|
||||
|
||||
Program.trayIcon.MouseMove += TrayIcon_MouseMove;
|
||||
|
||||
sensorTimer = new System.Timers.Timer(AppConfig.Get("sensor_timer", 1000));
|
||||
@@ -266,6 +268,16 @@ namespace GHelper
|
||||
InitVisual();
|
||||
}
|
||||
|
||||
private void SliderBattery_KeyUp(object? sender, KeyEventArgs e)
|
||||
{
|
||||
BatteryControl.SetBatteryChargeLimit(sliderBattery.Value);
|
||||
}
|
||||
|
||||
private void SliderBattery_MouseUp(object? sender, MouseEventArgs e)
|
||||
{
|
||||
BatteryControl.SetBatteryChargeLimit(sliderBattery.Value);
|
||||
}
|
||||
|
||||
private void ButtonAutoTDP_Click(object? sender, EventArgs e)
|
||||
{
|
||||
allyControl.ToggleAutoTDP();
|
||||
@@ -741,11 +753,6 @@ namespace GHelper
|
||||
gpuControl.ToggleXGM();
|
||||
}
|
||||
|
||||
private void SliderBattery_ValueChanged(object? sender, EventArgs e)
|
||||
{
|
||||
BatteryControl.SetBatteryChargeLimit(sliderBattery.Value);
|
||||
}
|
||||
|
||||
|
||||
public void SetVersionLabel(string label, bool update = false)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user