-
-
Notifications
You must be signed in to change notification settings - Fork 548
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
Fixes for ASUS Crosshair VIII Hero #540
Conversation
6e05565
to
bb1cf3f
Compare
Probably means they moved the sensor in Dark Hero. I'll remove it then. Maybe they are in place of the chipset fan? |
Maybe you could take the T sensor and plug it in the water headers please, to test the register addresses? For C8H such re-plugging worked without power-cycling the board (which is naturally non-surprising, as the sensor is just a thermistor). |
Looks like 216 is the default value for non-connected probes. And all three work as expected when connected. (Small sidenote: I did forget that I still had FanControl running in the background. With all my fans being controlled by T-Sensor, they shot up straight to 100% while I was busy switching plugs. Made me jump a little 🤣) |
Thank you! I will add 0xd8 as the placeholder value for these two water sensors then. |
All three of them jump to 216 as seen in the screenshot above. |
My bad... Thanks! |
Added blank values for EC temperature sensors that can possibly be not plugged in (T Sensor and water). |
Great! Thank you for testing! |
Thank you for testing this out! Added the Formula board to the Linux driver. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rest looks good, although I can't test this myself.
|
||
protected EmbeddedController(List<EmbeddedControllerSource> sources, ISettings settings) : base("Embedded Controller", new Identifier("lpc", "ec"), settings) | ||
{ | ||
_sources = sources.ToArray(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe make _sources a list instead? Seems rather pointless to allocate an array here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I want to highlight that the _sources length does not change after creation. Is there a better way?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can make _source IReadOnlyList.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, but from my point of view that is over complicated. Besides, I pass arrays to the EC reader object, so would need to convert on each call should I choose to leave the List here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
_sources only seems to be used in Update to access the instances, so all you need to do change private readonly EmbeddedControllerSource[] _sources;
to private readonly IReadOnlyList<EmbeddedControllerSource> _sources;
🙂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For whatever reason I misread _sources for _registers, sorry. Yes, will replace with IReadOnlyList then.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All good now to merge?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, please.
{ | ||
return ReadLoop<byte>(register, ReadByteOp); | ||
} | ||
if (registers.Length > data.Length) throw new ArgumentException("data buffer length has to be greater or equal to the registers array length"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
throw on new line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replaced with Trace.Assert
LibreHardwareMonitorLib/Hardware/Motherboard/Lpc/EC/EmbeddedController.cs
Outdated
Show resolved
Hide resolved
This implements bank switching for the EC controller and uses that to read water temperatures. The sensors in the Nuvoton chips that were thought to be water temperatures turned out to be QFan sources and are removed for now.
Thank you for testing and reviewing! |
This implements bank switching for the EC controller and uses that to read water temperatures. The sensors in the Nuvoton chips that were thought to be water temperatures turned out to be QFan sources and are removed for now.
Also supplies correct default fan and controls names.
I plan to use ASUS WMI functions to read EC (and maybe Nuvoton) state to avoid race between LHM and ASUS AISuite and perhaps firmware when reading data. However, calling those methods in Windows did not work from the first attempt and hence this PR brings EC bank switching using the direct port write method, which is potentially dangerous (but other 3rd-party monitoring software use it anyway), and reduces the
IEmbeddedControllerIO
to the only function, available in the ASUS DSDT code.