Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Razer PWM PC Fan Controller #1090

Merged
merged 11 commits into from
Jun 15, 2023

Conversation

wlkmanist
Copy link
Contributor

@wlkmanist wlkmanist commented Jun 8, 2023

I am on Win8.1, so I can't use Synapse 3 (latest versions that supports this controller) and can't write a plugin for FanControl (V63 is the latest working version for me, with LHM lib 0.8.7). But I can backport this code to 0.8.7 or use it as is.
Controls works in full range (from 0% to 100%). Also already fixed issue with fan hotplug.

image

image

Signed-off-by: wlkmanist <vlad.king5555@mail.ru>
Signed-off-by: wlkmanist <vlad.king5555@mail.ru>
@wlkmanist
Copy link
Contributor Author

wlkmanist commented Jun 8, 2023

Yea, now its works fine, but I can't test it on newer FanControl versions.
Hotplugging for fans and controller works fine.

Signed-off-by: wlkmanist <vlad.king5555@mail.ru>
Copy link
Collaborator

@PhyxionNL PhyxionNL left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some small things, thanks 😎

Signed-off-by: wlkmanist <vlad.king5555@mail.ru>
Signed-off-by: wlkmanist <vlad.king5555@mail.ru>
@wlkmanist
Copy link
Contributor Author

I don't know, how to hide the device if it disconnected. Is it possible?

@PhyxionNL
Copy link
Collaborator

I don't know, how to hide the device if it disconnected. Is it possible?

You can choose not to add the device in the group when it's disconnected. For dynamic add/remove you need to implement IHardwareChanged, see an example:
https://github.com/LibreHardwareMonitor/LibreHardwareMonitor/blob/master/LibreHardwareMonitorLib/Hardware/Network/NetworkGroup.cs

For HidSharp I think you can use their Changed event:
https://github.com/IntergatedCircuits/HidSharp/blob/master/HidSharp/DeviceList.cs#L40

Signed-off-by: wlkmanist <vlad.king5555@mail.ru>
Signed-off-by: wlkmanist <vlad.king5555@mail.ru>
@wlkmanist
Copy link
Contributor Author

wlkmanist commented Jun 15, 2023

I don't know, how to hide the device if it disconnected. Is it possible?

You can choose not to add the device in the group when it's disconnected. For dynamic add/remove you need to implement IHardwareChanged, see an example: https://github.com/LibreHardwareMonitor/LibreHardwareMonitor/blob/master/LibreHardwareMonitorLib/Hardware/Network/NetworkGroup.cs

For HidSharp I think you can use their Changed event: https://github.com/IntergatedCircuits/HidSharp/blob/master/HidSharp/DeviceList.cs#L40

Ok, maybe I will try to add that

Signed-off-by: wlkmanist <vlad.king5555@mail.ru>
Signed-off-by: wlkmanist <vlad.king5555@mail.ru>
@wlkmanist wlkmanist requested a review from PhyxionNL June 15, 2023 13:08
Signed-off-by: wlkmanist <vlad.king5555@mail.ru>
@PhyxionNL
Copy link
Collaborator

I don't know, how to hide the device if it disconnected. Is it possible?

You can choose not to add the device in the group when it's disconnected. For dynamic add/remove you need to implement IHardwareChanged, see an example: https://github.com/LibreHardwareMonitor/LibreHardwareMonitor/blob/master/LibreHardwareMonitorLib/Hardware/Network/NetworkGroup.cs
For HidSharp I think you can use their Changed event: https://github.com/IntergatedCircuits/HidSharp/blob/master/HidSharp/DeviceList.cs#L40

Ok, maybe I will try to add that

Do you still want to do this?

@wlkmanist
Copy link
Contributor Author

I don't know, how to hide the device if it disconnected. Is it possible?

You can choose not to add the device in the group when it's disconnected. For dynamic add/remove you need to implement IHardwareChanged, see an example: https://github.com/LibreHardwareMonitor/LibreHardwareMonitor/blob/master/LibreHardwareMonitorLib/Hardware/Network/NetworkGroup.cs
For HidSharp I think you can use their Changed event: https://github.com/IntergatedCircuits/HidSharp/blob/master/HidSharp/DeviceList.cs#L40

Ok, maybe I will try to add that

Do you still want to do this?

Probably not, or much later, maybe with another PR. This is not a device that user must plug/unplug while pc is enabled.

@PhyxionNL PhyxionNL merged commit fe36178 into LibreHardwareMonitor:master Jun 15, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants