Skip to content

Commit 76893a7

Browse files
committed
22f4881 fixes
1 parent 22f4881 commit 76893a7

File tree

3 files changed

+14
-10
lines changed

3 files changed

+14
-10
lines changed

AsusFanControl/AsusControl.cs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,11 @@ public AsusControl()
1919
AsusWinIO64.ShutdownWinIo();
2020
}
2121

22-
public async void SetFanSpeed(byte value, byte fanIndex = 0)
22+
public void SetFanSpeed(byte value, byte fanIndex = 0)
2323
{
2424
AsusWinIO64.HealthyTable_SetFanIndex(fanIndex);
25-
await Task.Delay(20);
26-
27-
AsusWinIO64.HealthyTable_SetFanPwmDuty(value);
2825
AsusWinIO64.HealthyTable_SetFanTestMode((char)(value > 0 ? 0x01 : 0x00));
29-
await Task.Delay(20);
26+
AsusWinIO64.HealthyTable_SetFanPwmDuty(value);
3027
}
3128

3229
public void SetFanSpeed(int percent, byte fanIndex = 0)
@@ -35,12 +32,13 @@ public void SetFanSpeed(int percent, byte fanIndex = 0)
3532
SetFanSpeed(value, fanIndex);
3633
}
3734

38-
public void SetFanSpeeds(byte value)
35+
public async void SetFanSpeeds(byte value)
3936
{
4037
var fanCount = AsusWinIO64.HealthyTable_FanCounts();
4138
for(byte fanIndex = 0; fanIndex < fanCount; fanIndex++)
4239
{
4340
SetFanSpeed(value, fanIndex);
41+
await Task.Delay(20);
4442
}
4543
}
4644

AsusFanControlGUI/Form1.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,18 @@ private void Form1_FormClosing(object sender, FormClosingEventArgs e)
5151
}),
5252
new MenuItem("Exit", (s1, e1) =>
5353
{
54-
trayIcon.Visible = false;
5554
Close();
55+
trayIcon.Visible = false;
56+
Application.Exit();
5657
}),
5758
}),
5859
};
5960

60-
trayIcon.Click += (s1, e1) =>
61+
trayIcon.MouseClick += (s1, e1) =>
6162
{
63+
if (e1.Button != MouseButtons.Left)
64+
return;
65+
6266
trayIcon.Visible = false;
6367
Show();
6468
};

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ My laptop does not support the [Fan Profile](https://github.com/Karmel0x/AsusFan
2727
### Compatibility
2828
This program should work on any laptop with x64 windows where [Fan Diagnosis](https://github.com/Karmel0x/AsusFanControl/assets/25367564/7129833b-97af-4da8-9148-b71e49552ea4) in [MyASUS](https://apps.microsoft.com/store/detail/myasus/9N7R5S6B0ZZH) application is working as it is using same library.
2929

30+
[ASUS System Control Interface](https://www.asus.com/support/faq/1047338/) is necessary for this software to work - `ASUS System Analysis` service [must be running](../../issues/16). It's automatically installed with `MyASUS` app.
31+
3032
Included `AsusWinIO64.dll` is licenced to `(c) ASUSTek COMPUTER INC.` which can be found in `C:\Windows\System32\DriverStore\FileRepository\asussci2.inf_amd64_-\ASUSSystemAnalysis\` if you have MyASUS installed.
3133

32-
Confirmed compatibility:
33-
- ASUS VivoBook 15 X512FL
34+
[Works on](../../issues/13):
35+
- ASUS: VivoBook, ZenBook, TUF Gaming, ROG Strix, ROG Zephyrus, ROG Flow

0 commit comments

Comments
 (0)